zeitlings Posted May 26, 2024 Posted May 26, 2024 (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, 2024 by zeitlings v1.3.0 TomBenz, Textdriven, Tokoroflow and 2 others 4 1
zeitlings Posted May 27, 2024 Author Posted May 27, 2024 (edited) Added a third option to navigate all visible windows of all apps globally over all desktop spaces Edited June 6, 2024 by zeitlings
TomBenz Posted May 27, 2024 Posted May 27, 2024 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
zeitlings Posted May 27, 2024 Author Posted May 27, 2024 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
TomBenz Posted May 28, 2024 Posted May 28, 2024 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
zeitlings Posted May 28, 2024 Author Posted May 28, 2024 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.
dood Posted June 5, 2024 Posted June 5, 2024 Hi @zeitlings – I only have one Arc Browser window open, but many appear in the workflow:
zeitlings Posted June 6, 2024 Author Posted June 6, 2024 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
vitor Posted June 6, 2024 Posted June 6, 2024 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.
zeitlings Posted June 6, 2024 Author Posted June 6, 2024 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.
jwrc Posted July 6, 2024 Posted July 6, 2024 (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, 2024 by jwrc
zeitlings Posted July 8, 2024 Author Posted July 8, 2024 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?
Mr Pennyworth Posted July 8, 2024 Posted July 8, 2024 (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, 2024 by Mr Pennyworth zeitlings 1
unfunfionn Posted July 15, 2024 Posted July 15, 2024 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?
zeitlings Posted July 15, 2024 Author Posted July 15, 2024 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
unfunfionn Posted July 16, 2024 Posted July 16, 2024 @zeitlings this worked perfectly, thank you! zeitlings 1
Yair Carel Posted August 21, 2024 Posted August 21, 2024 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
Yair Carel Posted August 21, 2024 Posted August 21, 2024 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.
vitor Posted August 21, 2024 Posted August 21, 2024 To get window names, you need screen recording permissions. Apple’s permissions should indeed provide better granularity, but unfortunately don’t. zeitlings 1
Cccc Posted October 2, 2024 Posted October 2, 2024 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!
zeitlings Posted October 3, 2024 Author Posted October 3, 2024 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.
Belfong Posted October 3, 2024 Posted October 3, 2024 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?
zeitlings Posted January 9 Author Posted January 9 v2.0.0 Rewrite to compensate for the deprecation of CGWindowListCreateImage in macOS 15 Side-effect: Minimized windows are now also shown The rewrite heavily relies on the Accessibility API. This results in a less performant version of the workflow, which is compensated with caching as much as possible. If you're already using a previous version of the workflow compiled before macOS 15, you can safely skip this update. On 10/3/2024 at 11:07 AM, Belfong said: 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? There is no dedicated sorting in place, however, related windows are now clustered together. Tokoroflow, Belfong and neius_ 2 1
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