diff options
Diffstat (limited to 'sway/commands/font.c')
-rw-r--r-- | sway/commands/font.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/sway/commands/font.c b/sway/commands/font.c deleted file mode 100644 index 32994f8a..00000000 --- a/sway/commands/font.c +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | #define _XOPEN_SOURCE 500 | ||
2 | #include <string.h> | ||
3 | #include "sway/border.h" | ||
4 | #include "sway/commands.h" | ||
5 | #include "log.h" | ||
6 | #include "stringop.h" | ||
7 | |||
8 | struct cmd_results *cmd_font(int argc, char **argv) { | ||
9 | struct cmd_results *error = NULL; | ||
10 | if ((error = checkarg(argc, "font", EXPECTED_AT_LEAST, 1))) { | ||
11 | return error; | ||
12 | } | ||
13 | |||
14 | char *font = join_args(argv, argc); | ||
15 | free(config->font); | ||
16 | if (strlen(font) > 6 && strncmp("pango:", font, 6) == 0) { | ||
17 | config->font = strdup(font + 6); | ||
18 | free(font); | ||
19 | } else { | ||
20 | config->font = font; | ||
21 | } | ||
22 | |||
23 | config->font_height = get_font_text_height(config->font); | ||
24 | |||
25 | sway_log(L_DEBUG, "Settings font %s", config->font); | ||
26 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | ||
27 | } | ||