mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #1479 from dorgnarg/master
Use user-defined mode when toggling visibility rather than resetting to default
This commit is contained in:
commit
a37ef74fb1
@ -665,7 +665,11 @@ void waybar::Bar::onMap(GdkEventAny*) {
|
|||||||
|
|
||||||
void waybar::Bar::setVisible(bool value) {
|
void waybar::Bar::setVisible(bool value) {
|
||||||
visible = value;
|
visible = value;
|
||||||
setMode(visible ? MODE_DEFAULT : MODE_INVISIBLE);
|
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); }
|
void waybar::Bar::toggle() { setVisible(!visible); }
|
||||||
|
Loading…
Reference in New Issue
Block a user