diff options
author | Orestis Floros <orestisf1993@gmail.com> | 2017-08-28 05:14:03 +0300 |
---|---|---|
committer | Orestis Floros <orestisf1993@gmail.com> | 2017-09-15 03:38:13 +0300 |
commit | eaf7a49e28b7ff8e1820a1b23350647574a0ed5a (patch) | |
tree | 3ce1affdbb7752eac99998fd58ee95e5317ff60a /parser-specs | |
parent | 0f2bce391686e8c4126338ee28d0e199a49f13b5 (diff) | |
download | i3-eaf7a49e28b7ff8e1820a1b23350647574a0ed5a.tar.gz i3-eaf7a49e28b7ff8e1820a1b23350647574a0ed5a.zip |
Allow assign to workspace by number
Makes "assign [<criteria>] workspace number <number>" work in the same
manner as "move to workspace number <number>" instead of assigning the
window to a workspace named "number <number>".
config.spec is modified to expect a 'number' string and an extra
argument is used in cfg_assign.
For workspaces that don't exist yet, workspace_get is used as a
fallback. This also allows the user to assign to "<number> <workspace>"
eg "2: work" and the full name will be used if workspace number 2
doesn't exist yet.
Fixes #2590.
Diffstat (limited to 'parser-specs')
-rw-r--r-- | parser-specs/config.spec | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/parser-specs/config.spec b/parser-specs/config.spec index 4aa320bf..665b046a 100644 --- a/parser-specs/config.spec +++ b/parser-specs/config.spec @@ -151,8 +151,14 @@ state ASSIGN_WORKSPACE: -> 'workspace' -> + 'number' + -> ASSIGN_WORKSPACE_NUMBER workspace = string - -> call cfg_assign($workspace) + -> call cfg_assign($workspace, 0) + +state ASSIGN_WORKSPACE_NUMBER: + number = string + -> call cfg_assign($number, 1) # no_focus <criteria> state NO_FOCUS: |