Closed taquangtrung closed 3 years ago
That does look odd, will see if I can reproduce.
Wasn't able to reproduce the issue, but did find some insight as to the cause.
If you open ~/.hammerspoon/apps.fnl you should see:
{:textSize 12
:showTitles false
:showThumbnails false
:showSelectedTitle false
:selectedThumbnailSize 800
:backgroundColor [0 0 0 0]}
Which are options for https://www.hammerspoon.org/docs/hs.window.switcher.html#ui.
Maybe you can try changing those around, see what works for you, and I can give them a shot then we can either make a PR or I can make it a bit smarter to calculate based on screen size.
Though after more testing the :selectedThumbnailSize 800
is the likely culprit. Try using:
{:textSize 12
:showTitles false
:showThumbnails false
:showSelectedTitle false
:selectedThumbnailSize (let [screen (hs.screen.mainScreen)
{: h} (: screen :currentMode)]
(/ h 2))
:backgroundColor [0 0 0 0]}
And if that doesn't work try replacing (/ h 2)
with (/ h 4)
and let us know if one of those works better
Great! Thanks for your patch. Using (/ h 2)
is nicer.
Here is a screenshoot for your reference. ((/ h 4)
will produce smaller thumbnails)
Btw, I noticed that some minimized windows didn't appear when switching windows by Opt-n
, Opt-p
. Is it possible to include them too?
Looked into this briefly:
(local filter (hs.window.filter.new))
(doto filter
(: :setCurrentSpace true)
(: :setDefaultFilter {}))
(global switcher
(hs.window.switcher.new
filter
{:textSize 12
:showTitles false
:showThumbnails false
:showSelectedTitle false
:selectedThumbnailSize (let [screen (hs.screen.mainScreen)
{: h} (: screen :currentMode)]
(/ h 2))
:backgroundColor [0 0 0 0]}))
It's creating a new hs.window.filter
, with a copy of the defaults https://www.hammerspoon.org/docs/hs.window.filter.html#default
Then in the doto it sets currentSpace to true https://www.hammerspoon.org/docs/hs.window.filter.html#setCurrentSpace that basically only allows windows in the current mission control space
Finally, it resets the general filters not tied to a specific app https://www.hammerspoon.org/docs/hs.window.filter.html#setDefaultFilter (distinct from hs.window.filter.default
)
This combo seems like a reasonable balance of catching usable windows, but without excluding minimized windows. Feel free to tweak it further to fir your use case.
Thinking of making two PRs:
:app-switcher-filter
to set a custom app-switcher-filter instance that could be defined in config.fnl instead of changing the apps definition.One note is sometimes the filter can be inconsistent, and you may need to press alt+n
once or twice to get the filter to take effect. I think it caches the window list to avoid expensive re-queries based on some hints from the docs.
- That adds a config option
:app-switcher-filter
to set a custom app-switcher-filter instance that could be defined in config.fnl instead of changing the apps definition.
Great! I think this will be very useful since the current Alt-Tab of macOS doesn't show minimized windows.
Hi,
I'm using the newest Spacehammer and when pressing
Option-n/p
to select apps, the app icons and previews appear too big, overflow the screen (see attached screenshot).Could you advise how to make them smaller so that I can see the full icons?