diff options
author | Ian Fan <[email protected]> | 2018-07-29 10:33:21 +0100 |
---|---|---|
committer | Ian Fan <[email protected]> | 2018-08-06 14:17:45 +0100 |
commit | 710f27d0d2a33e937d5b8dd8c9342b19fa04ebe9 (patch) | |
tree | e04ce9ee56ec3b489050ec9db01bad4e4a0c6be2 /sway/criteria.c | |
parent | 0cd418ba42bf7fa9570a2c1c09cea153d3337c7a (diff) |
commands: allow "first", "last", "newest" and "recent" as values for urgent criteria
Diffstat (limited to 'sway/criteria.c')
-rw-r--r-- | sway/criteria.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sway/criteria.c b/sway/criteria.c index 39d300ea..dd995c4b 100644 --- a/sway/criteria.c +++ b/sway/criteria.c @@ -452,13 +452,18 @@ static bool parse_token(struct criteria *criteria, char *name, char *value) { criteria->tiling = true; break; case T_URGENT: - if (strcmp(effective_value, "latest") == 0) { + if (strcmp(effective_value, "latest") == 0 || + strcmp(effective_value, "newest") == 0 || + strcmp(effective_value, "last") == 0 || + strcmp(effective_value, "recent") == 0) { criteria->urgent = 'l'; - } else if (strcmp(effective_value, "oldest") == 0) { + } else if (strcmp(effective_value, "oldest") == 0 || + strcmp(effective_value, "first") == 0) { criteria->urgent = 'o'; } else { error = - strdup("The value for 'urgent' must be 'latest' or 'oldest'"); + strdup("The value for 'urgent' must be 'first', 'last', " + "'latest', 'newest', 'oldest' or 'recent'"); } break; case T_WORKSPACE: |