about summary refs log tree commit diff stats
path: root/profile
diff options
context:
space:
mode:
authorCase Duckworth2021-08-23 23:07:31 -0500
committerCase Duckworth2021-08-23 23:07:31 -0500
commite292eb508413b9174684a8e75c93474a7f5351ee (patch)
treee7e59b21c817bfd1c438ef3cfc68b9021e786d7c /profile
downloadetc-e292eb508413b9174684a8e75c93474a7f5351ee.tar.gz
etc-e292eb508413b9174684a8e75c93474a7f5351ee.zip
Initial
Diffstat (limited to 'profile')
-rw-r--r--profile/defaults.sh4
-rw-r--r--profile/etc.sh10
-rw-r--r--profile/infopath.sh1
-rw-r--r--profile/less.sh3
-rw-r--r--profile/luarocks.sh4
-rw-r--r--profile/manpath.sh9
-rw-r--r--profile/path.sh30
-rw-r--r--profile/xdg.sh27
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
3export EDITOR="$(which vim)" # TODO: change to emacs
4export 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
3export GUILE_INSTALL_LOCALE=0
4export 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
3export 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
3command -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
8MANPATH="${XDG_DATA_HOME:-$HOME/.local/share}/man:"
9export 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
4path_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
28path_add "$HOME/bin" "$HOME/usr/bin"
29
30command -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
8export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
9
10# Less
11export LESSKEY="$XDG_CONFIG_HOME"/less/lesskey
12export LESSHISTFILE="$XDG_CACHE_HOME"/less/history
13mkdir -p "$XDG_CACHE_HOME"/less
14
15# Vim
16export VIMINIT="let \$MYVIMRC=\"$XDG_CONFIG_HOME/vim/vimrc\" | source \$MYVIMRC"
17
18# Weechat
19export WEECHAT_HOME="$XDG_CONFIG_HOME/weechat"
20
21# Lynx
22export LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg"
23
24# Xorg
25export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
26export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc"
27export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"