There is a bug where the `tempFile` was the entire path (instead of
just the subpath) leading to some issues. This commit fixes that and also adds
an option to set the entire path.
When using a rotated monitor, the width value is incorrect and most of
the widgets are off screen.
When taking the transform into account (swapping width and height when
90/270° rotation is applied) the width is correct.
NerdFonts v3.2.1 made the FontAwesome icons (compared to both v3.1.1 and v3.2.0)
significantly larger. The icons are now set to a size which roughly
matches that of v3.1.1.
This commit avoids piling up events if events are queued quicker, than
gBar can handle, causing severe slowdowns.
Instead, the requests are handled in a worker thread and excess events
are discarded.
Fixes: https://github.com/scorpion-26/gBar/issues/86
A source event has the first bit always set, whereas we only handle
events that equal 0x10 (PA_SUBSCRIPTION_EVENT_CHANGE). Now the bitmask
is correctly handled.
Fixes https://github.com/scorpion-26/gBar/issues/82
This is the fix for https://github.com/scorpion-26/gBar/issues/79, but
blown out of proportions, because various things kept breaking
- Original fix: Add/Remove items instead of cleaning everything
everytime something changes. If the dbus-menu was open, it was
referencing the old widget causing issues. The new method keeps the
original GtkDrawingArea and only replace the buffer/tooltip
- Create dbus-menu on widget creation instead of on click. This was
actually the fix for
https://github.com/scorpion-26/gBar/pull/12#issuecomment-1529143790.
The css has also been updated, making the popup finally look good.
- With the new item refreshing theme KeePassXC kept deadlocking when the
properties changed. To fix it, the dbus properties are now queried
asynchronously via 'GetAll'
This widget called "Title" is a simple text with the title of the
currently active window. To prevent clipping the size of the title is capped by the
config variable "MaxTitleLength".
Implements https://github.com/scorpion-26/gBar/issues/77
Since you can now customize what widgets go in the center, the names of
these config options are no longer fitting. They are now renamed to
CenterSpace and CenterWidgets respectively.
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.