Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Run] Switch to running app instead of opening a new one #5962

Open
AtaTrkgl opened this issue Aug 14, 2020 · 24 comments
Open

[Run] Switch to running app instead of opening a new one #5962

AtaTrkgl opened this issue Aug 14, 2020 · 24 comments
Labels
Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window

Comments

@AtaTrkgl
Copy link

AtaTrkgl commented Aug 14, 2020

📝 PowerToys Run Auto Focus

PowerToys opens a new instance of an app even if there is an instance. Focusing on that instance instead of opening a new one would be quite handy. Maybe a checkbox for toggling this behaviour?


If you'd like to see this feature implemented, add a 👍 reaction to this post.

@ghost ghost added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Aug 14, 2020
@htcfreek
Copy link
Collaborator

You can search for open windows in PT Run.

@AtaTrkgl
Copy link
Author

A toggle for making that function replace the default of opening a new instance is what I am requesting.

@crutkas
Copy link
Member

crutkas commented Aug 14, 2020

this could get quirky i think.

@crutkas crutkas added Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 14, 2020
@crutkas crutkas added this to the Suggested Enhancements milestone Aug 14, 2020
@martinchrzan
Copy link
Contributor

What if you already have multiple instances running? Which one would be activated?

@AtaTrkgl
Copy link
Author

What if you already have multiple instances running? Which one would be activated?

In that case just like how it is right now, we can have multiple buttons for each instance without the new instance button,

@enricogior enricogior changed the title PowerToys Run Auto Focus [Run] Switch to running app instead of opening a new one Jan 9, 2021
@wondering639
Copy link

Switching to an existing instance instead of opening a new one makes really sense to me. Think about applications like mail programs, browsers, chat programs etc. usually you don't want multiple instance of them and usually you switch to them multiple times a day. further, many applications have tabs, so you don't need a new instance. typing "< name" instead of "name" works, but costs you time. and you need to be aware if an instance is already open or not. as a user, I just want to get the application. That's a little bit like Depdendency Injeciton in programming: I don't care how it is created, I just want to use the service (application). Create a new instance if there isn't one yet, otherwise give me the existing one.

@djpeach
Copy link

djpeach commented Jan 26, 2021

This is how alfred works on mac and this feature alone is why I use KeyPiranha

@djpeach
Copy link

djpeach commented Jan 26, 2021

You can search for open windows in PT Run.

I see than I can go down to find the existing windows, but yeah that is annoying. I would love to have the option at least to open existing windows instead of opening a new one. This is problematic for apps that won't run more than one instance. It just flashes orange in the taskbar, but stays in the background even if i try to use the "open new window" default option.

What if you already have multiple instances running? Which one would be activated?

What Alfred on Mac does, is focus all of them. I've never been bothered by this, and in fact if I have 3 chrome windows open and I do cmd+space, then type "chr" and it pulls them all up over my various monitors, often that is exactly the workflow I needed. I can always just really quickly do cmd+space again and pull up other programs I was using after i am done with chrome, without ever moving my hands from the keyboard.

I am trying to make the long-term switch from mac to windows, and its great to see this super powerful tool being built by microsoft.

@wjbuys
Copy link

wjbuys commented Feb 17, 2021

For me, it would be enough if I could configure the WindowWalker plugin to be a higher priority than the Program plugin. I think that should ensure that with the same search text, the "switch to window" action would be the default, instead of having to down-arrow to the bottom of the list:

image

@vladdeSV
Copy link

vladdeSV commented Jun 4, 2021

This issue is similar to one already created in the Wox repo: Wox-launcher/Wox#1922.

I'll quote myself, Wox-launcher/Wox#1922 (comment), explaining why suggesting to switching to an activate an application before launching a new instance is more desirable:

With Alfred, to open Spotify I did the following:

  • Opened Alfred (alt + space)
  • Pressed the S-key (s)
  • Pressed enter (enter)

@chrobs
Copy link

chrobs commented Jul 5, 2021

This is really a feature I want to have in PT Run from the beginning 👍

I came from ROFI window switch on linux and they are prioritizing the running applications in the search results (at least optional). Furthermore, ROFI has an option for History-based ordering: last 25 choices are ordered on top based on use.

This would be incredible valueable in my daily work, as already pointed out by @wondering639 and @djpeach !

