mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Allow status_command to be disabled via IPC
This commit is contained in:
parent
26bebb9266
commit
5e1983660d
3 changed files with 23 additions and 10 deletions
|
|
@ -46,14 +46,14 @@ struct cmd_results *cmd_bar(int argc, char **argv) {
|
|||
return error;
|
||||
}
|
||||
|
||||
if (!config->reading) {
|
||||
if (!find_handler(argv[0], bar_config_handlers,
|
||||
sizeof(bar_config_handlers))) {
|
||||
return cmd_results_new(CMD_FAILURE, "bar",
|
||||
"Can only be used in config file.");
|
||||
if (find_handler(argv[0], bar_config_handlers,
|
||||
sizeof(bar_config_handlers))) {
|
||||
if (config->reading) {
|
||||
return config_subcommand(argv, argc, bar_config_handlers,
|
||||
sizeof(bar_config_handlers));
|
||||
}
|
||||
return config_subcommand(argv, argc, bar_config_handlers,
|
||||
sizeof(bar_config_handlers));
|
||||
return cmd_results_new(CMD_FAILURE, "bar",
|
||||
"Can only be used in config file.");
|
||||
}
|
||||
|
||||
if (argc > 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue