diff options
Diffstat (limited to 'sway/commands/mode.c')
-rw-r--r-- | sway/commands/mode.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sway/commands/mode.c b/sway/commands/mode.c index 189e3c1a..828d77e1 100644 --- a/sway/commands/mode.c +++ b/sway/commands/mode.c @@ -22,16 +22,14 @@ struct cmd_results *cmd_mode(int argc, char **argv) { } if (argc > 1 && !config->reading) { - return cmd_results_new(CMD_FAILURE, - "mode", "Can only be used in config file."); + return cmd_results_new(CMD_FAILURE, "Can only be used in config file"); } bool pango = strcmp(*argv, "--pango_markup") == 0; if (pango) { argc--; argv++; if (argc == 0) { - return cmd_results_new(CMD_FAILURE, "mode", - "Mode name is missing"); + return cmd_results_new(CMD_FAILURE, "Mode name is missing"); } } @@ -50,8 +48,7 @@ struct cmd_results *cmd_mode(int argc, char **argv) { if (!mode && argc > 1) { mode = calloc(1, sizeof(struct sway_mode)); if (!mode) { - return cmd_results_new(CMD_FAILURE, - "mode", "Unable to allocate mode"); + return cmd_results_new(CMD_FAILURE, "Unable to allocate mode"); } mode->name = strdup(mode_name); mode->keysym_bindings = create_list(); @@ -61,8 +58,7 @@ struct cmd_results *cmd_mode(int argc, char **argv) { list_add(config->modes, mode); } if (!mode) { - error = cmd_results_new(CMD_INVALID, - "mode", "Unknown mode `%s'", mode_name); + error = cmd_results_new(CMD_INVALID, "Unknown mode `%s'", mode_name); return error; } if ((config->reading && argc > 1) || (!config->reading && argc == 1)) { @@ -75,7 +71,7 @@ struct cmd_results *cmd_mode(int argc, char **argv) { // trigger IPC mode event ipc_event_mode(config->current_mode->name, config->current_mode->pango); - return cmd_results_new(CMD_SUCCESS, NULL, NULL); + return cmd_results_new(CMD_SUCCESS, NULL); } // Create binding |