swaybar: add overlay mode (fix #1620)

Overlay mode puts the bar above normal windows and passes through/ignores any
touch/mouse/keyboard events that would be sent to it.
This commit is contained in:
Milkey Mouse 2019-02-23 21:59:36 -08:00 committed by Brian Ashworth
parent 2510e3df38
commit 2f7247e08a
4 changed files with 21 additions and 4 deletions

View file

@ -20,6 +20,8 @@ static struct cmd_results *bar_set_mode(struct bar_config *bar, const char *mode
bar->mode = strdup("hide");
} else if (strcasecmp("invisible", mode) == 0) {
bar->mode = strdup("invisible");
} else if (strcasecmp("overlay", mode) == 0) {
bar->mode = strdup("overlay");
} else {
return cmd_results_new(CMD_INVALID, "Invalid value %s", mode);
}

View file

@ -84,11 +84,13 @@ Sway allows configuring swaybar in the sway configuration file.
debug-events`. To disable the default behavior for a button, use the
command _nop_.
*mode* dock|hide|invisible
*mode* dock|hide|invisible|overlay
Specifies the visibility of the bar. In _dock_ mode, it is permanently
visible at one edge of the screen. In _hide_ mode, it is hidden unless the
modifier key is pressed, though this behaviour depends on the hidden state.
In _invisible_ mode, it is permanently hidden. Default is _dock_.
In _invisible_ mode, it is permanently hidden. In _overlay_ mode, it is
permanently visible on top of other windows. (In _overlay_ mode the bar is
transparent to input events.) Default is _dock_.
*hidden_state* hide|show
Specifies the behaviour of the bar when it is in _hide_ mode. When the