Trigger action after window selected in via Window Switcher

Is there an easy way to trigger actions after a window is selected via the Window Switcher?

Possibly the "Wait For Focused Window Change" action can help:

1 Like

Thanks! That looks like it would work overall, but not if the switcher is dismissed, right?

Yep!

Currently I think this is the only way, but I could add an option to trigger a named trigger only if a window has actually been chosen in the switcher.

1 Like

That would be great!

My current goal is something like selecting a window to pin as resizable/zoom/non-interactive, and then move that resulting floating window to another desktop.

I’m not sure how doable that is, but it would be great for presentations.

I was working on this goal a little this morning without using the Window Picker.

I was going to ask if it’s possible to move a resizable/zoom/non-interactive pinned window to another desktop using BTT action?

Looking at the Visible Windows Viewer, it looks like the floating windows get named something like BetterTouchTool - Window - 4, where the number just keep getting incremented when you pin a window. But I guess it’s not likely to be able to guess the number?

But I also discovered it looks like it’s pretty hard to move the pinned window to another desktop manually with the mouse anyway. It looked liked I briefly succeeded in moving it a couple times, but then BTT crashes.

Is what I want to accomplish not likely to work?

I was hoping for something like the app Duplicate Windows that I used to use, which is no longer available on the US App Store.

Have you tried doing it the other way around? Move the window first and then pin it.

I just did, but BTT still crashes when trying to move the original window back to the other desktop/display.

The goal, though is to be able to have the pinned/duplicate window projected on another display while interacting with the original on my main screen.

Even if it's no longer pinned?

The goal, though is to be able to have the pinned/duplicate window projected on another display while interacting with the original on my main screen.

I don't know what you mean by “interacting”, but why can't you do that with the “original” window? pinned or not.

In my head, this would also work.

Open the Window Switcher, select a window, then press the letter “p,” for example (with the Switcher open). Now the window is moved somewhere and pinned.

The trigger “p” would only work if the Switcher is open.

It looks like the crash is happening only when the original window is on a desktop that isn’t actually being displayed.

I hadn’t actually had another display active when trying before, but it looks like like moving the pinned window to an actual difference display works fine.

The goal is to something like the app Duplicate Windows, as mentioned in a previous comment (Window Duplicator macOS app is a similar app). If you set the Floating Mode to Resizable, Zoomable, & Moveable, Not Interactive', you can accomplish pretty much the same thing with BTT’s window pinning.

I’d like to be able to use BTT to move the resulting floating window to the other display for use in presentations, rather than just dragging it over.

In 5.751 alpha I have added the standard positioning options that are also used in clipboard manager etc., they would at least allow you to place the window on a specific screen

However this is not yet possible via the window switcher

I also added very basic support for triggering an action after a window has been selected in window switcher, although I don't think this will help you here. You can now have a named trigger called "BTTWindowSwitcherDidActivateWindow" that will be triggered it exists. (It could access the activated window id via this variable: BTTLastActivatedWindowID )

2 Likes

Thanks! That’s great. That’s about exactly what I was looking for. I supposed there’s no way to have the first non-focused screen or the first external screen or similar as an option for placement? Most of the time think I would use it to move it the window to whatever screen is the one being projected, not the focused or main one. Unfortunately, that one will change depending on the projector.

I’ve currently moved to having the trigger be right clicking on the orange window button. Which I might like better.

But I tinker the "BTTWindowSwitcherDidActivateWindow" trigger will be helpful for other things, if not this, in the long run . Thanks!

Also, is there a way to close the duplicate of the pinned window from the original window? I know I can close the duplicate via the duplicate’s context menu. But it would be helpful to be able to do from the original window as well.

Is this context menu on the original window from BTT?

no that is a macOS context menu (the blue thingy is appearing once a window is being recorded, so in that sense it appears because you use BTT)

Unpinning via the original window would only work via the unpin or toggle action.

1 Like

That’s good to know. It’s unfortunate then that my trigger for toggling it was the orange window button that can’t be reached because of the recording indicator. :sweat_smile:

You could probably configure a normal mouse right-click trigger with an advanced trigger condition hovered_element_details CONTAINS "WindowSharingSessionButton - that would only trigger while hovering the blue indicator.

If you'd want to limit this further you could probably set up a conditional activation group like this and move the right-click trigger into that:

1 Like

That works great! Thanks!

Do you have any idea if something like this would be possible?

Yes I think such an option would be helpful. I'll add it (probably tomorrow)

1 Like