This script allows for interactively getting credentials from rbw, probably triggered via window-manager keybinding.
This does exactly what I need; I don't plan to change much.
- rbw
- jq - JSON parser
- wofi - Optional menu GUI. Trivial to replace with dmenu, bemenu, fzf, or whatever else.
For all methods:
- Look over the source code.
- Install and set up
rbw
- Install dependencies
- clone this repo
# make install
(If you package it somewhere else, feel free to submit a PR adding it to this list.)
- Show menu, print username for selected item to stdout:
$ rbw-menu
- Show menu, copy password for selected item to clipboard:
$ rbw-menu password | wl-copy
- Show menu, copy OTP for selected item to clipboard:
$ rbw-menu code | wl-copy
- Use a different picker:
RBW_MENU_COMMAND="fzf" rbw-menu
I use these scripts with sway, though they'll work with anything. Relevant part of my config:
bindsym $mod+p exec rbw-menu password | wl-copy
bindsym $mod+u exec rbw-menu username | wl-copy
bindsym $mod+o exec rbw-menu code | wl-copy
By default, we use wofi. To change this, set the RBW_MENU_COMMAND
environment variable to anything which can accept a list from STDIN, and return a single line from that list to STDOUT.
- 1.0 - Initial release
- 1.1 - Remove bespoke OTP support, use
rbw code
instead - 1.2 - Check for and handle locked vault
- 1.3 - Remove undocumented bash dependency; rewrite script to be POSIX sh compliant