From b931543508377c0e48a6801e4ea217eb523e2b03 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 13 Sep 2022 10:29:35 +0200 Subject: ... --- accounts/gkleen@sif/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'accounts') diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index d3db91c8..2cfaa620 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -258,12 +258,14 @@ in { screen-locker = { enable = true; lockCmd = toString (pkgs.writeShellScript "lock" '' + ${pkgs.playerctl}/bin/playerctl -a status | ${pkgs.gnugrep}/bin/grep -q "Playing" && exit 0 + cleanup() { ${cfg.services.dunst.package}/bin/dunstctl set-paused false } trap cleanup EXIT INT TERM - ${pkgs.playerctl}/bin/playerctl -a pause + # ${pkgs.playerctl}/bin/playerctl -a pause ${cfg.services.dunst.package}/bin/dunstctl set-paused true ${pkgs.xsecurelock}/bin/xsecurelock ''); -- cgit v1.2.3