Merge pull request #18 from sleeyax/fix/wall-change

Fix wall-change not exiting after changing the wallpaper
This commit is contained in:
Frost-Phoenix 2024-05-25 13:37:58 +02:00 committed by GitHub
commit 4895225ed9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -1,5 +1,5 @@
{pkgs, ...}: let
wall-change = pkgs.writeShellScriptBin "wall-change" ''swaybg -m fill -i $1'';
wall-change = pkgs.writeShellScriptBin "wall-change" (builtins.readFile ./scripts/wall-change.sh);
wallpaper-picker = pkgs.writeShellScriptBin "wallpaper-picker" (builtins.readFile ./scripts/wallpaper-picker.sh);
runbg = pkgs.writeShellScriptBin "runbg" (builtins.readFile ./scripts/runbg.sh);

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
PIDS=$(pgrep -f "swaybg")
swaybg -m fill -i $1 &
if [ -n "$PIDS" ]; then
echo "$PIDS" | xargs kill
fi