Since the forked processes are still our children, we need to wait on
them, otherwise they become zombie processes.
We now fork twice, let the first fork immediately return and wait on it.
This reparents the second fork, which runs the actual code, to the init
process which then collects it.
Ref #770
For some reason when passing some non-const strings to convert, the
convert(T&& arg) method was used instead of the one specialized for
strings.
This caused an error in clang because you can't pass objects with
non-trivial types to varargs functions.
The best solution I found was to just add a specialized function for
non-const strings.
If two WM events arrive withing 25ms of one-another, the second one does
not trigger a bar update.
The module state is still correct, it is just not reflected in the bar.
This somehow caused updates being swallowed in fluxbox, but only after
PR #882 was merged, even though that 25ms restriction existed long
before that.
Fixes#2272
Since 3.5.0, we use m_interval for a modulo operation, this crashes the
bar if the interval is 0. A non-positive interval shouldn't be allowed
anyway, so we now throw an exception in that case.
Fixes#2273
Pre 3.5.0, any key starting with 'inherit' was treated as an inherit
directive. This allowed for multiple inheritance even though it was
never inteded in that way.
3.5.0 removed that bug/feature by doing a strict check against 'inherit'
It seems people were relying on this behavior, so we are adding it back.
However multiple inheritance with multiple keys is also deprecated in
favor of the `inherit` key now supporting multiple space separated
sections.
This is because the config doesn't have a key order, but inheritance
does depend on the order the different section keys are copied over (if
multiple inherited sections define the same key).
Fixes#2269
It was not quite clear how try_apply_alpha should behave if the given
color was not ALPHA_ONLY. The implementation just returned 'this'.
However, the build relied on it returning the given color.
This broke all bg and fg settings in the entire bar.
To clear this up, we switch this around take the alpha channel of 'this'
and also return 'this' if it isn't ALPHA_ONLY.
Fixes#2255
Shell commands triggered from action tags used to block polybar until
they finished.
Since we are not actually interested in the output of the commands, it
makes sense to run them completely detached from polybar and have
polybar not block when executing these commands.
Now the spawned child processes no longer get killed when polybar
exits. This is fine because polybar is not responsible for these
processes since they were explicitly started by the user through click
commands.
Ref: #770
Ref: #1680
The intent is for every color to be stored in a rgba instance
The rgba class now stores the color in a 32 bit integer to save space
This also removes the unused class rgb and moves everything else into a
cpp file.
Many functions also had weird template parameters. For example
alpha_channel<unsigned short int> would give a 2 byte number with the
alpha channel byte in both bytes.
color_util::hex would return a hex string with alpha channel if unsigned
short int was given and without if unsigned char was given. Even more
curiously those parameters were passed to *_channel and the result
nevertheless truncated to 8bits.
Only modules can now be action handlers.
This also slightly simplifies the controller because we don't need to
keep track of input handlers, we can just use the module list.
The next action should always select the next workspace, the same for
prev.
reverse-scroll should be directly used when setting the scroll actions.
This changes the behavior of `prev` and `next` actions in the i3 and
bspwm module.
But I don't think the impact will be significant and the old behavior
was misleading anyway.
Some actions have data attached (e.g. xworkspaces-focus=N), the
forwarding logic now matches the keys in the legacy_actions map as
prefixes and everything afterwards is considered additional data and
appended to the new action string.
All modules now expose their actions as public static constants
Issues: The menu module no longer closes when an item is clicked (before
it would intercept any executed command and look if it matches one of
its exec commands)
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