From 7ab3eb1456f476f9da509a07b66ea1211bef2ac3 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 16 Mar 2021 15:59:21 +0100 Subject: [PATCH] fixed theme toggle for kitty --- .config/kitty/kitty.conf | 2 ++ .config/scripts/toggle_theme.sh | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index d4431c0..48f0637 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -9,6 +9,8 @@ font_size 10.0 include themes/current.conf 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+v paste_from_clipboard diff --git a/.config/scripts/toggle_theme.sh b/.config/scripts/toggle_theme.sh index bda94b8..7439d3f 100755 --- a/.config/scripts/toggle_theme.sh +++ b/.config/scripts/toggle_theme.sh @@ -71,7 +71,7 @@ xrdb "$PATH_THEME/current" # kitty PATH_THEME="$XDG_CONFIG_HOME/kitty/themes" - +SOCKET="/tmp/kitty-"$(pgrep kitty) case "$1" in light) cp "$PATH_THEME/onehalf-light.conf" "$PATH_THEME/current.conf" @@ -81,7 +81,8 @@ case "$1" in ;; 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 op