Browse Source

theme toggler

master
Marc 4 years ago
parent
commit
ae2fd6150a
1 changed files with 36 additions and 2 deletions
  1. 38
      .config/scripts/toggle_theme.sh

38
.config/scripts/toggle_theme.sh

@ -1,4 +1,19 @@
#! /usr/bin/env bash
#!/bin/zsh
#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 # kitty
@ -13,7 +28,26 @@ case "$1" in
;; ;;
esac esac
kitty @ set-colors --all "$PATH_THEME/current.conf" > /dev/null
kitty @ set-colors --all --configured "$PATH_THEME/current.conf" > /dev/null
tput sgr0 tput sgr0
tput op 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
Loading…
Cancel
Save