summaryrefslogtreecommitdiff
path: root/sway/commands/titlebar_separator.c
diff options
context:
space:
mode:
authorhead-gardener <[email protected]>2023-03-12 10:20:50 +0300
committerGitHub <[email protected]>2023-03-12 03:20:50 -0400
commitac31a612164828ca6ae5478332eee3cd2317ffdc (patch)
tree6d76f04b672818d527f277fe632377e0a673e06f /sway/commands/titlebar_separator.c
parent3b101734e67a0966026533ad224d9afa3672e434 (diff)
feature: hide separator between titlebar and content (#91)
Diffstat (limited to 'sway/commands/titlebar_separator.c')
-rw-r--r--sway/commands/titlebar_separator.c19
1 files changed, 19 insertions, 0 deletions
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 <string.h>
+#include <strings.h>
+#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);
+}