caelestia/scripts/monitor-scheme.fish
2025-01-20 16:51:00 +11:00

8 lines
297 B
Fish
Executable file

#!/bin/fish
set -q XDG_CACHE_HOME && set cache $XDG_CACHE_HOME || set cache ~/.cache
set scheme_path $cache/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