Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i3 feature support: Moving flotaing containers #1092

Merged
merged 2 commits into from
Mar 1, 2017
Merged

i3 feature support: Moving flotaing containers #1092

merged 2 commits into from
Mar 1, 2017

Conversation

4e554c4c
Copy link
Contributor

This commit lets the 'move' command apply to floating containers as well
as tiled ones. The command may be appended with a number of pixels and
then the string px (like '10 px') in order to move the container more
or fewer than the standard ten pixels.

@4e554c4c
Copy link
Contributor Author

I know that sway does not use macros, but I saw that MAX and MIN were used across layout.c already and decided to use them. Please tell me if this should be changed.

@ddevault
Copy link
Contributor

Macros defined by standard headers are fine.

"'move <container|window> to workspace <name>' or "
"'move <container|window|workspace> to output <name|direction>' or "
"'move position mouse'";
swayc_t *view = get_focused_container(&root_container);

if (argc == 3 && strcasecmp(argv[2], "px") == 0 ) {
move_len = (int)strtol(argv[1], NULL, 10);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to call this move_amt. Not really a length.

@ddevault
Copy link
Contributor

Does i3 support move left 10px?

@ddevault
Copy link
Contributor

How about move left 10?

sway/sway.5.txt Outdated
or _next_ swaps the container with its sibling in the same container. Move
_first_ exchanges the focused element in an auto layout with the first
element, i.e. promotes the focused element to master position.
**move** <left|right|up|down|next|prev|first> <[px] px>::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since move prev et al don't work with pixel arguments, split them into a separate doc thing.

@4e554c4c
Copy link
Contributor Author

Yes, i3 allows both move left 10px and move left 10. This has been ammended.

@4e554c4c 4e554c4c closed this Mar 1, 2017
@4e554c4c 4e554c4c reopened this Mar 1, 2017
sway/sway.5.txt Outdated
element, i.e. promotes the focused element to master position.
**move** <left|right|up|down> <[px] px>::
Moves the focused container _left_, _right_, _up_, or _down_. If the window
is floating it moves it _px_ in that direction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify that px is optional and changes the behavior? Maybe this should be split again into two sections. Current version is unclear about the distinction between move left and move left 10px

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can see how this needs clarification. Both move left and move left 10px affect both floating and tiled containers. Why should they be split into different sections?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just proposing that two sections might make sense. If you can sufficiently clarify it without that's fine.

Calvin Lee added 2 commits March 1, 2017 11:00
This commit lets the 'move' command apply to floating containers as well
as tiled ones. The command may be appended with a number of pixels and
then optionally the string `px` (like '10 px') in order to move the
container more or fewer than the standard ten pixels.
@ddevault ddevault merged commit d6ac302 into swaywm:master Mar 1, 2017
@ddevault
Copy link
Contributor

ddevault commented Mar 1, 2017

Thanks!

@4e554c4c 4e554c4c deleted the move_floating branch April 4, 2017 04:11
@ddevault ddevault mentioned this pull request Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants