If context_state_callback is called before we call
pa_threaded_mainloop_wait in the main thread, the signal is lost and we
wait forever.
Fixes#2707
Ref #2699
Ref #2697
If a script module is waiting on a non-tailed script to finish, polybar
cannot shut down until the script has terminted.
To remedy this, we use the same polling loop as for tailed scripts which
checks if it needs to terminate after every iteration.
Improve the find_interface() to return a interface name
that is currently running if any interface of given type
is currently running, else just return the first one found.
This will allow the interface-type to work with multiple net interface
of the same type, and prefer to one that is currently connect to
a network. This works great HW with multiple ethernet port and user
expect to occasonally swap between the two.
This fixes#857 and #1932. Also replaces PR #1725, since we don't need
our own implementation of condition_variable anymore since people who
update their polybar should have GCC 10 by now.
The m_updated_at field of the mpd module was removed instead of having
its clock change because it became unused in commit 645a3142a1.
Fixes#1978
* Move tail and non-tail handler to method
Defining them in the constructor is ugly.
* script: Iterate over defined actions instead of fixed list
* Separate running logic and lock m_output
* Include POLYBAR_FLAGS in linker flags
* Stop using m_prev in script_runner
* Join module threads in stop function
Joining in the destructor may lead to UB because the subclass is already
deconstructed but the threads may still require it to be around (e.g.
for calling any functions on the instance)
* Cleanup script module
* Update changelog
* Remove AfterReturn class
* Remove m_stopping from script module
* Fix polybar not reading the entire line from child process.
For every `readline` call we created a new fd_streambuf. This means once
`readline` returns, the streambuf is destructed and and pending data in
its temporary buffer discarded and we never actually read it.
* Remove unused includes
more granular units need lower precision, while less granular need
higher precision. assume sane default of:
unit | precision
KB | 0
MB | 1
GB | 2
Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
New config option `speed-unit = B/s` will be used to suffix the upload and download speeds.
* mod::network: udspeed-unit to set network speed unit suffix
* Changed udspeed-unit to speed-unit
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.
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`
Previously, when volume was in close proximity to n_max_volume, a larger
increase would not do anything. After this patch, volume is set to
m_max_volume in such scenarios. If the volume already is at
n_max_volume, we mirror the old behavior and emit a warning.
So, for example, consider m_max_volume was 100%, but the volume prior
to the increase was 96%. An increase of 5% would do nothing (emit a
warning, even) instead of setting the volume to 100%.
Note that this might happen even if the volume is at 95% according to
%percentage% due to rounding errors.
wireless_tools 29 redefines inline in iwlib.h as:
#define inline inline __attribute__((always_inline))
which conflicts with POLYBAR_NS, which is defined as:
#define POLYBAR_NS \
namespace polybar { \
inline namespace APP_VERSION_NAMESPACE {
In version 30.pre9 this #define is moved into a source file and thus
cannot conflict.
The error only occurs when building with clang, so it seems gcc and
clang handle this differently
Fixes#1492
This patch enables support for nl80211. In case the libnl-genl-3.0
library isn't found, it will fall back to Wext instead.
The library to use can also be manually set with the CMake option
WITH_LIBNL.
The Wireless-Extensions (WE or Wext) are deprecated and long replaced
by cfg80211.
Although Wext isn't used by WiFi drivers anymore, CFG80211_WEXT allows
old tools to communicate with modern drivers by providing a wrapper
API.
It's queried the same way ipv4 addresses are queried, but here it displays globally routable addresses. If there are multiple such addresses, it picks one (same as with ipv4). It's possible that an address discovered this way is not in fact globally reachable but still marked as global.
As mentioned in #1215, gcc >=8 will complain, if strncpy truncates the
source string or gcc can prove there is no NUL terminating byte.
This also updates the i3ipcpp submodule where there was a similar error
Fixes#1215