sway: Simplify DPMS toggling

Fixes #59.
This commit is contained in:
Simon Bruder 2022-05-31 15:02:51 +02:00
parent 8de4852418
commit c297f378f5
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -167,7 +167,7 @@ in
# Locking and DPMS # Locking and DPMS
"${cfg.modifier}+y" = "exec ${pkgs.swaylock}/bin/swaylock -f -i ${wallpaper}"; "${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 # Notifications
"${cfg.modifier}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t"; "${cfg.modifier}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t";