commit 806b0dba80d68f329f2e187a5eb3630c9e004772 parent 43dce123baaa7e43a30891a76300b9d10b244cb6 Author: Hayden Hamilton <hayden@haydenvh.com> Date: Mon, 23 Dec 2019 17:50:53 +0000 Added help msg to dpass Diffstat:
M | .scripts/bin/dmenu/dpass | | | 15 | +++++++++++++-- |
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/.scripts/bin/dmenu/dpass b/.scripts/bin/dmenu/dpass @@ -6,6 +6,17 @@ # haydenvh.com # Copyright (c) 2019 Hayden Hamilton. LICENSE:GPLv2 ../../.licenses/gplv2.license # +if [ "$(echo $1 | awk '/help/ {print $0}')" != "" ] +then + echo "dpass [\"option that your terminal uses to execute the argument\"] + +$(tput bold)ENVIRONMENTAL:$(tput sgr0) (must be set in .profile, .bash_profile .zprofile etc...) +PASS=\"/path/to/password/file\" +TERMINAL=\"name of terminal binary\" + +Written by Hayden Hamilton <haydenvh.com>" + exit 0 +fi dmenu="dmenu" . $HOME/.dmenurc @@ -24,10 +35,10 @@ then passname="pleaseeditthis" fi echo "$passname: $password" >> $PASS - [ "$(printf "No\nYes" | $dmenu -i -p "Edit the pasword file?")" == "Yes" ] && $TERMINAL -e vim $PASS + [ "$(printf "No\nYes" | $dmenu -i -p "Edit the pasword file?")" == "Yes" ] && $TERMINAL "$1" vim $PASS elif [ "$pass" == "edit" ] then - $TERMINAL -hold -e vim $PASS + $TERMINAL "$1" vim $PASS else echo $getpass | sed "s/$pass.//g" | tr " " "\n" | $dmenu $2 -l 20 -p "Password:" | xclip notify-send "Password copied to clipboard."