zeitlings Posted May 26 Share Posted May 26 (edited) What I was missing in the existing window switchers was a way to navigate between windows of the same application that are scattered across different desktop spaces, so I created one that does just that 😄 Window Navigator Navigate to any window of the currently focused application or any application across all desktops, or switch windows within the current desktop space. Usage Search the windows of the active app globally using the Navigator keyword. Search app windows in the current desktop space using the Switcher keyword. Search all visible windows of all apps globally using the Global keyword. ⏎ to navigate to the selected window. ⌘⏎ to close the selected window. ⌥⏎ to quit the owning application. Configure the hotkeys for quick access. 1. Navigator 2. Switcher 3. Global Edited June 6 by zeitlings v1.3.0 cands, TomBenz, Belfong and 1 other 3 1 Link to comment
zeitlings Posted May 27 Author Share Posted May 27 (edited) Added a third option to navigate all visible windows of all apps globally over all desktop spaces Edited June 6 by zeitlings Link to comment
TomBenz Posted May 27 Share Posted May 27 This workflow would be helpful. I installed and getting Code 133: WindowNavigator/WindowNavigator.swift:320: Fatal error: Unexpectedly found nil while unwrapping an Optional value Using Sonoma 14.4.1 Alfred 5.5 Build 2257 Link to comment
zeitlings Posted May 27 Author Share Posted May 27 Curious. You can try the updated version now to see if the problem is fixed! FYI, if you want the workflow to be more responsive, you can install the Xcode Command Line Tools to create and use a compiled version. xcode-select --install Link to comment
TomBenz Posted May 28 Share Posted May 28 7 hours ago, zeitlings said: Curious. You can try the updated version now to see if the problem is fixed! FYI, if you want the workflow to be more responsive, you can install the Xcode Command Line Tools to create and use a compiled version. xcode-select --install Works good. thank you zeitlings 1 Link to comment
zeitlings Posted May 28 Author Share Posted May 28 Window Navigator v1.2.0 I successfully rewrote the program to rely solely on the Accessibility API 🎉 By removing all AppleScript components, the program is now more predictable, reliable, and faster. Link to comment
dood Posted June 5 Share Posted June 5 Hi @zeitlings – I only have one Arc Browser window open, but many appear in the workflow: Link to comment
zeitlings Posted June 6 Author Share Posted June 6 Hey @dood, I did some digging and found that Arc does some strange things: Each modal or popup seems to be created as a unique window. The same appears to happen when a "booster" is added or has been added - but this behavior is inconsistent. These are not valid windows, although their properties suggest otherwise, but fortunately most of those windows are unnamed. A small caveat is that sometimes the unnamed Arc windows could be considered valid, e.g. when opening the configuration of an extension. Anyway, I've modified the code so that you now have to explicitly opt in to keep unnamed windows. This seems to catch most if not all of the invalid Arc windows. Also note the new hidden environment variable to blacklist specific window names if necessary. v1.3.0 Added configuration option to explicitly preserve or dismiss unnamed windows Added hidden environment variable ignored_window_names to blacklist window names as an additional failsafe Note: Enter the names as a comma separated list Link to comment
vitor Posted June 6 Share Posted June 6 Note that some apps, e.g. Reeder, only have one single unnamed window. So this change (haven’t tested, basing this on the description) may make that app disappear entirely. Link to comment
zeitlings Posted June 6 Author Share Posted June 6 17 minutes ago, vitor said: Note that some apps, e.g. Reeder, only have one single unnamed window. So this change (haven’t tested, basing this on the description) may make that app disappear entirely. Yeah, the solution is a trade-off. I've added the option to explicitly preserve unnamed windows to compensate for those cases. By default, these windows are hidden, but they can be made visible if necessary, at the risk of potentially mixing in other unwanted windows. Given that unnamed windows are the exception in my experience, I think this should be an adequate solution for most situations. Link to comment
jenson Posted June 6 Share Posted June 6 amazing works! thank you very much!!! zeitlings 1 Link to comment
jwrc Posted July 6 Share Posted July 6 (edited) @zeitlings - Loving this workflow, thank you for sharing! Is it possible to add AlfredExtraPane.app support to get a window preview? Would love to drop my window switcher app. Thanks again! Edited July 6 by jwrc Link to comment
zeitlings Posted July 8 Author Share Posted July 8 Hey @jwrc Your question gave me an idea. I'll look into it, but no promises. For you to be able to plug in @Mr Pennyworth's ExtraPane, all you need is a file path in the Quicklook preview, right? Link to comment
Mr Pennyworth Posted July 8 Share Posted July 8 (edited) Quote For you to be able to plug in @Mr Pennyworth's ExtraPane, all you need is a file path in the Quicklook preview, right? Yup, that's right. ExtraPane should pick it up as long as quicklookurl is set to a path to an HTML file on disk or an https URL. I want to eventually add support for image files as well, but currently only html is supported. Edited July 8 by Mr Pennyworth zeitlings 1 Link to comment
unfunfionn Posted July 15 Share Posted July 15 This is an amazing workflow, thanks so much! Apologies if this is an obvious one, but one issue I'm having is with the WindowManager completely dominating the wa command. Is there a way to exclude these results entirely? Link to comment
zeitlings Posted July 15 Author Share Posted July 15 Hey @unfunfionn In 1.3.0, I've added an environment variable to explicitly exclude specific window names (not entire apps though). But from the looks of it, you should able to suppress the those (weirdly, also repeating and probably invalid) windows by entering App Icon Window, Gesture Blocking Overlay as the value of the ignored_window_names variable. Belfong 1 Link to comment
unfunfionn Posted July 16 Share Posted July 16 @zeitlings this worked perfectly, thank you! zeitlings 1 Link to comment
Yair Carel Posted August 21 Share Posted August 21 I just installed the workflow. It installs fine, but when I try to run it using WN or any of the other shortcuts it tell me that it is collecting windows. Then it just disappears. If I then type the command 'wn' the workflow doesn't appear Alfred version: 5.5 [2257] Mac OS version: 14.6.1 (Sonoma) Device: MacBook Air M1 Link to comment
Yair Carel Posted August 21 Share Posted August 21 I think I know what is the issue. When requested to provide window recording permissions I denied the option. Is there a way to make it to work without giving recording permissions? It seems scary to provide those permissions which can be abused. Link to comment
vitor Posted August 21 Share Posted August 21 To get window names, you need screen recording permissions. Apple’s permissions should indeed provide better granularity, but unfortunately don’t. zeitlings 1 Link to comment
Cccc Posted October 2 Share Posted October 2 Hi! I'm on Mac OS 15.0 and I was trying to debug this and I found this: error: 'CGWindowListCreateImage' is unavailable in macOS: Please use ScreenCaptureKit instead. Are there plans to update Window Navigator to account for this? Thanks! Link to comment
zeitlings Posted October 3 Author Share Posted October 3 Hey @Cccc Thanks for reporting this. The already compiled versions still work on macOS 15. Let's hope there actually is a suitable replacement with ScreenCaptureKit - I didn't find anything on a first skim. I'll look into it when I find the time. Link to comment
Belfong Posted October 3 Share Posted October 3 This is a great workflow. Thank you. How are the windows sorted in the result? I wonder if user can determine the sort, whether by app, by name or by last active? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now