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

4 years ago
4 years ago
4 years ago
4 years ago
  1. #!/bin/zsh
  2. # TODO
  3. # bspwm
  4. # gtk3
  5. # emacs
  6. # firefox
  7. # dunst
  8. # ncmpcpp? uses xresources, but might want customizations
  9. # nvim
  10. #polybar
  11. PATH_THEME="$XDG_CONFIG_HOME/polybar/themes"
  12. case "$1" in
  13. light)
  14. cp "$PATH_THEME/onehalf-light.ini" "$PATH_THEME/current.ini"
  15. ;;
  16. dark)
  17. cp "$PATH_THEME/onehalf-dark.ini" "$PATH_THEME/current.ini"
  18. ;;
  19. esac
  20. if pgrep -u $UID -x polybar >/dev/null; then
  21. killall -q polybar
  22. polybar -c ~/.config/polybar/config.ini main &
  23. polybar -c ~/.config/polybar/config.ini system &
  24. fi
  25. #x11
  26. PATH_THEME="$XDG_CONFIG_HOME/X11/colors"
  27. case "$1" in
  28. light)
  29. cp "$PATH_THEME/onehalf-light" "$PATH_THEME/current"
  30. ;;
  31. dark)
  32. cp "$PATH_THEME/onehalf-dark" "$PATH_THEME/current"
  33. ;;
  34. esac
  35. xrdb "$PATH_THEME/current"
  36. # kitty
  37. PATH_THEME="$XDG_CONFIG_HOME/kitty/themes"
  38. case "$1" in
  39. light)
  40. cp "$PATH_THEME/onehalf-light.conf" "$PATH_THEME/current.conf"
  41. ;;
  42. dark)
  43. cp "$PATH_THEME/onehalf-dark.conf" "$PATH_THEME/current.conf"
  44. ;;
  45. esac
  46. kitty @ set-colors --all --configured "$PATH_THEME/current.conf" > /dev/null
  47. tput sgr0
  48. tput op
  49. # zsh
  50. # highlighting needs to be changed
  51. PATH_THEME="$XDG_CONFIG_HOME/zsh"
  52. case "$1" in
  53. light)
  54. cp "$PATH_THEME/theme_light" "$PATH_THEME/theme_current"
  55. ;;
  56. dark)
  57. cp "$PATH_THEME/theme_dark" "$PATH_THEME/theme_current"
  58. ;;
  59. esac
  60. source $PATH_THEME/theme_current
  61. # sourcing not enough to change autosuggestion color
  62. # exec updates current window and newly created,
  63. # but not other currently open terminals
  64. exec zsh