Open app or bring to front already opened one via shortcut.

asked 2015-01-02 19:53:06 +0000

6alfalfa9 gravatar image

I am using Fedora 21 Workstation with GNOME Shell 3.14

GNOME Shell has this powerfull feature:

When you press Super key and type application name, the shell either brings to front opened window, or opens a new window, (if there isn't any open one).

What I want:

I want to do exactly the same, but with a shortcut: e.g. I press <super>+W and firefox window is activated (new or existing)</super>

What I've done:

I've figured out a workaround to do that (via xdotool):

xdotool windowactivate $(xdotool search --name firefox | tail -1) || firefox

I wrapped it like that for custom shortcut:

bash -c 'xdotool windowactivate $(xdotool search --name firefox | tail -1) || firefox'

It works.

But something is telling me that it's not the best way to do that.

My question is:

Is there any more "native" and obvious way or settings to do that?

edit retag flag offensive close merge delete