fix: theme ssot
This commit is contained in:
parent
026074a7fe
commit
9717cf3948
4 changed files with 14 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
_tf="${XDG_STATE_HOME:-$HOME/.local/state}/theme"
|
||||||
|
THEME="$(cat "$_tf" 2>/dev/null)" || THEME="midnight"
|
||||||
|
export THEME
|
||||||
|
unset _tf
|
||||||
|
|
||||||
shopt -s autocd cdspell dirspell globstar histappend
|
shopt -s autocd cdspell dirspell globstar histappend
|
||||||
|
|
||||||
HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/bash_history"
|
HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/bash_history"
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,6 @@ in
|
||||||
CLAUDE_CONFIG_DIR = "${config.xdg.configHome}/claude";
|
CLAUDE_CONFIG_DIR = "${config.xdg.configHome}/claude";
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
THEME = config.theme;
|
|
||||||
INPUTRC = "${repoDir}/config/bash/inputrc";
|
INPUTRC = "${repoDir}/config/bash/inputrc";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,10 @@ in
|
||||||
[ -f "$_hm/etc/profile.d/hm-session-vars.sh" ] && . "$_hm/etc/profile.d/hm-session-vars.sh" && break
|
[ -f "$_hm/etc/profile.d/hm-session-vars.sh" ] && . "$_hm/etc/profile.d/hm-session-vars.sh" && break
|
||||||
done
|
done
|
||||||
unset _hm
|
unset _hm
|
||||||
|
_tf="''${XDG_STATE_HOME:-$HOME/.local/state}/theme"
|
||||||
|
THEME="$(cat "$_tf" 2>/dev/null)" || THEME="midnight"
|
||||||
|
export THEME
|
||||||
|
unset _tf
|
||||||
if [ "$(tty)" = "/dev/tty1" ]; then
|
if [ "$(tty)" = "/dev/tty1" ]; then
|
||||||
exec Hyprland
|
exec Hyprland
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,11 @@ fi
|
||||||
[ -z "$theme" ] && exit 1
|
[ -z "$theme" ] && exit 1
|
||||||
echo "$themes" | grep -Fxq "$theme" || exit 1
|
echo "$themes" | grep -Fxq "$theme" || exit 1
|
||||||
|
|
||||||
|
state_dir="${XDG_STATE_HOME:-$HOME/.local/state}"
|
||||||
|
mkdir -p "$state_dir"
|
||||||
|
printf '%s\n' "$theme" > "$state_dir/theme"
|
||||||
|
export THEME="$theme"
|
||||||
|
|
||||||
case "$(uname)" in
|
case "$(uname)" in
|
||||||
Linux)
|
Linux)
|
||||||
case "$theme" in
|
case "$theme" in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue