This PR adds classes to every widget.
Introduces a breaking change for the lock-button, which needs to be
added to the style.css manually if you're using a custom one.
Every widget gets a "widget" class as well as a specific one like an id.
In the future, names/ids should be used for that.
Also cleaned up the sensors a little as well as the related CSS.
Fixes#70.
To facilitate that, Texture now accepts GdkPixbuf instead of raw
uint8_t[], because we can't convert svgs into uint8_t[] easily without
the use of GdkPixbuf.
gtk_remove_widget unrefs the widget and destroys it and all its children.
Since we also do that in the destructor, we do a double free.
To fix this, a ref is added to prevent destroying by gtk_remove_widget.
The margins are still not perfect, but it at least acceptable.
SensorTooltips is required, as the sensor texts break due to being
right-side up.
Implements https://github.com/scorpion-26/gBar/issues/48
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.
No option for NumWorkspaces and some options could be null while they
shouldn't. Also set UseHyprlandIPC to true by default as that is now
required by Hyprland 0.30.
When a required feature is not supported, gBar would crash inside the
query functions without a way to manually bypass NvidiaGPU. Now
NvidiaGPU checks whether all features are supported and disables the
module if any throw an error.
Fixes https://github.com/scorpion-26/gBar/issues/52
Adds NumWorkspaces config, https://github.com/scorpion-26/gBar/issues/45
The WorkspaceSymbols syntax was also upgraded to use maps, since the -n
was hardcoded to query for numbers from 1-9, which is now no longer
correct.
The old syntax for WorkspaceSymbols still works, but only for ws 1-9
Maps like the one used by SNIIconSize and SNIPaddingTop are now
generalized, without requiring the awkward std::pair<_,_> buf and hasntFoundProperty helpers
This makes the `DateTimeStyle` string respect the current locale or
whatever valid locale is set via configuration option `DateTimeLocale`.
---------
Co-authored-by: Sebastian Zerbe <zerbe@phil.hhu.de>
g_variant_iter_n_children apparently returns 1 instead of 3 (array =
child, but I don't know).
I inverted the statement, because for empty property, it hasn't any
children.
TeamViewer exposes ToolTip as String (which is not compliant to the spec).
This caused gBar to crash, since we assume, that the tooltip variant is
always a container (struct), which glibc doesn't like.
We now fallback to g_variant_get_string if it is not according to spec
Fixes https://github.com/scorpion-26/gBar/issues/37