Open
Description
Description
gBar isn't 100% stable when adding or removing a monitor.
It seems to implement some interesting features when the set of available monitor is changed but they don't look very practical.
Ideally, two things are needed:
- find the bug(s) which happens sometimes on plug/unplug of a monitor, not so easy to reproduce - which are almost the only moments where gBar crashes on my system
- instead of picking a "random" monitor when some is added or removed, the user could pass a list of monitors (from "most likely" to "least likely") and then the one with higher priority which is available is used for gBar
Reproduction
Unplug or Plug a monitor repeatedly
Expected behavior
gBar never crashed and is choosing the monitor which is the "best" when this setup is used
System information
Commit 6dd1ee6
Archlinux with Hyprland
Note
I implemented some workaround here https://github.com/hyprland-community/pyprland/wiki/gbar but I don't think the code will be useful at all.
It would be extra-nice to be able to specify either name or a (partial) description of the monitors, eg: --monitors "SuperScreeXX,HDMI-A-1,DP-1,WELL-314X"