Update the "add-password" script

This commit is contained in:
Thomas Dehaeze 2020-03-24 09:41:17 +01:00
parent fa2ba07bf8
commit 72dbb25419

View File

@ -311,14 +311,17 @@ See Amazon price history using CamelCamelCamel
#+begin_src bash
url=$(echo "$QUTE_URL" | awk -F[/:] '{print $4}' | rofi -p "URL" -dmenu -lines 1)
username=$(echo "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze" | rofi -p "Username" -dmenu -lines 5)
username=$(echo -e "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze" | rofi -p "Username" -dmenu -lines 5)
password=$(rofi -p "Password" -dmenu -password -lines 1)
echo "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
pass insert --multiline "$url/$username" < /tmp/add-password.txt
rm /tmp/add-password.txt
if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then
dunstify "Pass" "Failed to Add Password"
else
echo -e "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
pass insert --multiline "$url/$username" < /tmp/add-password.txt;
rm /tmp/add-password.txt
dunstify "Pass" "Password Added"
fi
#+end_src
** Cast Youtube to Chromecast