mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
Render titles
This commit is contained in:
parent
f3d0885524
commit
b667298a0a
11 changed files with 155 additions and 19 deletions
18
sway/commands/font.c
Normal file
18
sway/commands/font.c
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <string.h>
|
||||
#include "sway/commands.h"
|
||||
#include "sway/config.h"
|
||||
#include "log.h"
|
||||
#include "stringop.h"
|
||||
|
||||
struct cmd_results *cmd_font(int argc, char **argv) {
|
||||
struct cmd_results *error = NULL;
|
||||
if ((error = checkarg(argc, "font", EXPECTED_AT_LEAST, 1))) {
|
||||
return error;
|
||||
}
|
||||
char *font = join_args(argv, argc);
|
||||
free(config->font);
|
||||
config->font = strdup(font);
|
||||
config->font_height = get_font_text_height(font);
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue