A simple extension of passmenu friendly to one-time passwords (OTP), often used in two-factor authentication (2FA).
pass is a minimalistic password manager, which became known thanks to its incredible versatility and abundance of extension points.
One tool which makes pass extremely convenient for everyday use is passmenu -- a shell script, which utilizes dmenu to offer user interactive list of available passwords. Having selected a specific password, user can copy it to clipboard temporarily, or use xdotool to input it into focused text area.
Among others, pass can also be used to manage one-time passwords (OTP), commonly used for two-factor authentication (2FA). This is done using pass-otp. Sadly, since the command-line invocation differs for OTP's and conventional passwords, passmenu cannot be used with OTP's out of the box, forcing users to clumsily open a new shell everytime they need to generate a OTP. This not only creates time strain on the user's productivity, but also raises overall stress levels since OTP use is often limited to couple of seconds only.
This project attempts to very simply resolve this problem by bringing support for OTP's to your friendly neighborhood passmenu.
passmenu-otp works the same way as passmenu:
- Run it (from shell or using keybinding).
- Pick a password in dmenu.
- The password gets copied to your X clipboard for a limited amount of time.
The only difference is if you select otpauth://
password, the script
automatically uses it to generate OTP, and copies that to your clipboard instead.
Disclaimer: This script runs the contents of your secret through grep
. If you
don't trust your environment, it won't be safe to use!
This mod was created in April 2019 by Petr Mánek, and is licensed under the MIT license. For copyright of the original work, check out its repository.