summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-09-13 10:29:35 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-09-13 10:29:35 +0200
commitb931543508377c0e48a6801e4ea217eb523e2b03 (patch)
tree373c8ab46c6e78cb69654d816fadf8d6fef1fd28 /accounts/gkleen@sif/default.nix
parent92dab2dbad09bee9698fc0a9734140af37ca550a (diff)
downloadnixos-b931543508377c0e48a6801e4ea217eb523e2b03.tar
nixos-b931543508377c0e48a6801e4ea217eb523e2b03.tar.gz
nixos-b931543508377c0e48a6801e4ea217eb523e2b03.tar.bz2
nixos-b931543508377c0e48a6801e4ea217eb523e2b03.tar.xz
nixos-b931543508377c0e48a6801e4ea217eb523e2b03.zip
...
Diffstat (limited to 'accounts/gkleen@sif/default.nix')
-rw-r--r--accounts/gkleen@sif/default.nix4
1 files changed, 3 insertions, 1 deletions
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 {
258 screen-locker = { 258 screen-locker = {
259 enable = true; 259 enable = true;
260 lockCmd = toString (pkgs.writeShellScript "lock" '' 260 lockCmd = toString (pkgs.writeShellScript "lock" ''
261 ${pkgs.playerctl}/bin/playerctl -a status | ${pkgs.gnugrep}/bin/grep -q "Playing" && exit 0
262
261 cleanup() { 263 cleanup() {
262 ${cfg.services.dunst.package}/bin/dunstctl set-paused false 264 ${cfg.services.dunst.package}/bin/dunstctl set-paused false
263 } 265 }
264 trap cleanup EXIT INT TERM 266 trap cleanup EXIT INT TERM
265 267
266 ${pkgs.playerctl}/bin/playerctl -a pause 268 # ${pkgs.playerctl}/bin/playerctl -a pause
267 ${cfg.services.dunst.package}/bin/dunstctl set-paused true 269 ${cfg.services.dunst.package}/bin/dunstctl set-paused true
268 ${pkgs.xsecurelock}/bin/xsecurelock 270 ${pkgs.xsecurelock}/bin/xsecurelock
269 ''); 271 '');