From ef97a891c0d00a776c7ea1d35bc49e0f5be6962e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 22 Feb 2025 22:15:10 +1100 Subject: [PATCH] scheme: fix scheme update Fix not updating until next reload --- scripts/gen-scheme.fish | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/gen-scheme.fish b/scripts/gen-scheme.fish index 9fdb802..750b3ce 100755 --- a/scripts/gen-scheme.fish +++ b/scripts/gen-scheme.fish @@ -11,7 +11,12 @@ set -q XDG_STATE_HOME && set -l state $XDG_STATE_HOME || set -l state $HOME/.loc set -l scheme_path $state/caelestia/scheme/current.txt if test -f $scheme_path - read-scheme $scheme_path > ~/.config/hypr/scheme/current.conf + set -l tmp (mktemp) + read-scheme $scheme_path > $tmp + if ! cmp -s $tmp ~/.config/hypr/scheme/current.conf + cp $tmp ~/.config/hypr/scheme/current.conf + hyprctl reload + end else - cp -f ~/.config/hypr/scheme/default.conf ~/.config/hypr/scheme/current.conf + cp ~/.config/hypr/scheme/default.conf ~/.config/hypr/scheme/current.conf end