swayidle: adjust brightness after resume

This commit is contained in:
teutat3s 2022-10-17 22:14:18 +02:00
parent c88016af85
commit 28f1bd66f0
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -10,8 +10,9 @@
Service = { Service = {
Type = "simple"; Type = "simple";
Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin:${pkgs.swaylock-bg}/bin:${pkgs.swayidle}/bin"; 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 'swaymsg "output * dpms on"' \
after-resume '${pkgs.brightnessctl}/bin/brightnessctl -d gmux_backlight set 60%' \
before-sleep 'swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ before-sleep 'swaylock-bg' '' + (if psCfg.paranoia.enable then '' \
timeout 120 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ timeout 120 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
timeout 150 'systemctl hibernate' timeout 150 'systemctl hibernate'