8

Is there any way to bring up the keepassX window when the application is started but the window is hidden? I mean that the application is running but only the icon in the notification area is visible. Is there any way to do this? Is there any way to configure a shortcut?

fixer1234
  • 27,064
  • 61
  • 75
  • 116
ardabro
  • 455
  • 5
  • 17

4 Answers4

4

Not strictly an answer for KeepassX and kind of a workaround...

I tend to use xdotool in those cases, it's great for window tinkering and automation.

You could do something like xdotool search --name keepassX windowactivate
Just make sure --name is the same as the window title.

And then make a keyboard shortcut to that command or put it in Keepass's launcher.

micke
  • 3,345
  • 17
  • 25
  • Works for me: `xdotool search --onlyvisible --name "DatabaseName - KeePassX" windowactivate` (if the database was named) or `xdotool search --onlyvisible --name "FileName.extension - KeePassX" windowactivate` – mkczyk Sep 20 '18 at 08:18
  • What about toggle window (activate/minimize)? https://superuser.com/questions/1369564/keyboard-shortcut-for-toggle-window-activate-minimize – mkczyk Oct 24 '18 at 12:36
  • I think you have to write a script or use another tool for that. See my answer in your new question. – micke Oct 24 '18 at 16:44
0

I had a similar issue and made an open-source solution based on xdotool for that.

https://hyperkeys.xureilab.com

After install, click on the "HK" icon in the tray, then add a macro. Choose "Window Pin by name". Click on the gear next to it and type 'KeePassX'. Then click on the pen to set your shortcut.

Personally, I'm using ALT+P to bring KeePassX on the foreground. The app must be already running, however. So I made it start on boot.

xurei
  • 101
  • 1
  • 7
0

bring keepass to foreground or start it up if not running

xdotool windowactivate $(xdotool search --pid $(ps aux|grep keepass|grep -v grep|awk '{print $2}'))||keepassxc
sjas
  • 413
  • 6
  • 14
0

Not exactly the answer you're looking for, but it reaches the same goal (kind of).

In settings > General > Auto-Type

There is the global option Global Auto-Type shortcut

Doesn't bring keepassXC's windows to front (I also wish of a none-hackish way of doing it, check the last dot).

But it brings a search box with your entries, you can then:

  • it only searches in entries with an Auto-Type entries
  • search your entries depending on the current active windows (A checkbox all database is available)
  • by pressing Ctrl + {1,2,3} it auto-type your username, password or totp respectively.
  • enter triggers your auto-type for selected entries.
  • Seems that: after a time (1 sec), pressing the esc key brings the main window to front.
Dboy
  • 11
  • 2