geommer / yabar

A modern and lightweight status bar for X window managers.
MIT License
679 stars 49 forks source link

Add monitor fallback, auto reload on screen change #137

Closed NBonaparte closed 7 years ago

NBonaparte commented 7 years ago

This fixes #73 by implementing two things:

One thing I might further change is the reverting to the first active monitor (line 241 and 262 in ya_parse.c). It doesn't seem very useful as most people probably provide an explicit monitor, but I also don't want to break anyone's setups.

jacksgt commented 7 years ago

I really like the automatic reconfiguration for any xrandr changes!

The monitor and monitor-fallback was a bit clunky (IMO). I modified it so that you can specify multiple monitors in monitor (seperated by a space). Yabar will then cycle through each of them (arbitrarily many) and check them for availability. If no one of the specified ones is present, it selects the currently active monitor.

What do you think, @NBonaparte ?

NBonaparte commented 7 years ago

Having variable amounts of fallback monitors is a good idea. I'll merge this now.