Change dunstify to notidy-send
This commit is contained in:
@@ -397,12 +397,12 @@ username=$(echo -e "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze"
|
||||
password=$(rofi -p "Password" -dmenu -password -lines 1)
|
||||
|
||||
if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then
|
||||
dunstify --urgency=critical "Pass" "Failed to Add Password"
|
||||
notify-send --hint=string:x-dunst-stack-tag:0vRM5AMP --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;
|
||||
rm /tmp/add-password.txt
|
||||
dunstify "Pass " "Password Added"
|
||||
notify-send --hint=string:x-dunst-stack-tag:0vRM5AMP "Pass " "Password Added"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -415,15 +415,15 @@ if [[ "$1" == *"list"* ]]; then
|
||||
fi
|
||||
|
||||
if [ -n "$choice" ] && [ "$choice" = "Playlist" ]; then
|
||||
dunstify --replace=19243 "Youtube " "Downloading Playlist...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloading Playlist...";
|
||||
youtube-dl -i -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" -o "%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s" && \
|
||||
dunstify --replace=19243 "Youtube " "Downloaded" || \
|
||||
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloaded" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG --urgency=critical "Youtube " "Failed to download"
|
||||
else
|
||||
dunstify --replace=19243 "Youtube " "Downloading Video...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloading Video...";
|
||||
youtube-dl --no-playlist -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" && \
|
||||
dunstify --replace=19243 "Youtube " "Downloaded" || \
|
||||
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloaded" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG --urgency=critical "Youtube " "Failed to download"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -627,8 +627,8 @@ new_tags=$(rofi -p "New tags" -dmenu)
|
||||
formated_tags=$(echo $existing_tags $new_tags | sed -E 's/(\w+)/"\1"/g;s/\s/,/g')
|
||||
|
||||
curl -H "Authorization: Token ${LINKDING_TOKEN}" -H "Content-Type: application/json" -d "{\"url\": \"$QUTE_URL\", \"title\": \"$title\", \"tag_names\": [$formated_tags]}" ${LINKDING_URL}/api/bookmarks/ && \
|
||||
dunstify "Linkding" " Bookmark Added" || \
|
||||
dunstify --urgency=critical "Linkding" "Failed"
|
||||
notify-send --hint=string:x-dunst-stack-tag:l3gV75RD "Linkding" " Bookmark Added" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:l3gV75RD --urgency=critical "Linkding" "Failed"
|
||||
#+end_src
|
||||
|
||||
** Add Url to Buku using Rofi
|
||||
@@ -637,28 +637,28 @@ 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 -multi-select -p "Tags" -dmenu | tr "\n" "," | sed 's/\s*,\s*$//')
|
||||
|
||||
buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \
|
||||
dunstify "Buku" "Bookmark Added" || \
|
||||
dunstify --urgency=critical "Buku" " Bookmark Added"
|
||||
notify-send --hint=string:x-dunst-stack-tag:E3TueNZ0 "Buku" "Bookmark Added" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:E3TueNZ0 --urgency=critical "Buku" " Bookmark Added"
|
||||
#+end_src
|
||||
|
||||
** Add Url to Buku without asking for information
|
||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/buku-add.sh
|
||||
buku --add $QUTE_URL --title "$QUTE_TITLE" && \
|
||||
dunstify "Buku" "📑 Bookmark Added"
|
||||
notify-send "Buku" "📑 Bookmark Added"
|
||||
#+end_src
|
||||
|
||||
** Download with aria2c
|
||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add.sh
|
||||
aria2p add "$1" && \
|
||||
dunstify "Aria2" "Download Started" || \
|
||||
dunstify "Aria2" "Error"
|
||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
|
||||
#+end_src
|
||||
|
||||
** Download with aria2c on the Homelab
|
||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add-homelab.sh
|
||||
dl-add $(echo "$1" | sed 's/\&af=.*$//g') && \
|
||||
dunstify "Aria2" "Download Started" || \
|
||||
dunstify "Aria2" "Error"
|
||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
|
||||
#+end_src
|
||||
|
||||
** Save to PNG
|
||||
@@ -679,7 +679,7 @@ filename=$(rofi -p "filename" -dmenu -lines 1)
|
||||
if [ -n "$filename" ]; then
|
||||
cd ~/Pictures/ && \
|
||||
percollate pdf --css "@page { size: A4 portrait }" --output "$filename.pdf" "$QUTE_URL" && \
|
||||
dunstify "Percollate" "Successfully saved to pdf"
|
||||
notify-send "Percollate" "Successfully saved to pdf"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -689,7 +689,7 @@ passname=$(ls ~/.password-store/totp-* | xargs -n 1 basename | sed -e 's/\..*$//
|
||||
|
||||
if [ -n "$passname" ]; then
|
||||
pass otp $passname | xsel -ib && \
|
||||
dunstify 'OTP' 'copied to clipboard.' &
|
||||
notify-send 'OTP' 'copied to clipboard.' &
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -698,12 +698,12 @@ fi
|
||||
m3u8_path=`curl -L -s "$QUTE_URL" | pcregrep -o1 "file = \"\/(.*aes.*mp4)\""`
|
||||
|
||||
if [ -z "$m3u8_path" ]; then
|
||||
dunstify --urgency=critical "Qutebrowser" "No m3u8 playlist found"
|
||||
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP --urgency=critical "Qutebrowser" "No m3u8 playlist found"
|
||||
else
|
||||
dunstify "Qutebrowser" "Downloads..." && \
|
||||
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP "Qutebrowser" "Downloads..." && \
|
||||
cd ~/Downloads/ && \
|
||||
ffmpeg -user_agent "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0" -referer "$QUTE_URL" -i "https://cdn2.digitellinc.com/play/_definst_/mp4:$m3u8_path/playlist.m3u8" -c copy "$QUTE_TITLE.mp4" && \
|
||||
dunstify "Qutebrowser" "$QUTE_TITLE Downloaded"
|
||||
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP "Qutebrowser" "$QUTE_TITLE Downloaded"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
|
||||
Reference in New Issue
Block a user