rbuchberger / rbw-menu Goto Github PK
View Code? Open in Web Editor NEWTeeny Tiny GUI menu for rbw (Unofficial Bitwarden CLI)
License: GNU General Public License v3.0
Teeny Tiny GUI menu for rbw (Unofficial Bitwarden CLI)
License: GNU General Public License v3.0
I am using rbw
with rbw-menu
to access my Bitwarden database, using pinentry-bemenu
as my pinentry and bemenu
as the interface.
Here is how I have it set up:
rbw-menu
:
#!/bin/ash
set -euo pipefail
IFS=$'\n\t'
# Creator: Robert Buchberger <[email protected]>
# @[email protected]
#
# Select an item from bitwarden with wofi, return value for passed query
# Dependencies: rbw installed and configured
#
# Usage: rbw-menu [query]
# query: "code" or anything on the login object; username, password, totp, etc
# - code will return a TOTP code
# - anything else will return the value of the query
# default: username
rbw unlocked &> /dev/null || rbw unlock
query=${1:-password}
chosen_item=$(
# If RBW_MENU_COMMAND is set, use it to filter the list.
if declare -p RBW_MENU_COMMAND >&/dev/null; then
eval "rbw list | $RBW_MENU_COMMAND" # I have this set to benemu in ~/.profile but this doesn't seem to work.
else #use wofi
#rbw list | wofi --dmenu --matching fuzzy --insensitive --prompt "$query"
#
# Therfore, set it here to use bemenu:
rbw list | bemenu "$query"
fi
)
# Exit if user didn't select anything
declare -p chosen_item >&/dev/null || exit 1
case "$query" in
code)
rbw code "$chosen_item"
;;
*)
# Select chosen item from vault, return login.query
rbw get "$chosen_item" --raw | jq --join-output ".data.$query"
;;
esac
When I execute rbw-menu password | wl-copy
from the command line or from my wm's keybinds the password is not copied. However, when I execute rbw get <password> | wl-copy
from the command line it works. This leads me to believe that rbw
and wl-copy
do work, there must be something wront with rbw-menu
.
As you might have noiticed from the shebang, I'm using ash
on Alpine Linux (in-case there are any bash
specific syntax in this script).
Thanks
edit: spelling
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.