diff options
Diffstat (limited to 'profile')
-rw-r--r-- | profile/defaults.sh | 4 | ||||
-rw-r--r-- | profile/etc.sh | 10 | ||||
-rw-r--r-- | profile/infopath.sh | 1 | ||||
-rw-r--r-- | profile/less.sh | 3 | ||||
-rw-r--r-- | profile/luarocks.sh | 4 | ||||
-rw-r--r-- | profile/manpath.sh | 9 | ||||
-rw-r--r-- | profile/path.sh | 30 | ||||
-rw-r--r-- | profile/xdg.sh | 27 |
8 files changed, 88 insertions, 0 deletions
diff --git a/profile/defaults.sh b/profile/defaults.sh new file mode 100644 index 0000000..8facc97 --- /dev/null +++ b/profile/defaults.sh | |||
@@ -0,0 +1,4 @@ | |||
1 | # Default programs | ||
2 | |||
3 | export EDITOR="$(which vim)" # TODO: change to emacs | ||
4 | export VISUAL="$EDITOR" | ||
diff --git a/profile/etc.sh b/profile/etc.sh new file mode 100644 index 0000000..5458f02 --- /dev/null +++ b/profile/etc.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | # etc. settings | ||
2 | |||
3 | export GUILE_INSTALL_LOCALE=0 | ||
4 | export TZ=America/Chicago | ||
5 | |||
6 | #export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" | ||
7 | #export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc" | ||
8 | #export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" | ||
9 | #export SVDIR="$HOME/.local/service" | ||
10 | #export INFOPATH="$INFOPATH:/usr/share/info" | ||
diff --git a/profile/infopath.sh b/profile/infopath.sh new file mode 100644 index 0000000..ad1ec3f --- /dev/null +++ b/profile/infopath.sh | |||
@@ -0,0 +1 @@ | |||
export INFOPATH="/usr/share/info:${XDG_DATA_HOME:-$HOME/.local/share}/info" | |||
diff --git a/profile/less.sh b/profile/less.sh new file mode 100644 index 0000000..19a73ce --- /dev/null +++ b/profile/less.sh | |||
@@ -0,0 +1,3 @@ | |||
1 | # less settings | ||
2 | |||
3 | export LESS="--mouse --RAW-CONTROL-CHARS" | ||
diff --git a/profile/luarocks.sh b/profile/luarocks.sh new file mode 100644 index 0000000..315c0b7 --- /dev/null +++ b/profile/luarocks.sh | |||
@@ -0,0 +1,4 @@ | |||
1 | # add luarocks stuff to $PATH | ||
2 | |||
3 | command -v luarocks >/dev/null 2>&1 && | ||
4 | eval $(luarocks path) | ||
diff --git a/profile/manpath.sh b/profile/manpath.sh new file mode 100644 index 0000000..def1963 --- /dev/null +++ b/profile/manpath.sh | |||
@@ -0,0 +1,9 @@ | |||
1 | # $MANPATH shouldn't be too extra complicated (as opposed to $PATH), | ||
2 | # so I'm not going to include a whole other function. AT SOME POINT, | ||
3 | # I suppose I should generalize that function to set /any/ path-type | ||
4 | # variable, not just $PATH. | ||
5 | # $MANPATH ends with `:' so that manpath(1) will prepend it to its | ||
6 | # special thing. | ||
7 | |||
8 | MANPATH="${XDG_DATA_HOME:-$HOME/.local/share}/man:" | ||
9 | export MANPATH | ||
diff --git a/profile/path.sh b/profile/path.sh new file mode 100644 index 0000000..56bdc39 --- /dev/null +++ b/profile/path.sh | |||
@@ -0,0 +1,30 @@ | |||
1 | # PATH | ||
2 | |||
3 | # add a path to PATH, but only if it's not already there | ||
4 | path_add() { # path_add [-a] PATH... | ||
5 | # -a appends (default is prepend) | ||
6 | APPEND=false | ||
7 | if [ "x$1" = "x-a" ]; then | ||
8 | APPEND=true | ||
9 | shift | ||
10 | fi | ||
11 | |||
12 | for p; do | ||
13 | case ":$PATH:" in | ||
14 | *:"$p":*) ;; | ||
15 | *) | ||
16 | if $APPEND; then | ||
17 | PATH="$PATH:$p" | ||
18 | else | ||
19 | PATH="$p:$PATH" | ||
20 | fi | ||
21 | ;; | ||
22 | esac | ||
23 | done | ||
24 | |||
25 | unset APPEND | ||
26 | } | ||
27 | |||
28 | path_add "$HOME/bin" "$HOME/usr/bin" | ||
29 | |||
30 | command -v luarocks >/dev/null 2>&1 && path_add "$HOME/.luarocks/bin" | ||
diff --git a/profile/xdg.sh b/profile/xdg.sh new file mode 100644 index 0000000..caa1a9a --- /dev/null +++ b/profile/xdg.sh | |||
@@ -0,0 +1,27 @@ | |||
1 | # XDG compliance (miscellaneous) | ||
2 | |||
3 | # If an XDG-complaint variable makes more sense somewhere else, it'll be | ||
4 | # moved there (e.g., HISTFILE is in history.bash). So variables might | ||
5 | # move /out/ of this directory, but they probably won't move /in/. | ||
6 | |||
7 | # Readline | ||
8 | export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc | ||
9 | |||
10 | # Less | ||
11 | export LESSKEY="$XDG_CONFIG_HOME"/less/lesskey | ||
12 | export LESSHISTFILE="$XDG_CACHE_HOME"/less/history | ||
13 | mkdir -p "$XDG_CACHE_HOME"/less | ||
14 | |||
15 | # Vim | ||
16 | export VIMINIT="let \$MYVIMRC=\"$XDG_CONFIG_HOME/vim/vimrc\" | source \$MYVIMRC" | ||
17 | |||
18 | # Weechat | ||
19 | export WEECHAT_HOME="$XDG_CONFIG_HOME/weechat" | ||
20 | |||
21 | # Lynx | ||
22 | export LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg" | ||
23 | |||
24 | # Xorg | ||
25 | export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" | ||
26 | export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc" | ||
27 | export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" | ||