I'm trying to add hotkeys to fast open some applications (for example KeePassXC) and I've done what I wanted
Keyboard Settings -> Keyboard Shortcuts -> /usr/bin/keepassxc ; wmctrl -a keepassxc
This works during the first run, or when the window was completely closed. The problem starts when the window is not activated and I want to activate it and bring to front. During pressing the hotkey Ubuntu just shows the notification that the Program is Ready, without activation. I'm new to the system, need help with finding the way to get rid of that notification and actually bring the needed app to the front with focus.
You may use some GNOME shell extensions to remove the "Program is Ready" notification and also put the newly launched window into focus, for example
This may not do anything to resolve the notification issue in the question. However, the command pattern described (
[cmd] ; wmctrl -a [cls]
) may start multiple instances of a program, which the following script avoids. To use, save somewhere in the path, such as~/bin/find_app.sh
, and give it execute permission (chmod +x ~/bin/find_app.sh
).Note:
xdotool
may return an error for some apps:A workaround for the issue is to add
--desktop 0
to thefind_app
variables.