Jump to content

Window Navigator


Recommended Posts

Posted (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 😄

 

image.png.67e7bcb6aac7b71297fa68b6f937c54c.pngWindow Navigator


Navigate to any window of the currently focused application or any application across all desktops, or switch windows within the current desktop space.

 

GitHub-Download-000.svg?logo=github&logoColor=white

Usage

  1. Search the windows of the active app globally using the Navigator keyword.
  2. Search app windows in the current desktop space using the Switcher keyword.
  3. 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

preview_winnav-1.png

2. Switcher

preview_winnav-2.png

3. Global

preview_winnav-3.png

Edited by zeitlings
v1.3.0
Link to comment

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

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
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

Link to comment

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

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
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
  • 5 weeks later...
Posted (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 by jwrc
Link to comment
Posted (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 by Mr Pennyworth
Link to comment

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?

 

 

Screenshot 2024-07-15 at 16.42.34.png

Link to comment
  • 1 month later...

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

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
  • 1 month later...

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...