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.

106 lines
2.1 KiB

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