Just a word to differentiate this to #3169: The current filter option does not adress this request here but makes it worth. Let me explain shortly.

The task is easy: Get a Terminal (Outlook, Teams, Chat, Powershell, whatever tool you use frequently) to focus or open it if it wasn't opened already.

Steps with the new feature: 3 Steps for both scenarios (with Terminal already running or not)

  • PTRun shortcut
  • Type "term"
  • Press enter

Steps in PTRun default: 4 Steps

  • PTRun shortcut
  • Type "term"
  • 2x Arrow-Down to select the already running instance
  • Press enter

Steps in PTrun with using the filters: 6 Steps

  • PTRun shortcut
  • Type "<term", filter keyword for running apps is "<"
  • Discover that Terminal is not already running
  • Remove the filter keyword
  • Select Application
  • Press enter

@chrobs
Copy link

chrobs commented Jul 12, 2021

@crutkas do you see any update here or any chance of getting someone to look into it?

We would really appreciate! Thanks in advance :)

@Soneji
Copy link

Soneji commented Jul 12, 2021

Copy of my post over at #3169

Hi all

Thanks for the work on this. I too would like this sort of behaviour, and while the option to type < before every search works, I still believe that we should be able to change the priority, the order in which these plugins run.

For example:
I have set the activation phrase for Program to a . and I have unset the activation phrase for window walker, however these are still the results I get

image

I would want to have the existing instance show up as opposed to a new instance being created.

This means that the Program plugin is given priority over the Window Walker plugin. As a user, I would want to change this priority.

Could this maybe be reopened as I believe we still haven't achieved the original request, "option to let running programs be first in the results list". @moxwel

@chrobs
Copy link

chrobs commented Aug 11, 2021

Hi all, @crutkas @enricogior

sorry to bother you, but it is possible to get any hint if this enhancement has any chance of beeing implemented in the near future?

Thanks for your efforts!

@KnifesmithCode
Copy link

I think that a great way to implement this feature would be to have a "priority" list for all installed plugins. Number one gets first priority, then two, and down the line. Granted, I haven't looked at the codebase to see if implementation is possible, but I think that would be the optimal solution. That way, every user could configure their own order for results.

@vladdeSV
Copy link

Is this feature implemented? @AtaTrkgl

@AtaTrkgl
Copy link
Author

Is this feature implemented? @AtaTrkgl

Thought it was but turns out I opened a single-instance app :p

@AtaTrkgl AtaTrkgl reopened this May 26, 2022
@josephan
Copy link

josephan commented Jun 30, 2022

I missed this feature in macOS and Ubuntu and I came up with this workaround: https://gist.github.com/josephan/cd399794dac11d619f56175d9332f307

Basically you run a powershell function that opens an existing chrome window. If it doesn't exist it creates a new one.
It's not very elegant but it beats a cluttered desktop.

@AvatarSenju
Copy link

I found a simpler workaround by increasing the priority of window walker very high, like 1000, causing the first result to be already existing instance instead of new launch

@TheJoeFin
Copy link
Collaborator

I think this functionality could be improved by searching for the application name in addition to the text of the title bar. Like if I am searching for Outlook to switch to the open instance of Outlook I have to search for "mail -" and it works, when I search Outlook the window is not found and a new instance will be launched.

@Jackiexiao
Copy link

any progress or any better workaround ?

@axelthat
Copy link

This should really be implemented. Any updates?

@e1turin
Copy link

e1turin commented Apr 7, 2024

'Result ordering tuning' tweak is not helpful in my case: 'Application' still appears higher than window with running app. I also want to walk to an already opened window instead of running another one. Maybe it's simpler to suggest tweak for default command in PT Run? So, let it put < every time and I will remove it if it's not required. ☕

Are there any similar issues/enhancements?

@Experiment59
Copy link

Would also love this feature. Coming back to Windows as a long-time mac power user, I was overjoyed to find PowerToys but really disappointed that it doesn't have this easy refocusing behavior. It's so much easier to open Spotlight/Alfred/a PowerToys Run-style bar, type the first few letters of your desired application and then hit enter to have it refocus it, rather than alt-tabbing through a crowded and hard-to-read list of windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window
Projects
None yet
Development

No branches or pull requests