feat(bar): support swaybar mode for configuring window

Use `mode` (`waybar::Bar::setMode`) as a shorthand to configure bar
visibility, layer, exclusive zones and input event handling in the same
way as `swaybar` does.
See `sway-bar(5)` for a description of available modes.
This commit is contained in:
Aleksei Bavshin
2021-09-15 22:35:50 +07:00
parent 3e2197a82a
commit 03a641ed83
2 changed files with 54 additions and 24 deletions

View File

@ -58,6 +58,7 @@ class Bar {
Bar(const Bar &) = delete;
~Bar() = default;
void setMode(const std::string &);
void setVisible(bool visible);
void toggle();
void handleSignal(int);