Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read device files from /sys/class/leds/ #7

Open
ritiek opened this issue Jan 27, 2024 · 1 comment
Open

Read device files from /sys/class/leds/ #7

ritiek opened this issue Jan 27, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ritiek
Copy link

ritiek commented Jan 27, 2024

Hi, thanks so much for making blight! I've been using it indirectly with SwayOSD.

I've got an ASUS laptop which has Screenpad 2.0 (trackpad as a second display) as well as got keyboard backlighting. It's got these device files respectively for it under /sys/class/leds/:

$ ls /sys/class/leds
asus::screenpad
asus::kbd_backlight

both these subdirectories have brightness and max_brightness files too.

For experimenting with blight, I changed the following line to /sys/class/leds:

pub const BLDIR: &str = "/sys/class/backlight";

and I was able to control both trackpad display's brightness as well as keyboard backlighting respectively fine using:

$ blight inc 10 -s -d asus::screenpad
$ blight inc 100 -d asus::kbd_backlight

Is it planned to include device files from /sys/class/leds/ (in addition to /sys/class/backlight/) here in blight's main source repo?

@VoltaireNoir
Copy link
Owner

Hi, I'm really glad you're finding blight useful.

I did realise that the interface to control LEDs is similar. Yes, the plan is to eventually add support for them in blight, hopefully in the next release.

But I don't know when that will be, because I'm somewhat occupied with work and other projects. PRs are always welcome :)

@VoltaireNoir VoltaireNoir added the enhancement New feature or request label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants