Giter Site home page Giter Site logo

rbuchberger / rbw-menu Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 47 KB

Teeny Tiny GUI menu for rbw (Unofficial Bitwarden CLI)

License: GNU General Public License v3.0

Makefile 20.30% Shell 79.70%
bitwarden bitwarden-cli password-manager rbw swaywm wofi

rbw-menu's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rbw-menu's Issues

`rbw-menu` not copying password to clipboard using `wl-copy`

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.