summaryrefslogtreecommitdiff
path: root/sway/commands/titlebar_separator.c
diff options
context:
space:
mode:
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);
+}