If the current monitor would quickly change, GetOutdatedPackagesAsync
would be called while the previous instance is still running, which
caused crashes. Now, GetOutdatedPackagesAsync only uses one
instance/callback a time.
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").
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
Since 37b0896 stb_image isn't used anymore and recently the nix CI also
broke because of the hacky way the include directory is determined. This
is now fixed. One side effect of this is, that gBar no longer needs to
be cloned recursively.
Even though an scss file is present, it needs to be converted manually and only the
CSS file is parsed. This pull request sets out to fix that.
there is preliminary scss support using libsass now (libsass is technically "deprecated" but there seems to be no other
c/c++ library for converting scss to css)
The menu that was created for the sni context menu was never destroyed.
Instead of creating a new menu each time, the existing menu is recycled
and destroyed when the item is.
According to XDG specifications paths like /usr/share etc. are usually
in XDG_DATA_DIRS. Since this variable may be set differently for other
linux distributions we prefer those environment variables to hard-coded
paths. As such hard-coded paths have been removed
This solves issue #66
gtk_icon_theme_load_icon returns a pixbuf which is not owned by us, and
therefore g_free shouldn't be called. When reloading an icon, this pixbuf
was reused by the icon theme even though we just free'd it.
Fixes: https://github.com/scorpion-26/gBar/issues/74
This adds a config option to override the name of the icons displayed.
This also removes the frankenstein monster of the icon location
querying, which was a giant mess and not even remotely close to being
compliant with the XDG spec. Instead we use the much simpler Gtk API
which has the added benefit of properly supporting themes.
The SNI filter also now work for items without a set tooltip (e.g. steam).
For these items the object name is matched instead.
Implements https://github.com/scorpion-26/gBar/issues/63
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.