fix wall-change not exiting after changing the wallpaper
This commit is contained in:
parent
89a27c5d15
commit
00bb0413fb
|
@ -1,5 +1,5 @@
|
||||||
{pkgs, ...}: let
|
{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);
|
wallpaper-picker = pkgs.writeShellScriptBin "wallpaper-picker" (builtins.readFile ./scripts/wallpaper-picker.sh);
|
||||||
|
|
||||||
runbg = pkgs.writeShellScriptBin "runbg" (builtins.readFile ./scripts/runbg.sh);
|
runbg = pkgs.writeShellScriptBin "runbg" (builtins.readFile ./scripts/runbg.sh);
|
||||||
|
|
9
modules/home/scripts/scripts/wall-change.sh
Executable file
9
modules/home/scripts/scripts/wall-change.sh
Executable 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
|
Loading…
Reference in a new issue