From 3091a94b24a9403ac50aab38b06f52dbc935b898 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 4 May 2025 21:43:22 +0200 Subject: 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). --- modules/by-name/lf/lf/commands/scripts/set_wallpaper.sh | 4 ++-- 1 file 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` -- cgit 1.4.1