From ac31a612164828ca6ae5478332eee3cd2317ffdc Mon Sep 17 00:00:00 2001 From: head-gardener <49650767+head-gardener@users.noreply.github.com> Date: Sun, 12 Mar 2023 10:20:50 +0300 Subject: feature: hide separator between titlebar and content (#91) --- sway/commands/titlebar_separator.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sway/commands/titlebar_separator.c (limited to 'sway/commands/titlebar_separator.c') diff --git a/sway/commands/titlebar_separator.c b/sway/commands/titlebar_separator.c new file mode 100644 index 00000000..a5ec97f6 --- /dev/null +++ b/sway/commands/titlebar_separator.c @@ -0,0 +1,19 @@ +#include +#include +#include "sway/commands.h" +#include "util.h" + +struct cmd_results *cmd_titlebar_separator(int argc, char **argv) { + struct cmd_results *error = NULL; + if ((error = checkarg(argc, "titlebar_separator", EXPECTED_EQUAL_TO, 1))) { + return error; + } else if(strcmp(argv[0], "disable") == 0) { + config->titlebar_separator = false; + } else if(strcmp(argv[0], "enable") == 0) { + config->titlebar_separator = true; + } else { + return cmd_results_new(CMD_FAILURE, + "Expected 'titlebar_separator enable|disable'"); + } + return cmd_results_new(CMD_SUCCESS, NULL); +} -- cgit v1.2.3