commit 1cefe565f26f8efd592e1cc2c6d8e41550beabcc
parent 29a179f085f9e682a6647147108976857cdec821
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Fri, 26 Mar 2021 22:52:45 -0700
Use XDG_DATA_HOME or equivalent where applicable
Diffstat:
5 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/local/mpd/.config/mpd/mpd.conf b/local/mpd/.config/mpd/mpd.conf
@@ -7,13 +7,13 @@ save_absolute_paths_in_playlists "yes"
zeroconf_enabled "no"
# files
-db_file "~/.local/var/mpd/database"
-log_file "~/.local/var/mpd/log"
+db_file "~/local/share/mpd/database"
+log_file "~/local/share/mpd/log"
music_directory "~/audio/"
-pid_file "~/.local/var/mpd/pid"
-playlist_directory "~/.local/var/mpd/m3u/"
-state_file "~/.local/var/mpd/state"
-sticker_file "~/.local/var/mpd/sticker.sql"
+pid_file "~/local/share/mpd/pid"
+playlist_directory "~/local/share/mpd/m3u/"
+state_file "~/local/share/mpd/state"
+sticker_file "~/local/share/mpd/sticker.sql"
# security
user "jacob"
diff --git a/local/mpv/.config/mpv/mpv.conf b/local/mpv/.config/mpv/mpv.conf
@@ -30,5 +30,5 @@ native-keyrepeat
cache-pause=yes
# watch later
-watch-later-directory="~/.local/var/mpv/resume/"
+watch-later-directory="~/local/share/mpv/resume/"
write-filename-in-watch-later-config=yes
diff --git a/local/profile/.profile b/local/profile/.profile
@@ -29,9 +29,8 @@ export MAKEFLAGS="-e"
export MANPATH="/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/local/plan9/man"
export MANPREFIX="/usr/local/man/"
export MPC_FORMAT="%file%"
-export PASSWORD_STORE_DIR="$HOME/.local/var/pass/"
+export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass/"
export PATH="$HOME/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:/usr/games:/usr/local/plan9/bin"
export PREFIX="/usr/local/"
-export PWDLOG="$HOME/.local/var/log/pwd"
export SHELL_MODULES="aliases cd etc fs hist mpc openbsd private xorg"
export WALLPAPER_DIR="$HOME/image/wallpapers/"
diff --git a/local/shell/.config/shell/cd b/local/shell/.config/shell/cd
@@ -1,6 +1,8 @@
# cd shell functions
-cd() { builtin cd "$@" && echo $PWD >>$PWDLOG ;}
-cdl() { uniq <$PWDLOG | stest -d ;}
+PWDLOG="${XDG_DATA_HOME:-$HOME/.local/share}/$(basename $0)/cd"
+
+cd() { builtin cd "$@" && echo "$PWD" >>"$PWDLOG" ;}
+cdl() { uniq <"$PWDLOG" | stest -d ;}
cdr() cd "$(cdl | egrep "${@:-.}" | tail -1)"
cds() cd "$(pwd | sed "s!$1!$2!g")"
diff --git a/local/xorg/.xsession b/local/xorg/.xsession
@@ -10,4 +10,4 @@ bg xbanish
bg xmodmap "$XDG_CONFIG_HOME/xmodmaprc"
bg xrdb -load "$HOME/.Xresources"
bg xset dpms 360 600 960 r rate 250 30 s 0 b 0 0 0
-exec dwm 2>&1 >$HOME/.local/var/log/dwm
+exec dwm 2>&1 >"$XDG_DATA_HOME/dwm"