dmenu for bitwarden-cli
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.3 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # bitwarden-dmenu
  2. [![npm](https://img.shields.io/npm/v/bitwarden-dmenu.svg)](https://www.npmjs.com/package/bitwarden-dmenu)
  3. [![node](https://img.shields.io/node/v/bitwarden-dmenu.svg)](http://npmjs.com/package/bitwarden-dmenu)
  4. [![GitHub](https://img.shields.io/github/license/andykais/bitwarden-dmenu.svg)](https://github.com/andykais/bitwarden-dmenu/blob/master/LICENSE)
  5. dmenu for [bitwarden](https://bitwarden.com/) which can copy usernames, passwords, and various fields to your
  6. clipboard.
  7. ## Usage
  8. ```
  9. $ bitwarden-dmemu --help
  10. Usage: bitwarden-dmenu [options]
  11. The DMENU_PATH environment variable can be used to point to an alternative dmenu implementation. Defaults to 'dmenu'.
  12. Options:
  13. --clear-clipboard Number of seconds to keep selected field in the clipboard.
  14. Defaults to 15s.
  15. -l Sets the -l parameter value passed to dmenu.
  16. Defaults to 0
  17. --session-timeout Number of seconds after an unlock that the menu can be accessed
  18. without providing a password again. Defaults to 0s.
  19. --stdout Prints the password and username to stdout
  20. --sync-vault-after Number of seconds allowable between last bitwarden sync and
  21. current time. Defaults to 0s.
  22. --on-error Arbitrary command to run if the program fails. The thrown error
  23. is piped to the given command. Defaults to none.
  24. --url Url to filter by.
  25. --verbose Show extra logs useful for debugging.
  26. ```
  27. By default, this program runs at its most secure. No session is stored for any time period, the vault is updated
  28. every time it is used, and the clipboard is cleared every 15 seconds. In reality, you may want something a
  29. little more lenient. Here is the command I use in my personal i3wm config.
  30. ```bash
  31. bitwarden-dmenu --clear-clipboard 30 --session-timeout 100 --sync-vault-after 3600 --on-error 'xargs notify-send --urgency=low'
  32. ```
  33. ## Installation
  34. ```bash
  35. # login with bitwarden-cli once before using bitwarden-dmenu
  36. bw login
  37. # install the cli
  38. npm i -g bitwarden-dmenu
  39. ```
  40. ## Depends on
  41. - [dmenu](https://tools.suckless.org/dmenu/)
  42. - [bitwarden-cli](https://help.bitwarden.com/article/cli/)
  43. ## Credits
  44. Inspired by the no longer maintained [keepass-dmenu](https://github.com/gustavnikolaj/keepass-dmenu)