diff --git a/bash/bash_aliases b/bash/bash_aliases index 257cefa3c..092b243d5 100644 --- a/bash/bash_aliases +++ b/bash/bash_aliases @@ -28,8 +28,8 @@ alias spgen='ssh -A -t -i ~/.ssh/no_pass 10.10.0.1 ~/bin/spgen' alias gvim="/usr/bin/urxvt -e /bin/bash -c vim -i" # Startup scripts -alias startsway='/home/jpm/scripts/sway/startsway.sh' -alias starti3='/home/jpm/scripts/i3/starti3.sh' +alias startsway='${HOME}/scripts/sway/startsway.sh' +alias starti3='${HOME}/scripts/i3/starti3.sh' # Web shortcuts alias papillon="/usr/bin/chromium --app='https://papillon.john.me.tz/hud.php?refresh=3600&theme=dark'" @@ -39,4 +39,4 @@ alias pip="pip3" alias python="python3" # Backlight control -alias blc='/home/jpm/scripts/thinkpad/blc.pl --notify' +alias blc='${HOME}/scripts/thinkpad/blc.pl --notify' diff --git a/bash/bash_login b/bash/bash_login index af45c8da8..de08f0045 100644 --- a/bash/bash_login +++ b/bash/bash_login @@ -11,7 +11,7 @@ fi ssh-agent -a "$SSH_AUTH_SOCK" >/dev/null # Static/predictable Sway socket -export SWAYSOCK="/home/jpm/.spool/sway-ipc.sock" +export SWAYSOCK="${HOME}/.spool/sway-ipc.sock" # Standardize language on en_US because of the ubiquity export LANG="en_US.UTF-8" @@ -30,6 +30,6 @@ export QT_QPA_PLATFORM="wayland-egl;wayland;xcb" export DCONF=".config/dconf/user" # Suggest session start command if last session is not known -if [ ! -e /home/jpm/.spool/last_login_gui ]; then +if [ ! -e ${HOME}/.spool/last_login_gui ]; then echo "Use 'startsway' or 'starti3' to launch a GUI" fi diff --git a/bash/bash_profile b/bash/bash_profile index 4e8ed565a..b398c9c68 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -11,7 +11,7 @@ fi THEME="dark" # Perl junk to allow scripts to run for non-interactive sessions -PERL5LIB="/home/jpm/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; -PERL_LOCAL_LIB_ROOT="/home/jpm/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; -PERL_MB_OPT="--install_base \"/home/jpm/perl5\""; export PERL_MB_OPT; -PERL_MM_OPT="INSTALL_BASE=/home/jpm/perl5"; export PERL_MM_OPT; +PERL5LIB="${HOME}/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; +PERL_LOCAL_LIB_ROOT="${HOME}/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; +PERL_MB_OPT="--install_base \"${HOME}/perl5\""; export PERL_MB_OPT; +PERL_MM_OPT="INSTALL_BASE=${HOME}/perl5"; export PERL_MM_OPT; diff --git a/bash/bashrc b/bash/bashrc index 5acb768b2..ef25e72b1 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -12,10 +12,10 @@ export SSH_AUTH_SOCK=~/.ssh/ssh-agent.sock # agetty is set to automatically log me in on tty1 # Automatically launch GUI on tty1 after login if [ "$(tty)" == '/dev/tty1' ]; then - . /home/jpm/.bash_login - LAST_GUI=`cat /home/jpm/.spool/last_login_gui` - if [ -f "/home/jpm/.spool/last_login_gui" ]; then - /home/jpm/scripts/${LAST_GUI}/start${LAST_GUI}.sh + . ${HOME}/.bash_login + LAST_GUI=`cat ${HOME}/.spool/last_login_gui 2>/dev/null` + if [ -f "${HOME}/.spool/last_login_gui" ]; then + ${HOME}/scripts/${LAST_GUI}/start${LAST_GUI}.sh fi fi @@ -47,7 +47,7 @@ fi # Bell when prompt is returned to mark as urgent PROMPT_COMMAND='printf "\a"; history -a' # Reconfigure prompt after each return -PROMPT_COMMAND="$PROMPT_COMMAND; source /home/jpm/.dotfiles/bash/prompt.sh" +PROMPT_COMMAND="$PROMPT_COMMAND; source ${HOME}/.dotfiles/bash/prompt.sh" # Enable color support if possible if [ -x /usr/bin/dircolors ]; then @@ -70,10 +70,10 @@ fi #export XDG_DATA_DIRS="$XDG_DATA_DIRS:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/flatpak/exports/share" # Perl configs -PERL5LIB="/home/jpm/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; -PERL_LOCAL_LIB_ROOT="/home/jpm/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; -PERL_MB_OPT="--install_base \"/home/jpm/perl5\""; export PERL_MB_OPT; -PERL_MM_OPT="INSTALL_BASE=/home/jpm/perl5"; export PERL_MM_OPT; +PERL5LIB="${HOME}/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; +PERL_LOCAL_LIB_ROOT="${HOME}/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; +PERL_MB_OPT="--install_base \"${HOME}/perl5\""; export PERL_MB_OPT; +PERL_MM_OPT="INSTALL_BASE=${HOME}/perl5"; export PERL_MM_OPT; # Configure PATH source "$HOME/.dotfiles/bash/path" @@ -97,6 +97,7 @@ export MOZ_ENABLE_WAYLAND="1" export MOZ_WEBRENDER="1" export XDG_SESSION_TYPE="wayland" export XDG_CURRENT_DESKTOP="sway" -export XDG_CONFIG_HOME=/"home/jpm/.config" -export SWAYSOCK="/home/jpm/.spool/sway-ipc.sock" +export XDG_CONFIG_HOME="${HOME}/.config" +export XDG_DATA_DIRS="$XDG_DATA_DIRS:${HOME}/.config/flatpak/exports/share" +export SWAYSOCK="${HOME}/.spool/sway-ipc.sock" export CHROME_EXECUTABLE="/usr/bin/chromium" diff --git a/bash/path b/bash/path index c8c5c4883..3fa1eb232 100644 --- a/bash/path +++ b/bash/path @@ -28,7 +28,7 @@ if command -v pyenv 1>/dev/null 2>&1; then eval "$(pyenv init -)" fi # Perl -PATH="/home/jpm/perl5/bin:$PATH" +PATH="${HOME}/perl5/bin:$PATH" # Export PATH export PATH="$PATH" diff --git a/vim/vimrc b/vim/vimrc index 991dcb849..dd99d76c8 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -120,5 +120,5 @@ let g:tablabel = " Python au FileType python set ts=8 sts=4 et sw=4 smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class -source /home/jpm/.dotfiles/vim/abbreviations/personalAbbreviations.vim -source /home/jpm/.dotfiles/vim/abbreviations/codingAbbreviations.vim +source ${HOME}/.dotfiles/vim/abbreviations/personalAbbreviations.vim +source ${HOME}/.dotfiles/vim/abbreviations/codingAbbreviations.vim