summaryrefslogtreecommitdiff
path: root/.config/login.d
diff options
context:
space:
mode:
Diffstat (limited to '.config/login.d')
-rw-r--r--.config/login.d/01_locale.sh3
-rw-r--r--.config/login.d/10_golang.sh8
-rw-r--r--.config/login.d/10_selected-editor.sh4
3 files changed, 15 insertions, 0 deletions
diff --git a/.config/login.d/01_locale.sh b/.config/login.d/01_locale.sh
new file mode 100644
index 0000000..2e4f3c4
--- /dev/null
+++ b/.config/login.d/01_locale.sh
@@ -0,0 +1,3 @@
+if { [[ $LANG = C ]] || [[ -z $LANG ]]; } && grep '^en_US.UTF-8\s' /etc/locale.gen &>/dev/null; then
+ export LANG=en_US.UTF-8
+fi
diff --git a/.config/login.d/10_golang.sh b/.config/login.d/10_golang.sh
new file mode 100644
index 0000000..c3ae013
--- /dev/null
+++ b/.config/login.d/10_golang.sh
@@ -0,0 +1,8 @@
+if [[ -z $GOROOT ]]; then
+ export GOROOT="/homes/shumakl/.prefix.$(uname -m)/go"
+ if [[ -d $GOROOT ]]; then
+ PATH="$PATH:$GOROOT/bin"
+ else
+ unset GOROOT
+ fi
+fi
diff --git a/.config/login.d/10_selected-editor.sh b/.config/login.d/10_selected-editor.sh
index 52696cd..1a33e76 100644
--- a/.config/login.d/10_selected-editor.sh
+++ b/.config/login.d/10_selected-editor.sh
@@ -1,4 +1,8 @@
#!/hint/sh
+# PAM seems to be setting EDITOR...
+if [ "$EDITOR" = /usr/bin/vi ]; then
+ unset EDITOR
+fi
if [ -f "$HOME/.selected_editor" ]; then
. "$HOME/.selected_editor"
export SELECTED_EDITOR