lupan-wm: M-S-F6 switchs theme, use st as terminal
st-lupan-0.8.5.diff adapted from http://st.suckless.org/patches/solarized/st-solarized-both-0.8.4.diff by - change to windi colors - switch colors with F6 or select with SIGUS1/SIGUSR2 - use font Iosevka Slab Light
This commit is contained in:
@ -23,7 +23,7 @@ emacsclient --eval nil -a '' &
|
||||
xsettingsd &
|
||||
|
||||
if which lupan-wm > /dev/null; then
|
||||
xsetroot -solid '#0ea5e9'
|
||||
xsetroot -solid '#4a4a4a'
|
||||
lupan-clock &
|
||||
xsetroot -cursor_name left_ptr
|
||||
exec lupan-wm -s 20
|
||||
|
36
xsession/bin/lupan-set-theme
Executable file
36
xsession/bin/lupan-set-theme
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
THEME="$1"
|
||||
|
||||
if [ "$THEME" = dark ]; then
|
||||
SIGNAL=USR1
|
||||
BGCOLOR=#4a4a4a
|
||||
elif [ "$THEME" = light ]; then
|
||||
SIGNAL=USR2
|
||||
BGCOLOR=#dde1e3
|
||||
else
|
||||
echo "error: unknown theme: should be either dark or light" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Background color
|
||||
xsetroot -solid "$BGCOLOR"
|
||||
|
||||
# Alacritty
|
||||
if [ -f ~/.config/alacritty/alacritty.yml ]; then
|
||||
sed -i "s/^colors: [*].*/colors: *lupan-$THEME/" ~/.config/alacritty/alacritty.yml
|
||||
fi
|
||||
|
||||
# ST (patched)
|
||||
pkill -$SIGNAL -x st
|
||||
|
||||
# GTK
|
||||
if [ -f ~/.config/xsettingsd/xsettingsd.conf ]; then
|
||||
sed -i -E "s#(Net/ThemeName) .*#\\1 \"Materia-$THEME\"#" ~/.config/xsettingsd/xsettingsd.conf
|
||||
pkill -HUP -x xsettingsd
|
||||
fi
|
||||
|
||||
# Emacs
|
||||
if which emacsclient > /dev/null; then
|
||||
emacsclient --eval "(my-select-theme '$THEME)"
|
||||
fi
|
Reference in New Issue
Block a user