diff options
-rw-r--r-- | sway/commands/move.c | 9 | ||||
-rw-r--r-- | sway/sway.5.scd | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c index 4dec889c..9c6e69ec 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c | |||
@@ -28,6 +28,15 @@ static const char expected_syntax[] = | |||
28 | 28 | ||
29 | static struct sway_output *output_in_direction(const char *direction_string, | 29 | static struct sway_output *output_in_direction(const char *direction_string, |
30 | struct sway_output *reference, int ref_lx, int ref_ly) { | 30 | struct sway_output *reference, int ref_lx, int ref_ly) { |
31 | if (strcasecmp(direction_string, "current") == 0) { | ||
32 | struct sway_workspace *active_ws = | ||
33 | seat_get_focused_workspace(config->handler_context.seat); | ||
34 | if (!active_ws) { | ||
35 | return NULL; | ||
36 | } | ||
37 | return active_ws->output; | ||
38 | } | ||
39 | |||
31 | struct { | 40 | struct { |
32 | char *name; | 41 | char *name; |
33 | enum wlr_direction direction; | 42 | enum wlr_direction direction; |
diff --git a/sway/sway.5.scd b/sway/sway.5.scd index 9fe51c33..32631b06 100644 --- a/sway/sway.5.scd +++ b/sway/sway.5.scd | |||
@@ -206,7 +206,7 @@ set|plus|minus <amount> | |||
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] [to] output <name-or-id> | 209 | *move* [container|window] [to] output <name-or-id>|current |
210 | Moves the focused container to the specified output. | 210 | Moves the focused container to the specified output. |
211 | 211 | ||
212 | *move* [container|window] [to] output up|right|down|left | 212 | *move* [container|window] [to] output up|right|down|left |
@@ -216,10 +216,10 @@ set|plus|minus <amount> | |||
216 | *move* [container|window] [to] scratchpad | 216 | *move* [container|window] [to] scratchpad |
217 | Moves the focused container to the scratchpad. | 217 | Moves the focused container to the scratchpad. |
218 | 218 | ||
219 | *move* workspace [to] output <name-or-id> | 219 | *move* workspace [to] output <name-or-id>|current |
220 | Moves the focused workspace to the specified output. | 220 | Moves the focused workspace to the specified output. |
221 | 221 | ||
222 | *move* workspace to [output] <name-or-id> | 222 | *move* workspace to [output] <name-or-id>|current |
223 | Moves the focused workspace to the specified output. | 223 | Moves the focused workspace to the specified output. |
224 | 224 | ||
225 | *move* workspace [to] output up|right|down|left | 225 | *move* workspace [to] output up|right|down|left |