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 option to center the cursor on the focused window when switching workspaces #3528

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

pdamianik
Copy link
Contributor

@pdamianik pdamianik commented Oct 8, 2023

Describe your PR, what does it fix/add?

Adds an option to disable centering the cursor on a workspace and instead center on the last active window when switching between workspaces with the workspace dispatcher (non breaking - default value is current behavior). See #3491.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I also switched the calculation for the window center in swapActive() to use the middle() method, as it seems like using the current position (I assume this includes animations) is a mistake.

Is it ready for merging, or does it need work?

Ready. I have no particular interest in having this merged, I just provide the code. For any questions regarding the feature please ask the author of issue #3491.

@pdamianik
Copy link
Contributor Author

Tested

@pdamianik
Copy link
Contributor Author

Wiki pr: hyprwm/hyprland-wiki#368

@pdamianik pdamianik marked this pull request as draft October 9, 2023 14:16
@pdamianik pdamianik marked this pull request as ready for review October 9, 2023 14:31
@pdamianik pdamianik changed the title Add option to disable centering on workspace when switching workspace Add option to disable thr cursor centering on a workspace when switching workspace Oct 10, 2023
@pdamianik pdamianik changed the title Add option to disable thr cursor centering on a workspace when switching workspace Add option to disable the cursor centering on a workspace when switching workspace Oct 10, 2023
@pdamianik pdamianik marked this pull request as draft October 10, 2023 06:57
@vaxerski
Copy link
Member

shouldn't that go into binds:?

@pdamianik pdamianik changed the title Add option to disable the cursor centering on a workspace when switching workspace Add option to center the cursor on the focused window when switching workspaces Oct 10, 2023
@pdamianik pdamianik marked this pull request as ready for review October 10, 2023 14:38
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

cool, thanks!

@vaxerski vaxerski merged commit ac1bd47 into hyprwm:main Oct 10, 2023
11 checks passed
@pdamianik pdamianik deleted the center_on_workspace branch October 10, 2023 17:15
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.

None yet

2 participants