From 28f1bd66f02cf8f4aca80d44901a0995c74d6777 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 17 Oct 2022 22:14:18 +0200 Subject: [PATCH] swayidle: adjust brightness after resume --- modules/sway/swayidle.service.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index 80a04518..cb78f6ce 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -10,8 +10,9 @@ Service = { Type = "simple"; Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin:${pkgs.swaylock-bg}/bin:${pkgs.swayidle}/bin"; - ExecStart = ''swayidle -w \ + ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ after-resume 'swaymsg "output * dpms on"' \ + after-resume '${pkgs.brightnessctl}/bin/brightnessctl -d gmux_backlight set 60%' \ before-sleep 'swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ timeout 120 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ timeout 150 'systemctl hibernate'