From 241a9313a35965b078ad343753b43c93f50f77f4 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Mon, 27 Apr 2020 19:13:01 -0300 Subject: [PATCH] wpass: fix for bmenu --- scripts/.local/bin/bmenu | 2 +- scripts/.local/bin/wpass | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/.local/bin/bmenu b/scripts/.local/bin/bmenu index 85de646..9b8330f 100755 --- a/scripts/.local/bin/bmenu +++ b/scripts/.local/bin/bmenu @@ -4,7 +4,7 @@ # bmenu run - select from .desktop files and run it # bmenu start - internal option if test "$argv[1]" != "start" || test "$argv[1]" = "run" - test -n "$SWAYSOCK" && swaymsg fullscreen off + test -n "$SWAYSOCK" && swaymsg fullscreen off > /dev/null end if test "$argv[1]" = "run" diff --git a/scripts/.local/bin/wpass b/scripts/.local/bin/wpass index d274d8e..4693def 100755 --- a/scripts/.local/bin/wpass +++ b/scripts/.local/bin/wpass @@ -5,12 +5,6 @@ set -e shopt -s nullglob globstar -typeit=0 -if [ "$1" = "--type" ]; then - typeit=1 - shift -fi - prefix=${PASSWORD_STORE_DIR-~/.password-store} password_files=( "$prefix"/**/*.gpg ) password_files=( "${password_files[@]#"$prefix"/}" ) @@ -22,7 +16,8 @@ for line in $(cat $CACHE); do done entry=$(printf '%s\n' "${password_files[@]}" | - sort | uniq -c | sort -r | sed 's/ *[0-9]* //'| + sort | uniq -c | sort -r | + sed 's/ *[0-9]* //'| bmenu "$@") [ -n "$entry" ] && echo "$entry" >> $CACHE || exit @@ -30,7 +25,6 @@ entry=$(printf '%s\n' "${password_files[@]}" | username=$( pass show "$entry" 2>/dev/null | perl -ne 'print $1 if /^login: (.*)/' ) password=$( pass show "$entry" 2>/dev/null | head -n 1 ) -# | grep 'username'&& case $(echo -e "Autotype\nUsername -> $username\nPassword" | bmenu) in Autotype) ydotool type "$username"