fix(backlight): wrong percentage numbers for device apple-panel-bl

This commit is contained in:
idm1try 2023-09-19 18:50:39 +05:00
parent 4d32991bee
commit 388c024298
3 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
genSystems = lib.genAttrs [ genSystems = lib.genAttrs [
"x86_64-linux" "x86_64-linux"
"aarch64-linux"
]; ];
pkgsFor = genSystems (system: pkgsFor = genSystems (system:

1
result Symbolic link
View File

@ -0,0 +1 @@
/nix/store/0pz53p83i16kv8ff5pwxhpp7zvmxapm9-waybar-0.9.22+date=2023-09-13_dirty

View File

@ -244,7 +244,7 @@ void waybar::modules::Backlight::upsert_device(ForwardIt first, ForwardIt last,
check_nn(name); check_nn(name);
const char *actual_brightness_attr = const char *actual_brightness_attr =
strncmp(name, "amdgpu_bl", 9) == 0 ? "brightness" : "actual_brightness"; strncmp(name, "amdgpu_bl", 9) == 0 ? "brightness" : strcmp(name, "apple-panel-bl") == 0 ? "brightness" : "actual_brightness";
const char *actual = udev_device_get_sysattr_value(dev, actual_brightness_attr); const char *actual = udev_device_get_sysattr_value(dev, actual_brightness_attr);
const char *max = udev_device_get_sysattr_value(dev, "max_brightness"); const char *max = udev_device_get_sysattr_value(dev, "max_brightness");