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

Add directional movement between windows #1252

Merged
merged 13 commits into from
May 20, 2024

Conversation

marianomarciello
Copy link
Contributor

Description

This patch introduces directional movement between windows.
This patch introduces a new command: MoveWindowAt.
The MoveWindowAt command can be called with 4 parameters:
1 North: swap the current window with the nearest north window
2. South: swap the current window with the nearest south window
3. West: swap the current window with the nearest west window
4. East: swap the current window with the nearest east window

Those commands allow users to use vim key bindings to move windows around. For example my keybindings for the directional movement are:
(command: MoveWindowAt, value: "North", modifier: ["modkey", "Shift"], key: "k"),
(command: MoveWindowAt, value: "South", modifier: ["modkey", "Shift"], key: "j"),
(command: MoveWindowAt, value: "West", modifier: ["modkey", "Shift"], key: "h"),
(command: MoveWindowAt, value: "East", modifier: ["modkey", "Shift"], key: "l"),

Fixes #1242

Type of change

  • Development change (no change visible to user)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation only update (no change to the factual codebase)
  • This change requires a documentation update

Updated user documentation:

Please insert user documentation that should be updated (as in the wiki).

See CONTRIBUTING.md User Documentation section for further details.

Note: Manual page changes must be performed in a commit, not in this PR section.

Should be added a new command (MoveWindowAt) in the External Commands section.

Checklist:

  • Ran make test locally with no errors or warnings reported
    Note: To fully reproduce CI checks, you will need to run make test-full-nix. Usually, this is not necessary.
  • Manual page has been updated accordingly
  • Wiki pages have been updated accordingly (to perform after merge)

Copy link
Member

@mautamu mautamu left a comment

Choose a reason for hiding this comment

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

Sorry about the delay in getting to this; this looks good to me! If there aren't any objections, will plan to merge this week.

changing 'dir' to 'direction' to avoid confusion, as dir usually stands for directory
@hertg
Copy link
Member

hertg commented May 20, 2024

@mautamu I got some time on my hands right now, so I'll go ahead and merge once the checks pass

@hertg hertg merged commit 2796d02 into leftwm:main May 20, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Directional Window movement
3 participants