Merge pull request #2518 from idm1try/fix-bl-asahi

fix(backlight): wrong percentage numbers for device apple-panel-bl
pull/2534/head
Alexis Rouillard 2023-09-21 23:47:23 +02:00 committed by GitHub
commit 5960e8f1ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

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

View File

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