Allow changing existing modes and adding new ones via `modes`
configuration key.
`modes` accepts a JSON object roughly described by the following type
```typescript
type BarMode = {
layer: 'bottom' | 'top' | 'overlay';
exclusive: bool;
passthrough: bool;
visible: bool;
};
type BarModeList = {
[name: string]: BarMode;
};
```
and will be merged with the default modes defined in `bar.cpp`.
Note that with absence of other ways to set mode, only those defined in
the `sway-bar(5)`[1] documentation could be used right now.
[1]: https://github.com/swaywm/sway/blob/master/sway/sway-bar.5.scd
If the primary output does not support changing volume MPD will report
-1. Ensure that negative volume levels will be represented as 0 instead.
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
I was seeing "[warning] Requested height: 20 exceeds the minimum height: 30 required..."
Lines 114-134 are relevant; 133 overrides the requested height with the minimum height when GTK wants more pixels to work with. So, the code is behaving as expected, and "less than" matches the code's logic.
After this refactoring:
1. Timezones parses only once on start and the we refer to saved values. All time_zone.isString() checks gone to the constructor.
2. Single timezone case handling as case of multi timezoned logic.
3. Scroll event seems more clear now.
4. Tooltip template parses on start to check if there calendar placeholder or not. To do not calculate calendar_text() if not necessary.
Also fixed timezones behavior: now waybar starting with the first timezone in timezones list and falling back to timezone field only if timezones omit or has no elements.
`show_all` call from `Tray::update` attempts to walk the widget tree and
make every widget visible. Since we control individual tray item
visibility based on `Status` SNI property, we don't want that to happen.
Modify `Tray::update` to control the visibility of a whole tray module
only and ensure that the children of `Item` are still visible when
necessary.