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.
 
 
 
 
 

81 lines
1.6 KiB

#!/bin/zsh
# TODO
# bspwm
# gtk3
# emacs
# firefox
# dunst
# ncmpcpp? uses xresources, but might want customizations
# nvim
#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"
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
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