diff --git a/README.md b/README.md index 48c01d1b1..ac71513d6 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Run `${HOME}/scripts/update_configs.pl` to refresh links and dump templates. This file contains a JSON hash of the configuration files available with either a path to be linked, or the name of a dumper contained within [`${HOME}/scripts/dotfiles`](https://git.john.me.tz/jpm/scripts). -### `${HOME}/.spool/dotfiles.json` +### `${HOME}/.local/state/dotfiles.json` This file contains a JSON hash of timestamps at which each configuration was last linked or dumped. The `${HOME}/scripts/update_configs.pl` script will use these times to know whether or not they need to be updated. It will do so if: diff --git a/bash/bash_login b/bash/bash_login index a006c878c..f47d04b82 100644 --- a/bash/bash_login +++ b/bash/bash_login @@ -24,7 +24,7 @@ export GDK_BACKEND="wayland" export DCONF=".config/dconf/user" # Suggest session start command if last session is not known -if [ ! -e "${HOME}/.spool/last_login_gui" ]; then +if [ ! -e "${HOME}/.local/state/last_login_gui" ]; then echo "Use 'startsway' or 'starti3' to launch a GUI" fi diff --git a/bash/bash_login.host b/bash/bash_login.host index 7335d8745..0c322d362 100644 --- a/bash/bash_login.host +++ b/bash/bash_login.host @@ -1,12 +1,12 @@ # vim: ft=sh ## Configure static SSH Agent -export SSH_AUTH_SOCK="$HOME/.spool/ssh-agent.sock" +export SSH_AUTH_SOCK="$HOME/.local/state/ssh-agent.sock" if [ -e "$SSH_AUTH_SOCK" ]; then rm "$SSH_AUTH_SOCK" fi -if [ -e "$HOME/.spool/ssh-agent.env" ]; then - rm "$HOME/.spool/ssh-agent.env" +if [ -e "$HOME/.local/state/ssh-agent.env" ]; then + rm "$HOME/.local/state/ssh-agent.env" fi if [[ "$(pgrep ssh-agent)" ]]; then pkill ssh-agent @@ -14,5 +14,5 @@ fi . ${HOME}/scripts/ssh-agent.sh # Static/predictable Sway socket -export SWAYSOCK="$HOME/.spool/sway-ipc.sock" +export SWAYSOCK="$HOME/.local/state/sway-ipc.sock" #export SWAYSOCK="`sway --get-socketpath`" diff --git a/bash/bash_logout.host b/bash/bash_logout.host index b16ddab14..3bc8979e7 100644 --- a/bash/bash_logout.host +++ b/bash/bash_logout.host @@ -3,7 +3,7 @@ if [ ! "$SSH_TTY" ]; then # Remove socket files rm "$SSH_AUTH_SOCK" - rm "$HOME/.spool/ssh-agent.env" + rm "$HOME/.local/state/ssh-agent.env" rm "$SWAYSOCK" fi diff --git a/bash/bashrc b/bash/bashrc index bf70df8d5..e6f930861 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -24,8 +24,8 @@ fi # Still, it does not hurt for later distrohopping if [ "$(tty)" == '/dev/tty1' ] && [ ! "$SSH_TTY" ]; then source "${HOME}/.dotfiles/bash/bash_login" - LAST_GUI=$(cat "${HOME}/.spool/last_login_gui" 2>/dev/null) - if [ -f "${HOME}/.spool/last_login_gui" ]; then + LAST_GUI=$(cat "${HOME}/.local/state/last_login_gui" 2>/dev/null) + if [ -f "${HOME}/.local/state/last_login_gui" ]; then ${HOME}/scripts/${LAST_GUI}/start${LAST_GUI}.sh fi fi diff --git a/bash/env_exports b/bash/env_exports index aae42aea8..7f9d30e31 100644 --- a/bash/env_exports +++ b/bash/env_exports @@ -1,7 +1,7 @@ #!/bin/bash # Static SSH agent -export SSH_AUTH_SOCK="$HOME/.spool/ssh-agent.sock" +export SSH_AUTH_SOCK="$HOME/.local/state/ssh-agent.sock" # GUI themes export GTK_THEME="Gruvbox" diff --git a/bash/shell_config b/bash/shell_config index d495a0d97..205566431 100644 --- a/bash/shell_config +++ b/bash/shell_config @@ -3,7 +3,7 @@ # don't put duplicate lines or lines starting with space in the history. shopt -s histappend HISTCONTROL=ignoreboth -HISTFILE=${HOME}/.spool/bash_history +HISTFILE=${HOME}/.local/state/bash_history # append to the history file, don't overwrite it # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) diff --git a/sway/autostart b/sway/autostart index 17d255d65..a9bd4a78e 100644 --- a/sway/autostart +++ b/sway/autostart @@ -22,7 +22,7 @@ exec ${HOME}/scripts/ssh-agent.sh & # Automatically restore last used output configuration # TODO: Need to add fail-safe to script in case the outputs are unavailable -exec ${HOME}/scripts/sway/displays.pl $(cat ${HOME}/.spool/last_display) & +exec ${HOME}/scripts/sway/displays.pl $(cat ${HOME}/.local/state/last_display) & # Enable automatic color temperature change exec ${HOME}/scripts/distrobox/debian/gammastep.pl & diff --git a/sway/bindings b/sway/bindings index a736f1c7e..4e4f28e81 100644 --- a/sway/bindings +++ b/sway/bindings @@ -258,7 +258,7 @@ bindsym $mod+Shift+Backspace move container to workspace back_and_forth ### Function row # Escape: Lock -bindsym $mod+Escape exec /usr/bin/kill -SIGUSR1 `cat ${HOME}/.spool/sway-transparency` +bindsym $mod+Escape exec /usr/bin/kill -SIGUSR1 `cat ${HOME}/.local/state/sway-transparency` # Add Shift: Blank screen bindsym $mod+Shift+Escape exec /usr/bin/sh -c "sleep 1 ; /usr/bin/kill -SIGUSR1 $(pgrep swayidle)" diff --git a/waybar/config.template b/waybar/config.template index 86c411b8a..a9785b37a 100644 --- a/waybar/config.template +++ b/waybar/config.template @@ -164,7 +164,7 @@ "custom/osk": { "interval": 1, "on-click": "${HOME}/scripts/waybar/waybar-keyboard.sh", - "exec": "if [ -e $HOME/.spool/onscreen-keyboard ]; then CLASS='activated'; else CLASS=''; fi; echo '⌨\nToggle onscreen keyboard\n'$CLASS", + "exec": "if [ -e $HOME/.local/state/onscreen-keyboard ]; then CLASS='activated'; else CLASS=''; fi; echo '⌨\nToggle onscreen keyboard\n'$CLASS", }, "custom/pkg": { "interval": 60, @@ -184,7 +184,7 @@ "activated": " ", "deactivated": " " }, - "on-click": "echo {status} > ${HOME}/.spool/idle_inhibitor" + "on-click": "echo {status} > ${HOME}/.local/state/idle_inhibitor" }, "custom/sleep_modes": { "interval": 1,