Ulauncher doesn't get focus when started manually if already running

Created on 18 Feb 2018  路  12Comments  路  Source: Ulauncher/Ulauncher

Steps to reproduce:
Make sure that Ulauncher is already running (icon indicator present) and start Ulauncher manually, either executing ulauncher form a virtual terminal or creating a DE shortcut that executes ulauncher.

Ulauncher version: 4.0.6.r1
Linux distro: Ubuntu 17.10
Desktop environment: Gnome Shell (xorg)

Logs:

first start: https://gist.github.com/leinardi/4b8d55a625dcc257f5e3a2191c26333e
restart: https://gist.github.com/leinardi/e1987cf8c05c3a495f1895f6594c4bf3

I am trying to use the Super+Space shortcut to start Ulauncher. Since that shortcut doesn't seems to work when set directly in Ulauncher, I am creating a Gnome Shell shortcut to start Ulauncher manually when pressing Super+Space.
The problem is that, if Ulauncher was already started (the indicator icon is already inside the appindicator bar) the app starts but it has no focus, this means that I cannot type in it if I first don't select it with the mouse.

Please provide a way to (re)open Ulauncher directly form command line giving directly the focus to the main window so that DE shortcuts can be easily created.

bug no solution

Most helpful comment

Hi! Sorry for necroing this thread, but I found a workaround to this issue.

The problem lies with the /org/gnome/mutter/overlay-key dconf key, which determines the key bound to launch the overview in Gnome Shell and is set to Super_L by default. This is in addition to the default binding of Super+S set in the Keyboard Shortcut settings.
Changing this key to something else (I set it to the right Super key, Super_R) allows the use of the left Super key for launching ULauncher. I've done this for some time now without any adverse effects, and I can still access Gnome Shell's overview through the use of Super + S.

All 12 comments

I just find out that the workaround for Wayland hotkey works also for me, but I just want to clarify that I am NOT using Wayland (since I game I cannot use it).

I also had to add the sleep delay to get it to work, the stock ulauncher-toggle was not enough.

Hi

Since that shortcut doesn't seems to work when set directly in Ulauncher

What do you mean it doesn't work? That's a bug then. Let's fix it

Yes, workaround for Wayland will work in your case.
But ulauncher should hotkey should work without any issues in Ubuntu 17.10

Hey thanks for the answer, unfortunately you had already another issue open for this Super+Space and last time you found out that is not possible to use it since is reserved by the DE: https://github.com/Ulauncher/Ulauncher/issues/190#issuecomment-357590491

But if you are willing to try again, I am happy to help as much as I can, just tell me what should I do.

Oh, Super+Space. I misread, thought you mean Ctrl+Space.
Well then Wayland approach should work for you.

Yep, but I just noticed something really weird: the Super+Space hotkey configured directly in Ulauncher works if I press it twice! Any idea why?

The interesting thing is that the first time I press it, is not handled and the Space key event is sent to the app with the focus (eg. Chrome), but if I press it again, it is correctly opened.

No idea, really.

I have had this issue before (needing to preform the shortcut twice) when using super+space with other launchers (maybe this one too but can't remember), can i ask if in your ubuntu keyboard shortcuts if 'Switch to next input source' is still set to super+space?

also the fix for focus grabbing worked for me too, editing ulauncher-toggle and putting a sleep in ( sleep 0.01 && wmctrl -a "Ulauncher window title" ) and relaunching ulauncher

Hi @arr0n, no I changed "Switch to next input source" to a different shortcut.

Hi! Sorry for necroing this thread, but I found a workaround to this issue.

The problem lies with the /org/gnome/mutter/overlay-key dconf key, which determines the key bound to launch the overview in Gnome Shell and is set to Super_L by default. This is in addition to the default binding of Super+S set in the Keyboard Shortcut settings.
Changing this key to something else (I set it to the right Super key, Super_R) allows the use of the left Super key for launching ULauncher. I've done this for some time now without any adverse effects, and I can still access Gnome Shell's overview through the use of Super + S.

Hey, sorry again for bringing this up, but this is one of the first results on google about this issue and @molguin92 solution is not applicable to Ubuntu 19.04.

In order to change the shortcut now you have to install gnome-tweak-tool. Inside it, go to Keyboard & Mouse and there's an option to change the Overview Shortcut to the Right Super.

This indeed fixes the Super + space shortcut problem with ulauncher in gnome.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ibot3 picture ibot3  路  6Comments

Warmuser picture Warmuser  路  3Comments

andersfylling picture andersfylling  路  5Comments

altla picture altla  路  5Comments

BartWillems picture BartWillems  路  6Comments