Kpmenu is a tool written in Go used to view a KeePass database via a dmenu, or rofi, menu.
--daemon
option (it won't ask open the database)--clipboardTool
optiongo
(compile only)dmenu
, rofi
and wofi
(you can define a custom executable)xsel
and wl-clipboard
(you can define a custom executable)I created kpmenu to make an easy and fast way to access into my KeePass database. These are some commands that you can do:
# Open a database
kpmenu -d path/to/database.kdbx
# Open a database with a key
kpmenu -d path/to/database.kdbx -k path/to/database.key
# Open a database (credentials taken from config) with a password and rofi
kpmenu -p "mypassword" -m rofi
You can directly install the package kpmenu.
If you do not set $GOPATH
, go sources will be downloaded into $HOME/go
.
# Clone repository
git clone https://github.com/AlessioDP/kpmenu
cd kpmenu
# Build
make build
# Install
sudo make install
You can set options via config
or cli arguments.
Kpmenu will check for $HOME/.config/kpmenu/config
, you can copy the default one with cp ./resources/config.default $HOME/.config/kpmenu/config
.
Options taken with kpmenu --help
Usage of kpmenu:
--argsEntry string Additional arguments for dmenu at entry selection, separated by a space
--argsField string Additional arguments for dmenu at field selection, separated by a space
--argsMenu string Additional arguments for dmenu at menu selection, separated by a space
--argsPassword string Additional arguments for dmenu at password selection, separated by a space
--cacheOneTime Cache the database only the first time
--cacheTimeout int Timeout of cache in seconds (default 60)
-c, --clipboardTime int Timeout of clipboard in seconds (0 = no timeout) (default 15)
--clipboardTool string Choose which clipboard tool to use (default "xsel")
--customClipboardCopy string Custom executable for clipboard copy
--customClipboardPaste string Custom executable for clipboard paste
--customPromptEntries string Custom executable for prompt entries
--customPromptFields string Custom executable for prompt fields
--customPromptMenu string Custom executable for prompt menu
--customPromptPassword string Custom executable for prompt password
--daemon Start kpmenu directly as daemon
-d, --database string Path to the KeePass database
--fieldOrder string String order of fields to show on field selection (default "Password UserName URL")
--fillBlacklist string String of blacklisted fields that won't be shown
--fillOtherFields Enable fill of remaining fields (default true)
-k, --keyfile string Path to the database keyfile
-m, --menu string Choose which menu to use (default "dmenu")
-n, --nocache Disable caching of database
--nootp Disable OTP handling
-p, --password string Password of the database
--passwordBackground string Color of dmenu background and text for password selection, used to hide password typing (default "black")
--textEntry string Label for entry selection (default "Entry")
--textField string Label for field selection (default "Field")
--textMenu string Label for menu selection (default "Select")
--textPassword string Label for password selection (default "Password")
-v, --version Show kpmenu version
See the LICENSE file.