Skip to content

feat: add move_client - #1284

Open
Sora3e8 wants to merge 2 commits into
mangowm:mainfrom
Sora3e8:move-client
Open

feat: add move_client#1284
Sora3e8 wants to merge 2 commits into
mangowm:mainfrom
Sora3e8:move-client

Conversation

@Sora3e8

@Sora3e8 Sora3e8 commented Aug 14, 2026

Copy link
Copy Markdown

Inspired by previous pull request #1022
Previously requested in Feature request #942

Changes done in comparison to #1022

  • Synced with current codebase
  • Added handling for cross-monitor move
  • Simplified the implementation making it as symmetric for dwindle layout and for other layouts as possible

Spec description:

  • When move_client,dir is sent window is moved into that direction
  • If window hits and edge of a monitor the window will be moved to next monitor if a monitor exists in that direction,
    otherwise nothing will happen.

Note:

  • I also attempted to make fully infinitely cycling through monitors if no other monitor is in that direction,
    so it would go to x=0 or y=0 again, but the conditions proved troublesome and probably would be good to have a new config for that as well... so I stuck with blocking if no other monitor is in the direction.
  • This is nowhere near perfect or complete as some layouts do not work as well with this,
    this seems to be primarily caused by way which the functions retrieving client in certain direction work.

@Sora3e8 Sora3e8 changed the title Move client add: move_client Aug 14, 2026
@Sora3e8 Sora3e8 changed the title add: move_client feat: add move_client Aug 14, 2026
@Wateir

Wateir commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

https://github.com/mangowm/mango/blob/main/.github/CONTRIBUTING.md

Squash all commit into one, and idk if need run ./format.sh if you have forgot

- Inspired by previous pull request mangowm#1022
- Synced with current codebase
- Fixed crossmonitor behavior, windows can jump from monitor to monitor

Spec description:
- When move_client,dir is sent window is moved into that direction
- If window hits and edge of a monitor the window will be moved to next monitor if a monitor exists in that direction,
otherwise nothing will happen.
@Sora3e8

Sora3e8 commented Aug 15, 2026

Copy link
Copy Markdown
Author

@Wateir
I've squashed the commits.

Regarding the format, I was running the format script through out the process, it's possible I might have forgot to trigger it.
However I've checked the script and it seems to be triggering clang format, I am using neovim with clang as well and I see in the repo there's .clang-format file, so it should be fine.

I tried to run it just in case and I do not see any new diff.

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.

2 participants