Update Brightness.ts to grab a keyboard backlight device. (#316)

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
Mark Arranz
2024-10-13 02:31:32 -07:00
committed by GitHub
parent 2e66d801fd
commit aa7bb74226

View File

@@ -5,7 +5,7 @@ if (!dependencies('brightnessctl')) App.quit();
const get = (args: string): number => Number(Utils.exec(`brightnessctl ${args}`)); const get = (args: string): number => Number(Utils.exec(`brightnessctl ${args}`));
const screen = await bash`ls -w1 /sys/class/backlight | head -1`; const screen = await bash`ls -w1 /sys/class/backlight | head -1`;
const kbd = await bash`ls -w1 /sys/class/leds | head -1`; const kbd = await bash`ls -w1 /sys/class/leds | grep '::kbd_backlight$' | head -1`;
class Brightness extends Service { class Brightness extends Service {
static { static {