add rofi-bw

This commit is contained in:
Aaron Bieber 2021-12-15 07:50:52 -07:00
parent 70873f3c79
commit 3a7633f7bd
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# $OpenBSD$
PREFIX ?= /usr/local
SCRIPT = rofi-bw.sh
BINDIR ?= ${PREFIX}/bin
realinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${.CURDIR}/${SCRIPT} ${DESTDIR}${BINDIR}/rofi-bw
.include <bsd.prog.mk>

View File

@ -0,0 +1,13 @@
#!/bin/sh
set -e
if rbw unlocked; then
if [[ -z $1 ]]; then
rbw list --fields folder,name | sort
else
rbw get "$(echo $1 | awk '{print $NF}')" | xclip -r -l 1
fi
else
echo "Unock rbw first!"
fi