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.

53 lines
1.1 KiB

4 years ago
4 years ago
4 years ago
  1. #!/bin/zsh
  2. #x11
  3. PATH_THEME="$XDG_CONFIG_HOME/X11/colors"
  4. case "$1" in
  5. light)
  6. cp "$PATH_THEME/onehalf-light" "$PATH_THEME/current"
  7. ;;
  8. dark)
  9. cp "$PATH_THEME/onehalf-dark" "$PATH_THEME/current"
  10. ;;
  11. esac
  12. xrdb "$PATH_THEME/current"
  13. # kitty
  14. PATH_THEME="$XDG_CONFIG_HOME/kitty/themes"
  15. case "$1" in
  16. light)
  17. cp "$PATH_THEME/onehalf-light.conf" "$PATH_THEME/current.conf"
  18. ;;
  19. dark)
  20. cp "$PATH_THEME/onehalf-dark.conf" "$PATH_THEME/current.conf"
  21. ;;
  22. esac
  23. kitty @ set-colors --all --configured "$PATH_THEME/current.conf" > /dev/null
  24. tput sgr0
  25. tput op
  26. # zsh
  27. # highlighting needs to be changed
  28. PATH_THEME="$XDG_CONFIG_HOME/zsh"
  29. case "$1" in
  30. light)
  31. cp "$PATH_THEME/theme_light" "$PATH_THEME/theme_current"
  32. ;;
  33. dark)
  34. cp "$PATH_THEME/theme_dark" "$PATH_THEME/theme_current"
  35. ;;
  36. esac
  37. source $PATH_THEME/theme_current
  38. # sourcing not enough to change autosuggestion color
  39. # exec updates current window and newly created,
  40. # but not other currently open terminals
  41. exec zsh