From d7fd9dc98fbd9aaab84edd067df8be1d6656a505 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Tue, 29 Sep 2020 18:51:02 +0200 Subject: [PATCH] Update kitty to use unix domain sockets --- bin/updatecolors | 19 +++++++++++-------- kitty.conf | 5 +++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bin/updatecolors b/bin/updatecolors index b36cc0e..c923554 100755 --- a/bin/updatecolors +++ b/bin/updatecolors @@ -23,13 +23,16 @@ else theme=light fi -if which kitty; then - cat $HOME/darkrc/kitty_$theme.conf |\ - grep '^[[:alpha:]]' |\ - sed -s 's/ \+/=/' |\ - sed -s 's/^.*$/set-colors --all \0/' |\ - sort |\ - kitty @ >/dev/null -fi +for socket in $(find /tmp/ -maxdepth 1 -name "kitty-$USER-*") +do + if which kitty > /dev/null; then + cat $HOME/darkrc/kitty_$theme.conf |\ + grep '^[[:alpha:]]' |\ + sed -s 's/ \+/=/' |\ + sed -s 's/^.*$/set-colors --all \0/' |\ + sort |\ + kitty @ --to unix:$socket >/dev/null + fi +done pkill -HUP conky diff --git a/kitty.conf b/kitty.conf index 93dd23b..38a9e17 100644 --- a/kitty.conf +++ b/kitty.conf @@ -1,3 +1,6 @@ +allow_remote_control yes +listen_on unix:/tmp/kitty-${USER}-{kitty_pid} + font_family Hack font_size 14 @@ -9,5 +12,3 @@ background_opacity 1.0 window_margin_width 0 window_padding_width 0 - -allow_remote_control yes