sway/sway/commands/bar/window_title.c
Felix Weilbach 13835cf767 Add configuration option to disable window title
Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2021-04-30 22:36:39 +02:00

24 lines
682 B
C

#include <string.h>
#include <strings.h>
#include "sway/commands.h"
#include "log.h"
#include "util.h"
struct cmd_results *bar_cmd_window_title(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "window_title", EXPECTED_EQUAL_TO, 1))) {
return error;
}
config->current_bar->window_title =
parse_boolean(argv[0], config->current_bar->window_title);
if (config->current_bar->window_title) {
sway_log(SWAY_DEBUG,
"Enabling window title on bar: %s",
config->current_bar->id);
} else {
sway_log(SWAY_DEBUG,
"Disabling window title on bar: %s",
config->current_bar->id);
}
return cmd_results_new(CMD_SUCCESS, NULL);
}