diff --git a/dotfiles/qutebrowser.org b/dotfiles/qutebrowser.org index ef04a08..abd1535 100644 --- a/dotfiles/qutebrowser.org +++ b/dotfiles/qutebrowser.org @@ -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