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

Needs feedback on toggle #3

Open
IoanaAlexandru opened this issue Mar 27, 2018 · 5 comments
Open

Needs feedback on toggle #3

IoanaAlexandru opened this issue Mar 27, 2018 · 5 comments

Comments

@IoanaAlexandru
Copy link

Hello! Not sure if this is already implemented and not working for my machine, but here...

I have an Asus Zenbook UX410UQ, Ubuntu 17.10, 4.13.0-37-generic.

To enable the ambient light sensor, I first tried the first answer here but ran into some issues (I could enable, but not disable the service), so I decided to use your (amazingly done) daemon.

Only issue I have is I don't seem to have a way of seeing which option is active at any time aside from using FN+A to toggle between options and guessing which is which. It would be amazing if there was a system notification every time the service is toggled, saying something like "Ambient Light Sensor Enabled/Disabled". I would also like to be able to turn off the Max brightness option.

@J3r3Xy
Copy link

J3r3Xy commented Oct 3, 2018

The max brightness option can be turned off since last commit db1fa25
I too agree on the feedback on toggle, maybe call notify-send?
To know status via GUI it probably needs to be implemented into the DE, right?

@mikhail-m1
Copy link
Owner

I tried to make it, but it's not easy to create a user notification from a daemon process. I found that notify-send only works if HOME env variable is set up to a home dir of a current user. Maybe once I will try to find a crate to make it.

@cary-geoffroy
Copy link

cary-geoffroy commented Aug 15, 2020

Hello @mikhail-m1,

Thanks for you work, it's really great

For this feature,
In the line

if let Err(e) = write_u32_to_file(config.backlight_filename(), value) {
,
instead of writing directly on the /proc file
you can signal the change to the operating system with ACPI tool :

  • constants are available in this file :
$ dpkg -S /usr/share/acpi-support/key-constants
acpi-support: /usr/share/acpi-support/key-constants

$ grep -P '=22[45]' /usr/share/acpi-support/key-constants
KEY_BRIGHTNESSDOWN=224
KEY_BRIGHTNESSUP=225
  • the brightness state could be changed with acpi_fakekey command or with a printf in the FIFO file :
$ sudo acpi_fakekey 224
root@flying-linux-cary:~# printf '\340' > /var/run/acpi_fakekey

$ sudo acpi_fakekey 225
root@flying-linux-cary:~# printf '\341' > /var/run/acpi_fakekey

I don't know if it's a good idea and i'm not familiar with this coding language

Cheers,

Cary

@mikhail-m1
Copy link
Owner

@cary-geoffroy thanks for the suggestion, but as I understand the issue is about notifications for <FN>-A. And I think notifications about back light level change would be really annoying.

@cary-geoffroy
Copy link

cary-geoffroy commented Aug 18, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants