From 9f44e413e0ba03a52261fd6770cef143c3c321c7 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 11 Apr 2023 11:49:35 +0200 Subject: Use lpass instead of lesspass --- bin/menu-lesspass | 22 ---------------------- bin/menu-lpass | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) delete mode 100755 bin/menu-lesspass create mode 100755 bin/menu-lpass diff --git a/bin/menu-lesspass b/bin/menu-lesspass deleted file mode 100755 index 3abdfd0..0000000 --- a/bin/menu-lesspass +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# Search in logins list using bemenu. Assumes a .config/logins.db.asc file exists -# with: -# DOMAIN_1 USERNAME_1 -# DOMAIN_2 USERNAME_2 -# ... -# DOMAIN_N USERNAME_N -# pairs, one per line. - -SELECTION=`gpg --decrypt $HOME/.config/logins.db.asc 2>/dev/null | bemenu -i -s -c -l 20 -W 0.2 -p '*'` -DOMAIN=`echo $SELECTION | cut -f 1 -d ' '` -USERNAME=`echo $SELECTION | cut -f 2 -d ' '` -OPTIONS=`echo $SELECTION | cut -f 1,2 -d ' ' --complement` - -if [ -z $USERNAME ] || [ -z $DOMAIN ]; then - exit 1 -fi - -# -c copies to clipboard -export LESSPASS_MASTER_PASSWORD=`pass lesspass` -lesspass $DOMAIN $USERNAME $OPTIONS -c 2>&1 >/dev/null diff --git a/bin/menu-lpass b/bin/menu-lpass new file mode 100755 index 0000000..8d15d42 --- /dev/null +++ b/bin/menu-lpass @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Search in logins list using bemenu. Assumes a .config/logins.db.asc file exists +# with: +# DOMAIN_1 USERNAME_1 +# DOMAIN_2 USERNAME_2 +# ... +# DOMAIN_N USERNAME_N +# pairs, one per line. + +SELECTION=`gpg --decrypt $HOME/.config/logins.db.asc 2>/dev/null | bemenu -i -s -c -l 20 -W 0.2 -p '*'` +DOMAIN=`echo $SELECTION | cut -f 1 -d ' '` +USERNAME=`echo $SELECTION | cut -f 2 -d ' '` +OPTIONS=`echo $SELECTION | cut -f 1,2 -d ' ' --complement` + +if [ -z $USERNAME ] || [ -z $DOMAIN ]; then + exit 1 +fi + +# -c copies to clipboard +export LESSPASS_MASTER_PASSWORD=`pass lesspass` +lpass $DOMAIN $USERNAME $OPTIONS -c 2>&1 >/dev/null -- cgit v1.2.3