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 split preselection #2240

Merged
merged 21 commits into from
May 6, 2023
Merged

Add split preselection #2240

merged 21 commits into from
May 6, 2023

Conversation

DashieTM
Copy link
Contributor

@DashieTM DashieTM commented May 4, 2023

Describe your PR, what does it fix/add?

This adds the bspwm like preselection in case you want your window to open in a specific direction.
Note this only works for Dwindle.

Changes

added a persistent mode: permanent_direction_override
this leaves the selected direction until: another direction has been specified, no direction has been specified (any other character as direction as those who would specify a direction), or this mode is turned off in config.

config entry is in dwindle -> dwindle:permanent_direction_override

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

I am not a user of groups, and or special workspaces, so if there are issues with them please tell me.

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

It should be ready for merging, a quick look at the impl is ofc appreciated.

Usage

hyprctl dispatch layoutmsg "preselect u" -> up (or t)
hyprctl dispatch layoutmsg "preselect d" -> down (or b)
hyprctl dispatch layoutmsg "preselect r" -> right
hyprctl dispatch layoutmsg "preselect l" -> left
hyprctl dispatch layoutmsg "preselect n" -> no direction (this can be any character other than those above)
the no direction is needed to reset the override in persistent mode.

wiki entry: hyprwm/hyprland-wiki#218
implements: #836

@DashieTM DashieTM marked this pull request as draft May 4, 2023 19:58
src/managers/KeybindManager.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/managers/KeybindManager.cpp Outdated Show resolved Hide resolved
@DashieTM DashieTM requested a review from vaxerski May 5, 2023 06:04
@DashieTM DashieTM requested a review from vaxerski May 5, 2023 16:01
@DashieTM DashieTM marked this pull request as ready for review May 5, 2023 17:04
@DashieTM DashieTM changed the title Draft: Add one time split preselection Add one time split preselection May 5, 2023
@DashieTM
Copy link
Contributor Author

DashieTM commented May 5, 2023

I added a persistent mode as well, changes are in the description above, not much changed, seemed like a good thing to include. Now people can go out and tell others hey hyprland now has "manual tiling" as well :P

@DashieTM DashieTM changed the title Add one time split preselection Add split preselection May 5, 2023
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
@DashieTM DashieTM requested a review from vaxerski May 5, 2023 22:50
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.

last style nits. Generally looks fine, I hope you tested this

src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
src/layout/DwindleLayout.cpp Outdated Show resolved Hide resolved
@DashieTM
Copy link
Contributor Author

DashieTM commented May 5, 2023

I have been using this, haven't noticed anything. It essentially just uses what is already there either way.

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.

gangsta

@vaxerski vaxerski merged commit a8541d5 into hyprwm:main May 6, 2023
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