lupan-set-theme: do not change background and emacs theme

This commit is contained in:
Łukasz Pankowski 2023-12-02 14:39:03 +01:00
parent 89e648a623
commit e0b0aa1dc5

View File

@ -11,21 +11,14 @@ if [ "$THEME" = "toggle" ]; then
fi
if [ "$THEME" = dark ]; then
BGCOLOR=#4a4a4a
GTK_THEME=Materia-dark
elif [ "$THEME" = light ]; then
BGCOLOR=#cacaca
GTK_THEME=Materia-light
else
echo "error: unknown theme: should be either dark, light or toggle" >&2
exit 1
fi
# Background color
if [ ! -x ~/.fehbg ]; then
hsetroot -solid "$BGCOLOR"
fi
# Alacritty
if [ -f ~/.config/alacritty/alacritty.yml ]; then
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml
@ -36,8 +29,3 @@ if [ -f ~/.config/xsettingsd/xsettingsd.conf ]; then
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" ~/.config/xsettingsd/xsettingsd.conf
pkill -HUP -x xsettingsd
fi
# Emacs
if which emacsclient > /dev/null; then
emacsclient --eval "(my-select-theme '$THEME)"
fi