From b9f56b0f1e09d3b5ea16109ea63e85ef55d09e5c Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Thu, 16 Apr 2020 12:05:54 +0200 Subject: [PATCH] Rework the addition of bookmarks from qutebrowser --- dotfiles/qutebrowser.org | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dotfiles/qutebrowser.org b/dotfiles/qutebrowser.org index c7d7ebf..d6982ef 100644 --- a/dotfiles/qutebrowser.org +++ b/dotfiles/qutebrowser.org @@ -320,7 +320,7 @@ See Amazon price history using CamelCamelCamel password=$(rofi -p "Password" -dmenu -password -lines 1) if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then - dunstify "Pass" "Failed to Add Password" + dunstify --urgency=critical "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; @@ -525,9 +525,11 @@ Send to Emacs #+begin_src bash :tangle ~/.config/qutebrowser/userscripts/buku-rofi.sh title=$(echo "$QUTE_TITLE" | rofi -p "Title" -dmenu -lines 1) - tags=$(buku -t --nc --np | sed -e 's/\s*[[:digit:]]*\.\s*\(.*\)\s*([[:digit:]]*)\s*/\1/' -e '/^\s*$/d' | sort | uniq | rofi -p "Tags" -dmenu) + tags=$(buku -t --nc --np | sed -e 's/\s*[[:digit:]]*\.\s*\(.*\)\s*([[:digit:]]*)\s*/\1/' -e '/^\s*$/d' | sort | uniq | rofi -multi-select -p "Tags" -dmenu | tr "\n" "," | sed 's/\s*,\s*$//') - buku --add "$QUTE_URL" --tag "$tags" --title "$title" && dunstify "Buku" "Bookmark Added" + buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \ + dunstify "Buku" "Bookmark Added" || \ + dunstify --urgency=critical "Buku" "Bookmark Added" || \ #+end_src ** Add Url to Buku without asking for information