You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
2.2 KiB
107 lines
2.2 KiB
#!/bin/zsh
|
|
|
|
# TODO
|
|
# bspwm
|
|
# emacs
|
|
# firefox
|
|
# dunst
|
|
# ncmpcpp? uses xresources, but might want customizations
|
|
# nvim
|
|
|
|
#gtk3
|
|
|
|
PATH_THEME="$XDG_CONFIG_HOME/gtk-3.0/themes"
|
|
|
|
case "$1" in
|
|
light)
|
|
cp "$PATH_THEME/onehalf-light.css" "$PATH_THEME/colors_current.css"
|
|
;;
|
|
dark)
|
|
cp "$PATH_THEME/onehalf-dark.css" "$PATH_THEME/colors_current.css"
|
|
;;
|
|
esac
|
|
|
|
#rofi
|
|
|
|
PATH_THEME="$XDG_CONFIG_HOME/rofi/themes"
|
|
|
|
case "$1" in
|
|
light)
|
|
cp "$PATH_THEME/onehalf-light.rasi" "$PATH_THEME/current.rasi"
|
|
;;
|
|
dark)
|
|
cp "$PATH_THEME/onehalf-dark.rasi" "$PATH_THEME/current.rasi"
|
|
;;
|
|
esac
|
|
|
|
#polybar
|
|
|
|
PATH_THEME="$XDG_CONFIG_HOME/polybar/themes"
|
|
|
|
case "$1" in
|
|
light)
|
|
cp "$PATH_THEME/onehalf-light.ini" "$PATH_THEME/current.ini"
|
|
;;
|
|
dark)
|
|
cp "$PATH_THEME/onehalf-dark.ini" "$PATH_THEME/current.ini"
|
|
;;
|
|
esac
|
|
|
|
if pgrep -u $UID -x polybar >/dev/null; then
|
|
killall -q polybar
|
|
polybar -c ~/.config/polybar/config.ini main &
|
|
polybar -c ~/.config/polybar/config.ini system &
|
|
fi
|
|
|
|
#x11
|
|
|
|
PATH_THEME="$XDG_CONFIG_HOME/X11/colors"
|
|
|
|
case "$1" in
|
|
light)
|
|
cp "$PATH_THEME/onehalf-light" "$PATH_THEME/current"
|
|
;;
|
|
dark)
|
|
cp "$PATH_THEME/onehalf-dark" "$PATH_THEME/current"
|
|
;;
|
|
esac
|
|
|
|
xrdb "$PATH_THEME/current"
|
|
|
|
# kitty
|
|
|
|
PATH_THEME="$XDG_CONFIG_HOME/kitty/themes"
|
|
SOCKET="/tmp/kitty-"$(pgrep kitty)
|
|
case "$1" in
|
|
light)
|
|
cp "$PATH_THEME/onehalf-light.conf" "$PATH_THEME/current.conf"
|
|
;;
|
|
dark)
|
|
cp "$PATH_THEME/onehalf-dark.conf" "$PATH_THEME/current.conf"
|
|
;;
|
|
esac
|
|
|
|
#kitty @ set-colors --all --configured "$PATH_THEME/current.conf" > /dev/null
|
|
kitty @ --to=unix:$SOCKET set-colors --all --configured "$PATH_THEME/current.conf"
|
|
tput sgr0
|
|
tput op
|
|
|
|
# zsh
|
|
# highlighting needs to be changed
|
|
|
|
PATH_THEME="$XDG_CONFIG_HOME/zsh"
|
|
|
|
case "$1" in
|
|
light)
|
|
cp "$PATH_THEME/theme_light" "$PATH_THEME/theme_current"
|
|
;;
|
|
dark)
|
|
cp "$PATH_THEME/theme_dark" "$PATH_THEME/theme_current"
|
|
;;
|
|
esac
|
|
|
|
source $PATH_THEME/theme_current
|
|
# sourcing not enough to change autosuggestion color
|
|
# exec updates current window and newly created,
|
|
# but not other currently open terminals
|
|
exec zsh
|