fix(backlight): use --class=backlight for brightnessctl

This commit is contained in:
Infinidoge 2022-04-15 15:26:25 -04:00
parent a436ad2b88
commit d1dfc4bae4
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ in
options.modules.hardware.backlight = with types; {
enable = mkBoolOpt false;
initialValue = mkOpt str "50%";
initialCommand = mkOpt str "${getMainProgram pkgs.brightnessctl} set ${cfg.initialValue}";
initialCommand = mkOpt str "${getMainProgram pkgs.brightnessctl} set ${cfg.initialValue} --class=backlight";
};
config.systemd.services = mkIf cfg.enable {

View file

@ -597,7 +597,7 @@ def init_widget_list(main=True, laptop=False):
]
if (
backlight := run_command(
"brightnessctl -lm | grep backlight"
"brightnessctl -lm --class=backlight"
)
)
else []