Rework the addition of bookmarks from qutebrowser
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user