From 2445d279604d7be38c00db60ffde4279a3c75459 Mon Sep 17 00:00:00 2001 From: Calvin Lee Date: Sun, 2 Apr 2017 14:38:33 -0600 Subject: Impliment i3-style marks This commit adds three commands to sway: `show_marks`, `mark` and `unmark`. Marks are displayed right-aligned in the window border as i3 does. Marks may be found using criteria. Fixes #1007 --- sway/commands/show_marks.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sway/commands/show_marks.c (limited to 'sway/commands/show_marks.c') diff --git a/sway/commands/show_marks.c b/sway/commands/show_marks.c new file mode 100644 index 00000000..ed56d9e5 --- /dev/null +++ b/sway/commands/show_marks.c @@ -0,0 +1,13 @@ +#include +#include +#include "sway/commands.h" + +struct cmd_results *cmd_show_marks(int argc, char **argv) { + struct cmd_results *error = NULL; + if ((error = checkarg(argc, "show_marks", EXPECTED_EQUAL_TO, 1))) { + return error; + } + + config->show_marks = !strcasecmp(argv[0], "on"); + return cmd_results_new(CMD_SUCCESS, NULL, NULL); +} -- cgit v1.2.3-54-g00ecf