-
-
Notifications
You must be signed in to change notification settings - Fork 851
Description
This issue is similar to #2941 but the original issue does not reflect that other settings than 'layer' are ignored.
Context
I wanted to have waybar stay in the background so that windows could overlap it. The 'layer' setting looked promising, but it did not seem to have any effect when used in conjunction with a "mode":"dock"
directive.
Problem
After some investigations and tests, I can confirm that 'layer', 'exclusive' and 'passthrough' settings are ignored if "mode" is set (i.e; not commented out).
Circumvention
So in 'config.jsonc' you either have to have, e.g :
// Layer and exclusive settings are honored
"layer": "bottom",
"exclusive": false,
"passthrough": false,
//"mode": "dock",
or
// Layer and exclusive settings are ignored
"layer": "bottom",
"exclusive": false,
"mode": "dock",
Fixing the problem
The easiest way to 'fix' the issue is to mention in the doc that these options need 'mode' to be commented out.
The least easy way is to find why these settings are not retained. The relevant code seems to be around here :
https://github.com/Alexays/Waybar/blob/master/src/bar.cpp#L243
It looks like from_json()
is called twice, and the second call 'overwrites' what was set in the previous call ? (Not fluent in c++)