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

windows.fnl: fix resize-{up,down} #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jf
Copy link

@jf jf commented Dec 1, 2024

It looks like the :j / :k assignment has been flipped in windows.fnl:

in config.example.fnl, :j = "resize-down" and :k = "resize-up"

(local window-resize
       [...
        {:mods [:shift]
         :key :j
         :action "windows:resize-down"
         :repeatable true}
        {:mods [:shift]
         :key :k
         :action "windows:resize-up"
         :repeatable true}
        ...])

But this is the reverse (before this PR) in windows.fnl:

(fn resize-up
  []
  (resize-window :j))

(fn resize-down
  []
  (resize-window :k))

window-resize in config.example.fnl has :j to resize-down, but in
previous windows.fnl, resize-down = (resize-window :k), and vice versa
for :k and resize-up
@Grazfather
Copy link
Collaborator

Good eye.

That may be correct, but this would flip people's behaviour on them, so I'm not sure we would want to merge this.

This change definitely makes it more intuitive to me. Think of the window as pinned at the top left and we are moving it from the bottom-right corner.

resize-by-increment is also pretty unintuitive.

@jf
Copy link
Author

jf commented Dec 1, 2024

Good eye.

That may be correct, but this would flip people's behaviour on them, so I'm not sure we would want to merge this.

yes, I did think about this; but figured the change was probably for the better since this is actually more intuitive.

Also, just reading the code in its present state without the flip is confusing.

This change definitely makes it more intuitive to me. Think of the window as pinned at the top left and we are moving it from the bottom-right corner.

yes. With the right and bottom edges being the ones adjusted.

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