All the information about which action has to be delivered to which
module is kept in once place to make cleanup easier once the deprecated
actions are removed.
Right now only the date module is added as a proof of concept.
This allows us to identify module by their type and it is also better to
store the module type as part of the module instead of having it
hardcoded in factory.hpp
Action strings now have the form '#MODULE#ACTION'
For example to trigger the action 'toggle' in the 'module/date' module
one would now use '%{A1:#date#toggle:}'
With this action strings can now be uniquely assigned to one module.
Fixes#1172
Before the time difference between two measurements was always an
integer number, so for intervals < 1, you would always get 0 and for any
other non-integer interval you would get skewed results.
ramp-0 is used for everything <= base-temperature and ramp-N is used for everything >= warn-temperature
* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps
* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps
* Fix minor error
* explicitly check percentage in get_by_percentage_with_borders
* Fixed silly error
If we build only the documentation by invoking `cmake` on the `doc`
folder, the `SPHINX_BUILD` variable is not set and instead of
```
sphinx-build -b html ...
```
it will just execute
```
-b html ...
```
This produces an error but doesn't fail the build because apparently if
the command starts with a dash an error is non-fatal.
Fixes#2191
Any timer_module based module would sleep for the set interval and then
continue running. Depending on the start time of polybar this
sleep pattern might not be aligned, which causes such modules to always
update in a shifted manner.
Consider the date module as an example. If the update interval is set to
60 seconds and polybar was started at 13:37:37, polybar would update the
clock at 13:38:37, 13:39:37 and so on.
To make matters worse, if a module would perform lengthy checks this
interval might drift over time, causing even more inconsistent updating.
This patch extends the base module with a sleep_until method that calls
the corresponding function on the sleephandler. Additionally the
timer_module is extended to compute the remaining time until the next
interval passes and sleep accordingly.
Closes#2064
Co-developed-by: Dominik Töllner <dominik.toellner@stud.uni-hannover.de>
Co-authored-by: Malte Bargholz <malte@screenri.de>
* xpp: Update submodule
* aur: Force system python in polybar-git
This should resolve problems on systems with conda or pyenv enabled that
would otherwise not pick up xcbgen properly
* Prioritize battery full-at over state
The `full-at` option should take priority
over the charging state of the battery.
Closes#1622 (issue for Thinkpad laptops)
* Remove typo from clamp_percentage
Some devices can have "amdgpu_bl1" or "amdgpu_bl2", but the code hardcoded in the value "amdgpu_bl0". This change tests based on the first characters: "amdgpu_bl".
If an input is enqueued as a response to an input, the new input will be
swallowed because it will likely be enqueued less than 30ms after the
original event.
This is not something that is an issue right now but it is required to
finish #1907 where, in order to close the menu after a click, the menu
module gets an exec action that closes the menu and adds a command to
the event queue.
The setting also isn't too useful since it will just break polybar input
handling if inputs arrive too fast instead of (possibly) slowing down
the bar.
Before the module would just try to evenly distribute desktops
(workspaces) among the viewports.
But since `_NET_DESKTOP_VIEWPORT` actually maps desktops to viewports,
we can use that information to assign workspaces to the right viewport.
Fixes#1849Fixes#1764
It is useful for people to see what config file polybar loaded.
For debugging font issues people almost always need to check what fonts
polybar loaded, for that they need to run polybar with info logging. Now
this information is always provided. This requires an update in the font
wiki page.
A warning implies something went wrong and (possibly) the user should do
something about it. However, warnings are not always used this way.
For example:
* When a fallback value for a `${..}` reference is used, this shouldn't
produce a warning (or notice) since using fallbacks is not something
bad.
* pulse telling you that it uses the default sink because no sink was
specified also does not warrant a warning (even notice may be too
high).
* Whenever polybar shuts down it produces a "Termination signal
received..." warning. Since there isn't a more proper way to shut down
polybar, it should not produce a warning. Same argument for a
`screenchange-reload`
Before it would only reload if the size changed and even that was
reliable since the method relied on the order of the monitor list.
Now if the monitor list differs in any way (pos, dimension, primary,
output, name) a reload is issued
Because of how monitors are removed inside the loop and depending on the
monitor order a cloned monitor may be assigned a width of 0 but is never
actually removed resulting in polybar saying the bar is out of bounds
Fixes#1794
Removing monitors is not really necessary when selecting the monitor
where to render the bar or choosing the backlight. Since both monitors
occupy the same coordinates rendering can be done on both and it's
better to give people felxibility for the backlight.
Fixes#1191