aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/bar/font.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-11-18 11:22:02 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-11-18 11:22:02 -0500
commit733993a651c71f7e2198d505960d6bbd31e0e107 (patch)
treee51732c5872b624e73355f9e5b3f762101f3cd0d /sway/commands/bar/font.c
parentInitial (awful) pass on xdg shell support (diff)
downloadsway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.gz
sway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.zst
sway-733993a651c71f7e2198d505960d6bbd31e0e107.zip
Move everything to sway/old/
Diffstat (limited to 'sway/commands/bar/font.c')
-rw-r--r--sway/commands/bar/font.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/sway/commands/bar/font.c b/sway/commands/bar/font.c
deleted file mode 100644
index c586c5bc..00000000
--- a/sway/commands/bar/font.c
+++ /dev/null
@@ -1,26 +0,0 @@
1#include <string.h>
2#include "sway/commands.h"
3#include "log.h"
4#include "stringop.h"
5
6struct cmd_results *bar_cmd_font(int argc, char **argv) {
7 struct cmd_results *error = NULL;
8 if ((error = checkarg(argc, "font", EXPECTED_AT_LEAST, 1))) {
9 return error;
10 }
11
12 if (!config->current_bar) {
13 return cmd_results_new(CMD_FAILURE, "font", "No bar defined.");
14 }
15
16 char *font = join_args(argv, argc);
17 free(config->current_bar->font);
18 if (strlen(font) > 6 && strncmp("pango:", font, 6) == 0) {
19 config->current_bar->font = font;
20 } else {
21 config->current_bar->font = font;
22 }
23
24 sway_log(L_DEBUG, "Settings font '%s' for bar: %s", config->current_bar->font, config->current_bar->id);
25 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
26}