caelestia/scripts/monitor-scheme.fish
2025-02-22 14:22:52 +11:00

8 lines
316 B
Fish
Executable file

#!/bin/fish
set -q XDG_STATE_HOME && set -l state $XDG_STATE_HOME || set -l state $HOME/.local/state
set -l scheme_path $state/caelestia/scheme/current.txt
inotifywait -e 'close_write,moved_to,create' -m (dirname $scheme_path) | while read dir events file
test "$dir$file" = $scheme_path && hyprctl reload
end