From 7c6235512d4486ad341041ef1e4a517decb8ef69 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 5 May 2023 18:35:39 +0200 Subject: [PATCH] dumpyourvms: linux 6.4 remembers screen brightness Using acpi_video0 for changing the brightness with keyboard hotkeys --- hosts/dumpyourvms/.config/sway/config.d/input-defaults.conf | 4 ++-- modules/sway/swayidle.service.nix | 1 - profiles/base-user/.config/waybar/config | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hosts/dumpyourvms/.config/sway/config.d/input-defaults.conf b/hosts/dumpyourvms/.config/sway/config.d/input-defaults.conf index 83d3b2cb..871aada3 100644 --- a/hosts/dumpyourvms/.config/sway/config.d/input-defaults.conf +++ b/hosts/dumpyourvms/.config/sway/config.d/input-defaults.conf @@ -18,8 +18,8 @@ input "type:touchpad" { #bindsym XF86TouchpadToggle exec $HOME/Workspace/ben/toggletouchpad.sh # toggle touchpad # Screen brightness controls -bindsym XF86MonBrightnessUp exec "brightnessctl -d gmux_backlight set +10%" -bindsym XF86MonBrightnessDown exec "brightnessctl -d gmux_backlight set 10%-" +bindsym XF86MonBrightnessUp exec "brightnessctl -d acpi_video0 set +10%" +bindsym XF86MonBrightnessDown exec "brightnessctl -d acpi_video0 set 10%-" # Keyboard backlight brightness controls bindsym XF86KbdBrightnessDown exec "brightnessctl -d smc::kbd_backlight set 10%-" diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index a785e109..9fd8cc25 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -16,7 +16,6 @@ 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 diff --git a/profiles/base-user/.config/waybar/config b/profiles/base-user/.config/waybar/config index 8721e5e6..42212bd0 100644 --- a/profiles/base-user/.config/waybar/config +++ b/profiles/base-user/.config/waybar/config @@ -62,7 +62,7 @@ } }, "backlight": { - "device": "gmux_backlight", + "device": "acpi_video0", "format": " {percent}% {icon}", "format-icons": ["", ""] },