If the root pixmap does not fully cover the bar window, some
pseudo-transparent areas were filled with unitialized data, causing
pixelation or other rendering artifacts.
Now, ovserved background slices are first filled with black to make sure
this does not happen and they print an error if not the full pixmap can
be filled.
Fixes#3041
checkout is bumped from v3 to v4, there shouldn't be any breaking
changes (just bumps the node version)
upload-artifact is bumped from v2 to v4, our use case shouldn't break
github-script is bumped from v3 to v7. I don't see any breaking changes
that should affect us. Again mainly a nodejs version bump
Unaware users may be confused by why the tray module is not shown in the
default config and if they add it, they may be confused why only one of
their bars shows the module.
Without override-redirect, i3 will not allow you to have a
non-full-width bar. But polybar simply ignores that request and
continues to render the user-requested width instead of the width i3 has
configured the window to be.
With the 3.7 release, we started setting the window's backing pixmap to
the rendering pixmap. In the case above, the pixmap would only be
allocted for the smaller width and when i3 maps the window, it repeats
the backing pixmap to fill the entire window.
At the point where i3 maps the window, the pixmap contains an initial
render of the bar without module content and that render is then
duplicated.
Reverting back to the old approach of simply copying over the pixmap
after each render does not have that problem and the remainder of the
bar is black (or fully transparent with a compositor).
Ideally, polybar would respect the width i3 configures for it, but that
would break many existing setups that rely on non-full-width bars in i3
Fixes#3060
* Changed bit count for label to use UTF8 standard
Fixes#3074
* label: Calculate length only once
The length calculation has to traverse the whole string
---------
Co-authored-by: nklloyd <nicholask.lloyd@gmail.com>
* Fix backlight initial value matching the actual brightness level
The initial value is `0`. If the actual brightness is also `0` you see
`%percentage%` token as text, it’s not being replaced. Since
`m_brightness` is an `int` the initial value could be just `-1` since
the actual brightness is never goes below zero. Thus this bug will never
show up again because actual brightness on first render won’t match
the “old” `m_brightness` value.
See also for more detailed explanation of the bug:
https://github.com/polybar/polybar/discussions/3079#discussioncomment-8169932
* Add docs
---------
Co-authored-by: Viacheslav Lotsmanov <lotsmanov89@gmail.com>
Modules that don't produce any output are hidden by the controller
(don't have margins or separators).
The tray module should also do that for `format = <tray>` when there are
no icons.
This required the visibility handling to be tied to the module
visibility instead of being handled by the renderer.
Otherwise, the renderer would hide the tray (because the %{Pt} tag was
never sent) and the tray would not unhide when new icons appeared; it
can't differentiate between hidden because empty and hidden because the
module is hidden by the user (the latter is the reason the renderer does
hiding at all).
Fixes#3036
By default, we group workspaces by monitor with the help of
_NET_DESKTOP_VIEWPORT. However, some users may experience this as an
unpredictable "shuffling" of workspaces. While WMs could disable
advertising the property itself, it seems more sensible to handle this
at the level of polybar. Hence, introduce a new group-by-monitor
flag—defaulting to true—which can be used to disable this behaviour.
Closes: https://github.com/polybar/polybar/issues/2603
Related: https://github.com/xmonad/xmonad-contrib/pull/791
Related: https://github.com/qtile/qtile/issues/3375
Co-authored-by: scaramangado <scaramangado@gmail.com>
There is a redirect setup that redirects anything to `/en/stable` (or
whatever the default version is).
This allows us to create version-agnostic direct links that always
redirect to the default version
The `backlight` file seems to not receive modification events for
inotify (it does receive other events though).
These other events still trigger an update, but the value read is still
the old value because the events arrive just slightly before the file is
updated.
The new `poll-interval` setting will inject an event every X seconds to
force an update.
If the actual_brightness file is used, the interval is set to 0 and thus
turned off.
This does not add any more wakeups to the module, the inotify modules
wake up every second anyway and during that time, the interval is
checked.
Fixes#2835
The ewmh strategy has to be dropped because the
`_NET_SUPPORTING_WM_CHECK` window may (at least in bspwm) appear
anywhere in the window stack.
To fix the overlapping monitors issue in #2873, we simply restack
against the topmost of these root windows.
Fixes#2972Fixes#2873 (again)
In alsa 1.2.10, the `alsa/control.h` header cannot be included on its
own because it does not include all symbols it uses.
We are basically duplicating asoundlib.h anyway and there is even a
macro variable to switch to it.
Ref: #3009
Ref: https://github.com/alsa-project/alsa-lib/issues/348
When using `get_screen_resources`, XRandR will query the hardware to
detect any change. This takes some time.
`get_screen_resources_current` uses the cached information and is
pretty fast.
In my case, the information is always already present in cache because
it was set by the program that did configure the screens (autorandr in
my case, but this applies to most frontends). As polybar is not used
to configure stuff, I think this is fine. There should be something
configuring the screen before polybar is able to use it.
However, maybe some people are using `polybar --list-monitors` just
after plugging a screen. It won't display the new screen in this case.
So, maybe this is not a good idea. It makes polybar starts
faster (500ms faster in my case when there are 3 screens plugged).
Also, I did this change because running `polybar --list-monitor` in
parallel with starting `polybar` (in a for loop for example), I get
some curious bug where my screens disappear and reappear. I don't need
this change as this was easy to fix by avoiding the parallel access to
XRandR properties, but maybe this would avoid other people running
into the same problem.
Your take!
Positions the bar window above the _NET_SUPPORTING_WM_CHECK window
The generic restacking strategy now first tries the ewmh strategy, the
the bottom strategy.