diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-05-04 21:43:22 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-05-04 21:43:22 +0200 |
commit | 3091a94b24a9403ac50aab38b06f52dbc935b898 (patch) | |
tree | 7bde9fb096094a79bcdf04876dffea5ebcf2f904 /modules | |
parent | pkgs/mpp-lyrics: Use correct beets music directory (diff) | |
download | nixos-config-3091a94b24a9403ac50aab38b06f52dbc935b898.zip |
modules/lf/commands/set_wallpaper: Use `pkill` instead of pgrep and kill
This will actually work if multiple `swaybg` instances are running (the previous code would have simply failed).
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/set_wallpaper.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/by-name/lf/lf/commands/scripts/set_wallpaper.sh b/modules/by-name/lf/lf/commands/scripts/set_wallpaper.sh index ba887032..6311031e 100755 --- a/modules/by-name/lf/lf/commands/scripts/set_wallpaper.sh +++ b/modules/by-name/lf/lf/commands/scripts/set_wallpaper.sh @@ -19,8 +19,8 @@ fs="$fs" # shellcheck disable=SC2269 id="$id" -pid="$(pgrep swaybg)" -[ -n "$pid" ] && kill "$pid" +# Kill all previous instances +pkill swaybg # We cannot control the available commands for river. # Thus we ensure that it can correctly start `swaybg` |