aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/bar/height.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 22:05:16 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 22:11:08 -0400
commit741424c4e7811c12d8cca28466f89bd61eaf3a75 (patch)
tree37af2aa063d42bf6ef3bc967bb1a5b6b679abbaf /sway/commands/bar/height.c
parentUse statically allocated text buffer (diff)
downloadsway-741424c4e7811c12d8cca28466f89bd61eaf3a75.tar.gz
sway-741424c4e7811c12d8cca28466f89bd61eaf3a75.tar.zst
sway-741424c4e7811c12d8cca28466f89bd61eaf3a75.zip
Clean up imported bar commands
Diffstat (limited to 'sway/commands/bar/height.c')
-rw-r--r--sway/commands/bar/height.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sway/commands/bar/height.c b/sway/commands/bar/height.c
index ae0c7834..3160caed 100644
--- a/sway/commands/bar/height.c
+++ b/sway/commands/bar/height.c
@@ -8,14 +8,13 @@ struct cmd_results *bar_cmd_height(int argc, char **argv) {
8 if ((error = checkarg(argc, "height", EXPECTED_EQUAL_TO, 1))) { 8 if ((error = checkarg(argc, "height", EXPECTED_EQUAL_TO, 1))) {
9 return error; 9 return error;
10 } 10 }
11
12 int height = atoi(argv[0]); 11 int height = atoi(argv[0]);
13 if (height < 0) { 12 if (height < 0) {
14 return cmd_results_new(CMD_INVALID, "height", 13 return cmd_results_new(CMD_INVALID, "height",
15 "Invalid height value: %s", argv[0]); 14 "Invalid height value: %s", argv[0]);
16 } 15 }
17
18 config->current_bar->height = height; 16 config->current_bar->height = height;
19 wlr_log(L_DEBUG, "Setting bar height to %d on bar: %s", height, config->current_bar->id); 17 wlr_log(L_DEBUG, "Setting bar height to %d on bar: %s",
18 height, config->current_bar->id);
20 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 19 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
21} 20}