mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-11-17 07:48:28 +01:00
ipc: make bar <bar_id> mode|hidden_state
behave as documented
sway-bar(5) says: > For compatibility with i3, bar mode <mode> [<bar-id>] syntax is > supported along with the sway only bar <bar-id> mode <mode> syntax. while the actual behavior is that `bar_cmd_mode` ignores already selected `config->current_bar` and applies the change to all the configured bars.
This commit is contained in:
parent
a23cdbbea1
commit
94dc486f0e
2 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ struct cmd_results *bar_cmd_hidden_state(int argc, char **argv) {
|
|||
}
|
||||
|
||||
const char *state = argv[0];
|
||||
if (config->reading) {
|
||||
if (config->current_bar) {
|
||||
error = bar_set_hidden_state(config->current_bar, state);
|
||||
} else {
|
||||
const char *id = argc == 2 ? argv[1] : NULL;
|
||||
|
|
|
@ -58,7 +58,7 @@ struct cmd_results *bar_cmd_mode(int argc, char **argv) {
|
|||
}
|
||||
|
||||
const char *mode = argv[0];
|
||||
if (config->reading) {
|
||||
if (config->current_bar) {
|
||||
error = bar_set_mode(config->current_bar, mode);
|
||||
} else {
|
||||
const char *id = argc == 2 ? argv[1] : NULL;
|
||||
|
|
Loading…
Reference in a new issue