greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 475 forks source link

backlight: Control multiple/all devices #1771

Closed bim9262 closed 1 year ago

bim9262 commented 1 year ago

It would be nice if there was a way to specify that you want control the backlight of more than one monitor at a time.

Any thoughts on how to extend the config in a way which doesn't break the default behavior, if no device is specified, it to use the first one that can be found? Perhaps device="ALL" or device="*"

MaxVerevkin commented 1 year ago

A very interesting idea. IMO Using one block for both laptop screen and external output would be really nice.

I think we can make device option accept regex. This will allow to list a set of devices "(acb|def)" or match all devices "."

bim9262 commented 1 year ago

or match all devices "."

You mean ".*", right?

An interesting problem is what do you do if you match on say N monitors when the status bar starts, but they are at different brightnesses? Set them all to to the average brightness perhaps?

MaxVerevkin commented 1 year ago

You mean ".*", right?

Doesn't matter. Regex "a" will match "cat". The only difference is that ".*" will also match empty string.

An interesting problem is what do you do if you match on say N monitors when the status bar starts, but they are at different brightnesses? Set them all to to the average brightness perhaps?

Yeah, not sure about this.

bim9262 commented 1 year ago

👍

Doesn't matter. Regex "a" will match "cat". The only difference is that ".*" will also match empty string.

For some reason I was just thinking about anchored regexes like ^ddcc.*$.