velum / lguf-brightness

Adjust brightness for LG UltraFine 4K display (cross platform)
49 stars 11 forks source link

Possible to run in non-interactive mode? #4

Open trbjo opened 5 years ago

trbjo commented 5 years ago

I would like to be able to bind hotkeys to increment or decrement the brightness.

This would allow me to just press XF86MonBrightnessDown or XF86MonBrightnessUp directly on the keyboard instead of having to fire up a terminal and running the program interactively each time.

So a sort of command mode. E.g. /usr/bin/lguf_brightness --increment.

Is this possible?

phil9909 commented 4 years ago

@trobjo I'm looking for a similar feature. Have you solved this? Otherwise I'm willing to implement this.

jrdoane commented 4 years ago

I'm not sure if this would be helpful, but I forked the repo and made some changes because I needed to support multiple displays and I wanted to be able to specify a percentage of max brightness without the interactive UI. C++ isn't really my strong suit, but I needed to find a way from keeping my 5K Ultrafines from burning holes in my retinas from the brightness, so I ripped out a bunch of the stepping code and simplified it.

So basically if I want 50% brightness, it's just sudo lguf_brightness all 50.

https://github.com/jrdoane/lguf-brightness