mikhail-m1 / illuminanced

Ambient Light Sensor Daemon for Linux
GNU General Public License v3.0
60 stars 19 forks source link

Needs feedback on toggle #3

Open IoanaAlexandru opened 6 years ago

IoanaAlexandru commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 4 years ago

Hello @mikhail-m1,

Thanks for you work, it's really great

For this feature, In the line https://github.com/mikhail-m1/illuminanced/blob/c1ebdc7ae7d6d9fef85cc8bb1470962652849fd2/src/main.rs#L136, instead of writing directly on the /proc file you can signal the change to the operating system with ACPI tool :

$ 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 commented 4 years ago

@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 commented 4 years ago

That's true It could be annoying, Thanks for your feedback

Cary

Le lun. 17 août 2020 à 13:45, Mikhail Modin notifications@github.com a écrit :

@cary-geoffroy https://github.com/cary-geoffroy thanks for the suggestion, but as I understand the issue is about notifications for

-A. And I think notifications about back light level change would be really annoying. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .