Uses user-defined mode when toggling visibility rather than resetting to default mode
This commit is contained in:
parent
2b3fc3acff
commit
f4c6dfcddc
|
@ -665,7 +665,11 @@ void waybar::Bar::onMap(GdkEventAny*) {
|
|||
|
||||
void waybar::Bar::setVisible(bool value) {
|
||||
visible = value;
|
||||
if (auto mode = config.get("mode", {}); mode.isString()) {
|
||||
setMode(visible ? config["mode"].asString() : MODE_INVISIBLE);
|
||||
} else {
|
||||
setMode(visible ? MODE_DEFAULT : MODE_INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
void waybar::Bar::toggle() { setVisible(!visible); }
|
||||
|
|
Loading…
Reference in New Issue