From 22d38600d0edbb35029b3076c14e0e119dbf3dd2 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 14 May 2018 22:47:10 +1000 Subject: Implement marks --- sway/commands.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sway/commands.c') diff --git a/sway/commands.c b/sway/commands.c index 60c64776..31d241a8 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -175,6 +175,7 @@ static struct cmd_handler command_handlers[] = { { "focus", cmd_focus }, { "kill", cmd_kill }, { "layout", cmd_layout }, + { "mark", cmd_mark }, { "move", cmd_move }, { "opacity", cmd_opacity }, { "reload", cmd_reload }, @@ -185,6 +186,7 @@ static struct cmd_handler command_handlers[] = { { "splitt", cmd_splitt }, { "splitv", cmd_splitv }, { "title_format", cmd_title_format }, + { "unmark", cmd_unmark }, }; static int handler_compare(const void *_a, const void *_b) { -- cgit v1.2.3 From 4d1edfcba90854bd7f37ecb1b36fe4f05c37dda3 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 15 May 2018 11:24:16 +1000 Subject: Change unmark implemention to match i3's --- sway/commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sway/commands.c') diff --git a/sway/commands.c b/sway/commands.c index 31d241a8..9b6d6459 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -302,7 +302,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) { head = exec; do { // Extract criteria (valid for this command list only). - bool has_criteria = false; + config->handler_context.using_criteria = false; if (*head == '[') { char *error = NULL; struct criteria *criteria = criteria_parse(head, &error); @@ -315,7 +315,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) { views = criteria_get_views(criteria); head += strlen(criteria->raw); criteria_destroy(criteria); - has_criteria = true; + config->handler_context.using_criteria = true; // Skip leading whitespace head += strspn(head, whitespace); } @@ -352,7 +352,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) { goto cleanup; } - if (!has_criteria) { + if (!config->handler_context.using_criteria) { // without criteria, the command acts upon the focused // container config->handler_context.current_container = -- cgit v1.2.3