For more complicated configurations with several actions activated
through clicks on various connected modules, it is currently necessary
to have each of those connected modules exec their own subprocess to
produce the wanted output. This is problematic because it greatly
increases CPU usage.
Implement a new configuration option for bars, "custom-execs", which
contains an array of subprocess specifications ("exec", "exec_if",
"interval", "restart-interval"). The bar runs each of these executables
and reads their output. The output is in the form of a JSON object with
module names as keys and either strings (for "raw" type output) or
objects (for "json" type output) as values. These values are forwarded
to the custom modules named by the keys.
Invisible bar on a `top` layer would still intercept pointer events and
stop them from reaching windows below. Always changing the layer to
to `bottom` along with making bar invisible would prevent that.
Extract two surface implementations from the bar class: GLSSurfaceImpl
and RawSurfaceImpl. This change allowed to remove _all_ surface type
conditionals and significantly simplify the Bar code.
The change also applies PImpl pattern to the Bar, allowing to remove
some headers and fields from `bar.hpp`.
To enable: use sway >= 1.2, compile waybar with `-Dgtk-layer-shell=enabled` meson option.
Original behavior could be restored at runtime by setting `"gtk-layer-shell": false` in waybar config.
gtk-layer-shell wants Gdk::Monitor instead of wl_output;
change code to deal with Gdk objects and slightly simplify it.
Requires gtkmm 3.22.0+ (first release with Gdk::Monitor support).