kpsh-menu(1) | General Commands Manual | kpsh-menu(1) |
kpsh-menu requires a running kpsh daemon (see: kpsh(1) --daemon) and socket paths used by daemon an kpsh-menu must match. It is the case for the default paths, but they can be configured with --socket-path options at both menu and daemon's side.
kpsh-menu doesn't provide any way to open and unlock KeePass database. It managed by kpsh server. For example:
$ kpsh -d --keyfike /path/to/keyfile --password-command "gpg2 -q --decrypt pwd.gpg" /path/to/db.kdbx & $ kpsh-menu
-m, --menu MENU_CMD
-s, --socket-path FILE
-c, --command COMMAND
By default, kpsh-menu will autotype selected entry with a default autotype sequence.
-n, --notify NOTIFY_COMMAND
--pinentry PINENTRY_COMMAND
<DISPLAY_NAME>::<COMMAND>::<FLAGS>
COMMAND: (mandatory) kpsh command. It may contain a placeholder {} which will be replaced with selected entry path.
FLAGS: (optional) a set of flags used to modify behavior of kpsh-menu after selected command is executed (see flags section). See the "Flags" section.
n: (notify) after command execution, kpsh-menu will run a NOTIFY_COMMAND set with --notify option.
$ kpsh-menu -m "dmenu -p '>'" -c "Autotype::autotype '{}'" -c "Username::autotype '{}' -s {USERNAME}::ln" -c "Password::autotype '{}' -s {PASSWORD}::ln" -c "Type TAB::autotype '{} -s {TAB}::l'" -c "Type ENTER::autotype '{} -s {ENTER}::l'" -c "Show::show '{}'" -c "Lock database::lock" -n "notify-send kpsh-menu 'Executed command {cmd}'"
Source code: https://git.goral.net.pl/keepass-shell.git
2024-02-13 |