diff --git a/zen/native_app/app.fish b/zen/native_app/app.fish index b977933..cc2d144 100755 --- a/zen/native_app/app.fish +++ b/zen/native_app/app.fish @@ -10,10 +10,11 @@ function message -a msg end set -q XDG_STATE_HOME && set -l state $XDG_STATE_HOME || set -l state $HOME/.local/state -set -l scheme_path $state/caelestia/scheme.json +set -l state_dir $state/caelestia +set -l scheme_path $state_dir/scheme.json message (jq -c . $scheme_path) -inotifywait -q -e 'close_write,moved_to,create' -m (dirname $scheme_path) | while read dir events file +inotifywait -q -e 'close_write,moved_to,create' -m $state_dir | while read dir events file test "$dir$file" = $scheme_path && message (jq -c . $scheme_path) end