diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-04-19 02:46:49 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-04-19 08:39:57 -0600 |
commit | 09595da0bcf84364e957235c8c50c69d11912515 (patch) | |
tree | 6be531d8a730b4cc081cf98ca605baa656103339 /sway/sway.5.scd | |
parent | hide_edge_borders.c: add missing case for --i3 (diff) | |
download | sway-09595da0bcf84364e957235c8c50c69d11912515.tar.gz sway-09595da0bcf84364e957235c8c50c69d11912515.tar.zst sway-09595da0bcf84364e957235c8c50c69d11912515.zip |
cmd_move: allow for all i3 syntax options
This modifies cmd_move to allow for the syntax options allowed by i3.
The following syntaxes are supported:
- `move left|right|up|down [<amount> [px]]`
- `move [--no-auto-back-and-forth] [window|container] [to] workspace
<name>|next|prev|next_on_output|prev_on_output|current|number <num>`
- `move [window|container] [to] output <name/id>|left|right|up|down`
- `move [window|container] [to] mark <mark>`
- `move workspace to [output] <name/id>|left|right|up|down`
- `move [window|container] [to] [absolute] position <x> [px] <y> [px]`
- `move [window|container] [to] [absolute] position center`
- `move [window|container] [to] position mouse|cursor|pointer`
This also allows retains the following syntax option that is not
supported by i3, but is supported in sway 1.0:
- `move workspace [to] output <name/id>|left|right|up|down`
The changes are:
- `window` and `container` are now optional
- `output` is now optional for `move workspace` when `to` is given
There is also stricter command checking now. If `absolute` or
`--no-auto-back-and-forth` are given for commands that do not support
them, it will be treated as invalid syntax instead of being silently
ignored.
Diffstat (limited to 'sway/sway.5.scd')
-rw-r--r-- | sway/sway.5.scd | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/sway/sway.5.scd b/sway/sway.5.scd index 80193651..230ceeec 100644 --- a/sway/sway.5.scd +++ b/sway/sway.5.scd | |||
@@ -187,34 +187,46 @@ set|plus|minus <amount> | |||
187 | *move* position cursor|mouse|pointer | 187 | *move* position cursor|mouse|pointer |
188 | Moves the focused container to be centered on the cursor. | 188 | Moves the focused container to be centered on the cursor. |
189 | 189 | ||
190 | *move* container|window [to] mark <mark> | 190 | *move* [container|window] [to] mark <mark> |
191 | Moves the focused container to the specified mark. | 191 | Moves the focused container to the specified mark. |
192 | 192 | ||
193 | *move* [--no-auto-back-and-forth] container|window [to] workspace [number] <name> | 193 | *move* [--no-auto-back-and-forth] [container|window] [to] workspace [number] <name> |
194 | Moves the focused container to the specified workspace. The string "number" | 194 | Moves the focused container to the specified workspace. The string "number" |
195 | is optional and is used to match a workspace with the same number, even if | 195 | is optional and is used to match a workspace with the same number, even if |
196 | it has a different name. | 196 | it has a different name. |
197 | 197 | ||
198 | *move* container|window [to] workspace prev|next|current | 198 | *move* [container|window] [to] workspace prev|next|current |
199 | Moves the focused container to the previous, next or current workspace on | 199 | Moves the focused container to the previous, next or current workspace on |
200 | this output, or if no workspaces remain, the previous or next output. | 200 | this output, or if no workspaces remain, the previous or next output. |
201 | 201 | ||
202 | *move* container|window [to] workspace prev_on_output|next_on_output | 202 | *move* [container|window] [to] workspace prev_on_output|next_on_output |
203 | Moves the focused container to the previous or next workspace on this | 203 | Moves the focused container to the previous or next workspace on this |
204 | output, wrapping around if already at the first or last workspace. | 204 | output, wrapping around if already at the first or last workspace. |
205 | 205 | ||
206 | *move* container|window [to] workspace back_and_forth | 206 | *move* [container|window] [to] workspace back_and_forth |
207 | Moves the focused container to previously focused workspace. | 207 | Moves the focused container to previously focused workspace. |
208 | 208 | ||
209 | *move* container|window|workspace [to] output <name> | 209 | *move* [container|window] [to] output <name-or-id> |
210 | Moves the focused container or workspace to the specified output. | 210 | Moves the focused container to the specified output. |
211 | 211 | ||
212 | *move* container|window|workspace [to] output up|right|down|left | 212 | *move* [container|window] [to] output up|right|down|left |
213 | Moves the focused container or workspace to next output in the specified | 213 | Moves the focused container to next output in the specified |
214 | direction. | 214 | direction. |
215 | 215 | ||
216 | *move* [to] scratchpad | 216 | *move* [container|window] [to] scratchpad |
217 | Moves the focused window to the scratchpad. | 217 | Moves the focused container to the scratchpad. |
218 | |||
219 | *move* workspace [to] output <name-or-id> | ||
220 | Moves the focused workspace to the specified output. | ||
221 | |||
222 | *move* workspace to [output] <name-or-id> | ||
223 | Moves the focused workspace to the specified output. | ||
224 | |||
225 | *move* workspace [to] output up|right|down|left | ||
226 | Moves the focused workspace to next output in the specified direction. | ||
227 | |||
228 | *move* workspace to [output] up|right|down|left | ||
229 | Moves the focused workspace to next output in the specified direction. | ||
218 | 230 | ||
219 | *nop* <comment> | 231 | *nop* <comment> |
220 | A no operation command that can be used to override default behaviour. The | 232 | A no operation command that can be used to override default behaviour. The |