diff options
Diffstat (limited to 'sway/commands/bar/strip_workspace_numbers.c')
-rw-r--r-- | sway/commands/bar/strip_workspace_numbers.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sway/commands/bar/strip_workspace_numbers.c b/sway/commands/bar/strip_workspace_numbers.c index 9ac32482..4f24a356 100644 --- a/sway/commands/bar/strip_workspace_numbers.c +++ b/sway/commands/bar/strip_workspace_numbers.c | |||
@@ -5,23 +5,25 @@ | |||
5 | 5 | ||
6 | struct cmd_results *bar_cmd_strip_workspace_numbers(int argc, char **argv) { | 6 | struct cmd_results *bar_cmd_strip_workspace_numbers(int argc, char **argv) { |
7 | struct cmd_results *error = NULL; | 7 | struct cmd_results *error = NULL; |
8 | if ((error = checkarg(argc, "strip_workspace_numbers", EXPECTED_EQUAL_TO, 1))) { | 8 | if ((error = checkarg(argc, |
9 | "strip_workspace_numbers", EXPECTED_EQUAL_TO, 1))) { | ||
9 | return error; | 10 | return error; |
10 | } | 11 | } |
11 | |||
12 | if (!config->current_bar) { | 12 | if (!config->current_bar) { |
13 | return cmd_results_new(CMD_FAILURE, "strip_workspace_numbers", "No bar defined."); | 13 | return cmd_results_new(CMD_FAILURE, |
14 | "strip_workspace_numbers", "No bar defined."); | ||
14 | } | 15 | } |
15 | |||
16 | if (strcasecmp("yes", argv[0]) == 0) { | 16 | if (strcasecmp("yes", argv[0]) == 0) { |
17 | config->current_bar->strip_workspace_numbers = true; | 17 | config->current_bar->strip_workspace_numbers = true; |
18 | sway_log(L_DEBUG, "Stripping workspace numbers on bar: %s", config->current_bar->id); | 18 | wlr_log(L_DEBUG, "Stripping workspace numbers on bar: %s", |
19 | config->current_bar->id); | ||
19 | } else if (strcasecmp("no", argv[0]) == 0) { | 20 | } else if (strcasecmp("no", argv[0]) == 0) { |
20 | config->current_bar->strip_workspace_numbers = false; | 21 | config->current_bar->strip_workspace_numbers = false; |
21 | sway_log(L_DEBUG, "Enabling workspace numbers on bar: %s", config->current_bar->id); | 22 | wlr_log(L_DEBUG, "Enabling workspace numbers on bar: %s", |
23 | config->current_bar->id); | ||
22 | } else { | 24 | } else { |
23 | error = cmd_results_new(CMD_INVALID, "strip_workspace_numbers", "Invalid value %s", argv[0]); | 25 | return cmd_results_new(CMD_INVALID, |
24 | return error; | 26 | "strip_workspace_numbers", "Invalid value %s", argv[0]); |
25 | } | 27 | } |
26 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 28 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
27 | } | 29 | } |