Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alternative to #150 - I noticed jumps weren't working, and went and fixed it before noticing the open PR! This continues using the filter, so will only jump to windows on the current space.
jump-window
was trying to access a nonexistent:filter
property of windows instead ofhs.window.filter
. Corrected to instead call(: hs.window.filter :focusWindow<Dir> <frontmost-window> true true)
.One minor change from the original is the use of
(hs.window.frontmostWindow)
as the reference window in place of(hs.window.focusedWindow)
; this will normally use the focused window, but if no window has focus, falls back to the one on "top."Note: Another option would be to use(hs.window.filter:focus<Dir>)
, which callshs.window.focusWindowDir(nil, nil, true)
, nearly identical to what's here except it will include windows covered (or partially covered) by others in the current space/filter when picking which window to focus.I erred on the side of sticking with the originally-intended behavior, but I did play around with it the other way, and I wasn't entirely sure which I liked better. Still, thought I'd mention it for consideration. Might be nice if that's configurable, but I may be over-complicating things.EDIT: I tried it with the
hs.window.filter.focus<Dir>
approach and, yeah, when you have a number of layered windows, it's way too annoying 😆