about summary refs log tree commit diff stats
path: root/modules/by-name
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-05-04 21:43:22 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-05-04 21:43:22 +0200
commit3091a94b24a9403ac50aab38b06f52dbc935b898 (patch)
tree7bde9fb096094a79bcdf04876dffea5ebcf2f904 /modules/by-name
parentpkgs/mpp-lyrics: Use correct beets music directory (diff)
downloadnixos-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/by-name')
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/set_wallpaper.sh4
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`