From 24ac3cd2e11c114ef4c8ae1284953c8928f4a820 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?=
 <yps@yaroslavps.com>
Date: Tue, 20 Sep 2022 21:26:44 +0300
Subject: A way to change colors dynamically with foot

Also some cleanup
---
 dotfiles/.config/zsh/.zshrc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'dotfiles/.config/zsh')

diff --git a/dotfiles/.config/zsh/.zshrc b/dotfiles/.config/zsh/.zshrc
index a7f3000..aa1bc69 100644
--- a/dotfiles/.config/zsh/.zshrc
+++ b/dotfiles/.config/zsh/.zshrc
@@ -69,7 +69,11 @@ zle -N zle-keymap-select
 
 [ -f "$HOME/.config/zsh/shortcuts" ] && . "$HOME/.config/zsh/shortcuts"
 
-[ -f "$HOME/.cache/colorscheme" ] && trap "source $HOME/.cache/colorscheme" DEBUG
+if [ -f "$HOME/.cache/colorscheme" ]; then
+	trap "source $HOME/.cache/colorscheme && shtheme ultramar-\$COLORSCHEME" SIGUSR1
+	source $HOME/.cache/colorscheme
+	shtheme ultramar-$COLORSCHEME
+fi
 
 if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]
 then
-- 
cgit v1.2.3