Replies: 1 comment 1 reply
-
|
That's hammerspoon behaviour. I don't like it either and almost exclusively use grid presets. (local
arrow-map
{:k {:half [0 0 1 .5] :movement [ 0 -20] :complement :h :resize "Shorter"}
:j {:half [0 .5 1 .5] :movement [ 0 20] :complement :l :resize "Taller"}
:h {:half [0 0 .5 1] :movement [-20 0] :complement :j :resize "Thinner"}
:l {:half [.5 0 .5 1] :movement [ 20 0] :complement :k :resize "Wider"}})
(fn resize-window
[arrow]
"
Resizes a window against the grid specifed in config.fnl
Takes an arrow string like :h :k :j :l
Performs a side effect to resize the current window.
Returns nil
"
(: history :push)
;; hs.grid.resizeWindowShorter/Taller/Thinner/Wider
(grid :resizeWindow (. arrow-map arrow :resize)))
(fn resize-left [] (resize-window :h))
(fn resize-up [] (resize-window :j))
(fn resize-down [] (resize-window :k))
(fn resize-right [] (resize-window :l))So we see that these bindings are just |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
spacehammer's resizing behaviour is at present confusing (
LEAD w+Shift + hjkl).Assuming the default 3x2 grid:
Let's start with
Shift +j/k, and starting off with a maximized window:Shift + jresizes the window to the top half (I would expect it to be the bottom half instead)Shift + kseems to do nothing... but if u did aShift + jpreviously, then u see thatShift + kbasically maximizes the window.Shift + h/l(pay attention to which edges of the window get shifted visually):Shift + handShift + lprogressively shift the "right" edge of the window (whether this is actually how it does it does not matter; it just appears that way intuitively) left and right along the grid, so that the window occupies the leftmost 1/3, leftmost 2/3, or 3/3 of the screenLEAD w+l):Shift + hvisually shifts the "left" edge of the window to the right so that the window now takes up the rightmost 1/3 of the screen. FurtherShift + h-ing does nothing (left edge does not move further).Shift + lprogressively shifts the left edge (left edge again as well) of the window so that the window progressively takes up the rightmost 2/3, then full 3/3 of the screenShift + lshifts the left edge of the window as described above... and now if you doShift + h, it shifts the right edge instead, resulting in a window taking up the middle 1/3 column of the screen. If you now doShift + land thenShift + halternately, these both now shift the right edge insteadShift + lthenShift + has mentioned results in a window taking up the middle 1/3 column of the screen. Now if you doShift + l, it shifts the right edge of the window so that the window takes up the rightmost 2/3 of the screen. HOWEVER, do aShift + lagain, and now the left edge of the window is shifted instead, so that the window now takes up the full width of the screen.Beta Was this translation helpful? Give feedback.
All reactions