Browse Source

fixed theme toggle for kitty

master
Marc 3 years ago
parent
commit
7ab3eb1456
2 changed files with 5 additions and 2 deletions
  1. 2
      .config/kitty/kitty.conf
  2. 5
      .config/scripts/toggle_theme.sh

2
.config/kitty/kitty.conf

@ -9,6 +9,8 @@ font_size 10.0
include themes/current.conf include themes/current.conf
allow_remote_control yes allow_remote_control yes
# necessary to run kitty @ commands from outside kitty
listen_on unix:/tmp/kitty
#map ctrl+c copy_to_clipboard #map ctrl+c copy_to_clipboard
map ctrl+v paste_from_clipboard map ctrl+v paste_from_clipboard

5
.config/scripts/toggle_theme.sh

@ -71,7 +71,7 @@ xrdb "$PATH_THEME/current"
# kitty # kitty
PATH_THEME="$XDG_CONFIG_HOME/kitty/themes" PATH_THEME="$XDG_CONFIG_HOME/kitty/themes"
SOCKET="/tmp/kitty-"$(pgrep kitty)
case "$1" in case "$1" in
light) light)
cp "$PATH_THEME/onehalf-light.conf" "$PATH_THEME/current.conf" cp "$PATH_THEME/onehalf-light.conf" "$PATH_THEME/current.conf"
@ -81,7 +81,8 @@ case "$1" in
;; ;;
esac esac
kitty @ set-colors --all --configured "$PATH_THEME/current.conf" > /dev/null
#kitty @ set-colors --all --configured "$PATH_THEME/current.conf" > /dev/null
kitty @ --to=unix:$SOCKET set-colors --all --configured "$PATH_THEME/current.conf"
tput sgr0 tput sgr0
tput op tput op

Loading…
Cancel
Save