From c297f378f53e09e6ed6a15af989050f4623d6414 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 31 May 2022 15:02:51 +0200 Subject: [PATCH] sway: Simplify DPMS toggling Fixes #59. --- users/simon/modules/sway/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/simon/modules/sway/default.nix b/users/simon/modules/sway/default.nix index e1d65b3..ae8f70b 100644 --- a/users/simon/modules/sway/default.nix +++ b/users/simon/modules/sway/default.nix @@ -167,7 +167,7 @@ in # Locking and DPMS "${cfg.modifier}+y" = "exec ${pkgs.swaylock}/bin/swaylock -f -i ${wallpaper}"; - "--no-repeat --locked ${cfg.modifier}+q" = ''exec 'test $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq "[.[].dpms] | any") = "true" && swaymsg "output * dpms off" || swaymsg "output * dpms on"''; + "--no-repeat --locked ${cfg.modifier}+q" = "output - dpms toggle"; # Notifications "${cfg.modifier}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t";