Commit graph

10 commits

Author SHA1 Message Date
scorpion-26
95f9b0aadb Handle monitor changes
Since there is no way to map a connector to a Gdk Window ID and window
ID's are not static per monitor, the entire Window and Wayland system
has been rewritten to store a "target monitor" connector name, which is
the name of the monitor we want to be on. Every time a monitor is
removed or added, it is checked against the monitors of our Wayland
backend to match connector to Gdk ID and then the Window is
created/destroyed on the window(The target monitor is preferred, but if
it doesn't exist, other monitors are used too).

This is not perfect, since the matching of connector name to Gdk ID is
only an approximation of the Gdk behaviour (Especially rough
on hyprland with the headless monitor. A hack is needed to handle that).

Additionally the monitor can now be specified by connector name when
starting up (e.g. "gBar bar DP-1").
2024-03-16 17:00:06 +01:00
scorpion-26
f205a26fcc Don't crash on monitor remove
gBar no longer crashes when it's monitor is removed and is instead
evacuated onto another monitor or the next monitor added. We don't
change any monitor indices etc., which results in some glitchy results
2024-03-16 17:00:06 +01:00
scorpion-26
e717e0e7ad Add a CLI option to override the config dir
The CLI option -c/--config overrides the search path, and appends itself
to the front of the CSS search path.

Partially implements https://github.com/scorpion-26/gBar/issues/75
2024-01-21 17:13:45 +01:00
scorpion-26
b19b091c92 Layer audioflyin on top of fullscreen windows
LAYER_TOP (The previously hardcoded layer) draws below fullscreen
windows (at least on Hyprland). For the flyin we want it to be always on
top, so LAYER_OVERLAY is used instead now.
2023-10-21 16:40:41 +02:00
scorpion-26
b0c13801f6 Add GetHeight for Window 2023-07-19 01:13:57 +02:00
scorpion-26
a34ffd8334 Add Window::GetWidth() 2023-06-10 23:49:13 +02:00
scorpion-26
6815d8e017 Initialise GTK early 2023-06-10 23:49:13 +02:00
scorpion-26
d1b062bad9 Install styling automatically. 2023-01-28 17:31:18 +01:00
scorpion-26
ed32d70916 Added a bluetooth widget
I think it looks really slick. Probably still many bugs
2023-01-14 23:18:34 +01:00
scorpion-26
b0ed0d17e5 Initial commit! 2023-01-13 16:19:21 +01:00