aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/bar/pango_markup.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/bar/pango_markup.c')
-rw-r--r--sway/commands/bar/pango_markup.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sway/commands/bar/pango_markup.c b/sway/commands/bar/pango_markup.c
index 34b85e98..480af724 100644
--- a/sway/commands/bar/pango_markup.c
+++ b/sway/commands/bar/pango_markup.c
@@ -8,19 +8,20 @@ struct cmd_results *bar_cmd_pango_markup(int argc, char **argv) {
8 if ((error = checkarg(argc, "pango_markup", EXPECTED_EQUAL_TO, 1))) { 8 if ((error = checkarg(argc, "pango_markup", EXPECTED_EQUAL_TO, 1))) {
9 return error; 9 return error;
10 } 10 }
11
12 if (!config->current_bar) { 11 if (!config->current_bar) {
13 return cmd_results_new(CMD_FAILURE, "pango_markup", "No bar defined."); 12 return cmd_results_new(CMD_FAILURE, "pango_markup", "No bar defined.");
14 } 13 }
15
16 if (strcasecmp("enabled", argv[0]) == 0) { 14 if (strcasecmp("enabled", argv[0]) == 0) {
17 config->current_bar->pango_markup = true; 15 config->current_bar->pango_markup = true;
18 wlr_log(L_DEBUG, "Enabling pango markup for bar: %s", config->current_bar->id); 16 wlr_log(L_DEBUG, "Enabling pango markup for bar: %s",
17 config->current_bar->id);
19 } else if (strcasecmp("disabled", argv[0]) == 0) { 18 } else if (strcasecmp("disabled", argv[0]) == 0) {
20 config->current_bar->pango_markup = false; 19 config->current_bar->pango_markup = false;
21 wlr_log(L_DEBUG, "Disabling pango markup for bar: %s", config->current_bar->id); 20 wlr_log(L_DEBUG, "Disabling pango markup for bar: %s",
21 config->current_bar->id);
22 } else { 22 } else {
23 error = cmd_results_new(CMD_INVALID, "pango_markup", "Invalid value %s", argv[0]); 23 error = cmd_results_new(CMD_INVALID, "pango_markup",
24 "Invalid value %s", argv[0]);
24 return error; 25 return error;
25 } 26 }
26 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 27 return cmd_results_new(CMD_SUCCESS, NULL, NULL);