Change dunstify to notidy-send
This commit is contained in:
parent
2c108d1682
commit
b1de90b743
@ -48,13 +48,13 @@ drive=$(echo -e 'ESRF\nNAS' | rofi -dmenu -no-custom -p 'Drive:' -l 20);
|
|||||||
|
|
||||||
if grep -qs "/home/thomas/mnt/$drive" /proc/mounts; then
|
if grep -qs "/home/thomas/mnt/$drive" /proc/mounts; then
|
||||||
umount "/home/thomas/mnt/$drive" && \
|
umount "/home/thomas/mnt/$drive" && \
|
||||||
dunstify --replace=58249 "$drive " 'Successfully unmounted' || \
|
notify-send "$drive " 'Successfully unmounted' || \
|
||||||
dunstify --replace=58249 --urgency=critical "$drive " 'Error while unmounted'
|
notify-send --urgency=critical "$drive " 'Error while unmounted'
|
||||||
else
|
else
|
||||||
echo "It's not mounted."
|
echo "It's not mounted."
|
||||||
mount "/home/thomas/mnt/$drive" && \
|
mount "/home/thomas/mnt/$drive" && \
|
||||||
dunstify --replace=58249 "$drive " 'Successfully mounted' || \
|
notify-send "$drive " 'Successfully mounted' || \
|
||||||
dunstify --replace=58249 --urgency=critical "$drive " 'Error while mounted'
|
notify-send --urgency=critical "$drive " 'Error while mounted'
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
20
binaries.org
20
binaries.org
@ -135,7 +135,7 @@ if [ ! -z "$ps_line" ]; then
|
|||||||
name=$(echo $ps_line | awk '{print $4}')
|
name=$(echo $ps_line | awk '{print $4}')
|
||||||
|
|
||||||
kill -15 $pid && \
|
kill -15 $pid && \
|
||||||
dunstify "Kill" "$name (PID $pid)" &
|
notify-send "Kill" "$name (PID $pid)" &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -152,14 +152,14 @@ tmpfile="/tmp/vpnstatus";
|
|||||||
|
|
||||||
if [[ $(nordvpn status) == *"Connected"* ]]; then
|
if [[ $(nordvpn status) == *"Connected"* ]]; then
|
||||||
nordvpn disconnect && \
|
nordvpn disconnect && \
|
||||||
dunstify --replace=23198 "VPN" "Disconnected" && \
|
notify-send "VPN" "Disconnected" && \
|
||||||
echo "off" > $tmpfile;
|
echo "off" > $tmpfile;
|
||||||
else
|
else
|
||||||
# Select Country to connect to
|
# Select Country to connect to
|
||||||
country=`cat ~/.local/data/nordvpn_countries.txt | rofi -i -dmenu | sed 's/\s/_/g'`;
|
country=`cat ~/.local/data/nordvpn_countries.txt | rofi -i -dmenu | sed 's/\s/_/g'`;
|
||||||
dunstify --replace=23198 "VPN" "Connecting to $country...";
|
notify-send "VPN" "Connecting to $country...";
|
||||||
nordvpn connect $country && \
|
nordvpn connect $country && \
|
||||||
dunstify --replace=23198 "VPN" "Connected to $country" && \
|
notify-send "VPN" "Connected to $country" && \
|
||||||
echo "on" > $tmpfile;
|
echo "on" > $tmpfile;
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -715,7 +715,7 @@ if [ -n "$1" ]; then
|
|||||||
xdotool key Shift+Insert
|
xdotool key Shift+Insert
|
||||||
else
|
else
|
||||||
echo "$chosen" | tr -d '\n' | xsel -ib
|
echo "$chosen" | tr -d '\n' | xsel -ib
|
||||||
dunstify "'$chosen' copied to clipboard." &
|
notify-send "'$chosen' copied to clipboard." &
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -739,7 +739,7 @@ if [ -n "$1" ]; then
|
|||||||
xdotool key Shift+Insert
|
xdotool key Shift+Insert
|
||||||
else
|
else
|
||||||
echo "$chosen" | tr -d '\n' | xsel -ib
|
echo "$chosen" | tr -d '\n' | xsel -ib
|
||||||
dunstify "'$chosen' copied to clipboard." &
|
notify-send "'$chosen' copied to clipboard." &
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -850,8 +850,8 @@ if [ $TMUX ]; then
|
|||||||
tmux split -v -l 1 "curl --progress-bar -F\"file=@$1\" https://0x0.st | xsel -ib;" && tmux select-pane -U
|
tmux split -v -l 1 "curl --progress-bar -F\"file=@$1\" https://0x0.st | xsel -ib;" && tmux select-pane -U
|
||||||
else
|
else
|
||||||
curl --progress-bar -F"file=@$1" https://0x0.st | xsel -ib && \
|
curl --progress-bar -F"file=@$1" https://0x0.st | xsel -ib && \
|
||||||
dunstify 'Upload' 'Successful' || \
|
notify-send 'Upload' 'Successful' || \
|
||||||
dunstify --urgency=critical 'Upload' 'Failed'
|
notify-send --urgency=critical 'Upload' 'Failed'
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -914,8 +914,8 @@ fi
|
|||||||
|
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
doi2bib $doi | xsel -ib && \
|
doi2bib $doi | xsel -ib && \
|
||||||
dunstify 'BibTeX' 'Copied to Clipboard' || \
|
notify-send 'BibTeX' 'Copied to Clipboard' || \
|
||||||
dunstify --urgency=critical 'BibTeX' 'Failed'
|
notify-send --urgency=critical 'BibTeX' 'Failed'
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ if [[ -f $1 ]]; then
|
|||||||
exit;
|
exit;
|
||||||
fi
|
fi
|
||||||
khal import -a "$calendar" --batch $1 && \
|
khal import -a "$calendar" --batch $1 && \
|
||||||
dunstify "Calendar" "Even added";
|
notify-send --hint=string:x-dunst-stack-tag:fJeNG8gc "Calendar" "Even added";
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -92,7 +92,7 @@ mpd_music_dir = ~/Music
|
|||||||
|
|
||||||
Notification of song change.
|
Notification of song change.
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
execute_on_song_change = dunstify --replace=19845 "Now Playing ♫" "$(mpc current)"
|
execute_on_song_change = notify-send --hint=string:x-dunst-stack-tag:Z7uCd3ZP "Now Playing ♫" "$(mpc current)"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Better user interface
|
Better user interface
|
||||||
|
@ -68,7 +68,7 @@ notify-always no
|
|||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
dunstify --replace=38492 "Newsboat " "$1"
|
notify-send "Newsboat " "$1"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Bindings
|
** Bindings
|
||||||
@ -122,7 +122,7 @@ bookmark-interactive no
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
buku --add "$1" --title "$2" --comment "$3" && \
|
buku --add "$1" --title "$2" --comment "$3" && \
|
||||||
dunstify "Buku" "Bookmark Added" && \
|
notify-send "Buku" "Bookmark Added" && \
|
||||||
exit 0
|
exit 0
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
54
polybar.org
54
polybar.org
@ -327,11 +327,11 @@ fi
|
|||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
:END:
|
:END:
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
dunstify --replace=98465 "Mails " "Syncing...";
|
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "Syncing...";
|
||||||
checkmail -q && \
|
checkmail -q && \
|
||||||
mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l` && \
|
mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l` && \
|
||||||
if [ "$mail_nb" -eq "0" ]; then
|
if [ "$mail_nb" -eq "0" ]; then
|
||||||
dunstify --replace=98465 "Mails " "No new mail";
|
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "No new mail";
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ fi
|
|||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
:END:
|
:END:
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
dunstify --replace=38492 "Newsboat " "Reloading...";
|
notify-send --hint=string:x-dunst-stack-tag:4z5CvV6G "Newsboat " "Reloading...";
|
||||||
|
|
||||||
if pgrep -x "newsboat" >/dev/null; then
|
if pgrep -x "newsboat" >/dev/null; then
|
||||||
# If newsboat is already running, try to refresh in the tmux session
|
# If newsboat is already running, try to refresh in the tmux session
|
||||||
@ -389,7 +389,7 @@ if pgrep -x "newsboat" >/dev/null; then
|
|||||||
else
|
else
|
||||||
newsboat -x reload && /
|
newsboat -x reload && /
|
||||||
news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
|
news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
|
||||||
dunstify --replace=38492 "Newsboat " "$news_nb Unread News";
|
notify-send --hint=string:x-dunst-stack-tag:4z5CvV6G "Newsboat " "$news_nb Unread News";
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -493,10 +493,10 @@ fi
|
|||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if pgrep -x "redshift" >/dev/null; then
|
if pgrep -x "redshift" >/dev/null; then
|
||||||
killall redshift && \
|
killall redshift && \
|
||||||
dunstify --replace=36492 "Redshift 望" "Turned off";
|
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift 望" "Turned off";
|
||||||
else
|
else
|
||||||
nohup redshift > /dev/null 2>&1 &
|
nohup redshift > /dev/null 2>&1 &
|
||||||
dunstify --replace=36492 "Redshift 望" "Starting...";
|
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift 望" "Starting...";
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -539,16 +539,16 @@ fi
|
|||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
:END:
|
:END:
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
dunstify --replace=64654 'Packages ' "Refreshing..."
|
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "Refreshing..."
|
||||||
|
|
||||||
paru -Sy > /dev/null 2>&1 && \
|
paru -Sy > /dev/null 2>&1 && \
|
||||||
package_nb=$(paru -Qu 2> /dev/null | wc -l) || \
|
package_nb=$(paru -Qu 2> /dev/null | wc -l) || \
|
||||||
package_nb=0
|
package_nb=0
|
||||||
|
|
||||||
if [ "$package_nb" -eq "0" ]; then
|
if [ "$package_nb" -eq "0" ]; then
|
||||||
dunstify --replace=64654 'Packages ' "No upgrade available"
|
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "No upgrade available"
|
||||||
else
|
else
|
||||||
dunstify --replace=64654 'Packages ' "$package_nb upgrade(s) available"
|
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "$package_nb upgrade(s) available"
|
||||||
fi
|
fi
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
@ -606,9 +606,9 @@ tmpfile="/tmp/dunststatus";
|
|||||||
if [ -f $tmpfile ] && grep -q "off" $tmpfile ; then
|
if [ -f $tmpfile ] && grep -q "off" $tmpfile ; then
|
||||||
killall -SIGUSR2 dunst && \
|
killall -SIGUSR2 dunst && \
|
||||||
echo "on" > $tmpfile;
|
echo "on" > $tmpfile;
|
||||||
dunstify --replace=16549 "Notifications " "Activated";
|
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Activated";
|
||||||
else
|
else
|
||||||
dunstify --replace=16549 "Notifications " "Deactivated";
|
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Deactivated";
|
||||||
sleep 1 && \
|
sleep 1 && \
|
||||||
killall -SIGUSR1 dunst && \
|
killall -SIGUSR1 dunst && \
|
||||||
echo "off" > $tmpfile;
|
echo "off" > $tmpfile;
|
||||||
@ -654,10 +654,10 @@ fi
|
|||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if pgrep -x "xautolock" >/dev/null ; then
|
if pgrep -x "xautolock" >/dev/null ; then
|
||||||
pkill xautolock && \
|
pkill xautolock && \
|
||||||
dunstify --replace=13602 'Lock Screen ' 'Desactivated'
|
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Desactivated'
|
||||||
else
|
else
|
||||||
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "notify-send -u --hint=string:x-dunst-stack-tag:tH6bxvvv critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||||
dunstify --replace=13602 'Lock Screen ' 'Activated'
|
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Activated'
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -718,13 +718,13 @@ isdevicedown=$(nmcli device status | grep ^$1 | grep disconnected)
|
|||||||
|
|
||||||
if [ -z "$isdevicedown" ]
|
if [ -z "$isdevicedown" ]
|
||||||
then
|
then
|
||||||
dunstify --replace=84847 "$1" "Disconnecting..." && \
|
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnecting..." && \
|
||||||
nmcli device disconnect $1 && \
|
nmcli device disconnect $1 && \
|
||||||
dunstify --replace=84847 "$1" "Disconnected"
|
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnected"
|
||||||
else
|
else
|
||||||
dunstify --replace=84847 "$1" "Connection..." && \
|
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connection..." && \
|
||||||
nmcli device connect $1 && \
|
nmcli device connect $1 && \
|
||||||
dunstify --replace=84847 "$1" "Connected"
|
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connected"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -788,10 +788,10 @@ isconnected=$(bluetoothctl show $controllerid | grep Powered | grep yes)
|
|||||||
if [ -z "$isconnected" ]
|
if [ -z "$isconnected" ]
|
||||||
then
|
then
|
||||||
bluetoothctl power on && \
|
bluetoothctl power on && \
|
||||||
dunstify --replace=88498 "Bluetooth" "Power ON"
|
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power ON"
|
||||||
else
|
else
|
||||||
bluetoothctl power off && \
|
bluetoothctl power off && \
|
||||||
dunstify --replace=88498 "Bluetooth" "Power OFF"
|
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power OFF"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -868,16 +868,12 @@ fi
|
|||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
config="homelab"
|
if pgrep -x "highlight-point" >/dev/null; then
|
||||||
|
killall highlight-point && \
|
||||||
connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
|
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Turned off";
|
||||||
|
|
||||||
if [ "$connection" = "$config" ]; then
|
|
||||||
sudo wg-quick down "$config" && \
|
|
||||||
dunstify --replace=83244 "Wireguard" "Disconnected from $config"
|
|
||||||
else
|
else
|
||||||
sudo wg-quick up "$config" && \
|
nohup highlight-pointer -r 10 > /dev/null 2>&1 &
|
||||||
dunstify --replace=83244 "Wireguard" "Connected to $config"
|
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Highlight...";
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -397,12 +397,12 @@ username=$(echo -e "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze"
|
|||||||
password=$(rofi -p "Password" -dmenu -password -lines 1)
|
password=$(rofi -p "Password" -dmenu -password -lines 1)
|
||||||
|
|
||||||
if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then
|
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
|
else
|
||||||
echo -e "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
|
echo -e "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
|
||||||
pass insert --multiline "$url/$username" < /tmp/add-password.txt;
|
pass insert --multiline "$url/$username" < /tmp/add-password.txt;
|
||||||
rm /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
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -415,15 +415,15 @@ if [[ "$1" == *"list"* ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$choice" ] && [ "$choice" = "Playlist" ]; then
|
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" && \
|
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" || \
|
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloaded" || \
|
||||||
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
|
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG --urgency=critical "Youtube " "Failed to download"
|
||||||
else
|
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" && \
|
youtube-dl --no-playlist -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" && \
|
||||||
dunstify --replace=19243 "Youtube " "Downloaded" || \
|
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloaded" || \
|
||||||
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
|
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG --urgency=critical "Youtube " "Failed to download"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+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')
|
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/ && \
|
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" || \
|
notify-send --hint=string:x-dunst-stack-tag:l3gV75RD "Linkding" " Bookmark Added" || \
|
||||||
dunstify --urgency=critical "Linkding" "Failed"
|
notify-send --hint=string:x-dunst-stack-tag:l3gV75RD --urgency=critical "Linkding" "Failed"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Add Url to Buku using Rofi
|
** 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*$//')
|
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" && \
|
buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \
|
||||||
dunstify "Buku" "Bookmark Added" || \
|
notify-send --hint=string:x-dunst-stack-tag:E3TueNZ0 "Buku" "Bookmark Added" || \
|
||||||
dunstify --urgency=critical "Buku" " Bookmark Added"
|
notify-send --hint=string:x-dunst-stack-tag:E3TueNZ0 --urgency=critical "Buku" " Bookmark Added"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Add Url to Buku without asking for information
|
** Add Url to Buku without asking for information
|
||||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/buku-add.sh
|
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/buku-add.sh
|
||||||
buku --add $QUTE_URL --title "$QUTE_TITLE" && \
|
buku --add $QUTE_URL --title "$QUTE_TITLE" && \
|
||||||
dunstify "Buku" "📑 Bookmark Added"
|
notify-send "Buku" "📑 Bookmark Added"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Download with aria2c
|
** Download with aria2c
|
||||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add.sh
|
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add.sh
|
||||||
aria2p add "$1" && \
|
aria2p add "$1" && \
|
||||||
dunstify "Aria2" "Download Started" || \
|
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
|
||||||
dunstify "Aria2" "Error"
|
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Download with aria2c on the Homelab
|
** Download with aria2c on the Homelab
|
||||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add-homelab.sh
|
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add-homelab.sh
|
||||||
dl-add $(echo "$1" | sed 's/\&af=.*$//g') && \
|
dl-add $(echo "$1" | sed 's/\&af=.*$//g') && \
|
||||||
dunstify "Aria2" "Download Started" || \
|
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
|
||||||
dunstify "Aria2" "Error"
|
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Save to PNG
|
** Save to PNG
|
||||||
@ -679,7 +679,7 @@ filename=$(rofi -p "filename" -dmenu -lines 1)
|
|||||||
if [ -n "$filename" ]; then
|
if [ -n "$filename" ]; then
|
||||||
cd ~/Pictures/ && \
|
cd ~/Pictures/ && \
|
||||||
percollate pdf --css "@page { size: A4 portrait }" --output "$filename.pdf" "$QUTE_URL" && \
|
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
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -689,7 +689,7 @@ passname=$(ls ~/.password-store/totp-* | xargs -n 1 basename | sed -e 's/\..*$//
|
|||||||
|
|
||||||
if [ -n "$passname" ]; then
|
if [ -n "$passname" ]; then
|
||||||
pass otp $passname | xsel -ib && \
|
pass otp $passname | xsel -ib && \
|
||||||
dunstify 'OTP' 'copied to clipboard.' &
|
notify-send 'OTP' 'copied to clipboard.' &
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -698,12 +698,12 @@ fi
|
|||||||
m3u8_path=`curl -L -s "$QUTE_URL" | pcregrep -o1 "file = \"\/(.*aes.*mp4)\""`
|
m3u8_path=`curl -L -s "$QUTE_URL" | pcregrep -o1 "file = \"\/(.*aes.*mp4)\""`
|
||||||
|
|
||||||
if [ -z "$m3u8_path" ]; then
|
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
|
else
|
||||||
dunstify "Qutebrowser" "Downloads..." && \
|
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP "Qutebrowser" "Downloads..." && \
|
||||||
cd ~/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" && \
|
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
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ old="$(($gmail_old+$esrf_old+$ulg_old+$uliege_old))"
|
|||||||
# =============================================================
|
# =============================================================
|
||||||
# Notification
|
# Notification
|
||||||
if [ "$new" -gt 0 ]; then
|
if [ "$new" -gt 0 ]; then
|
||||||
dunstify --replace=98465 'Mails ' "$(($gmail_new+$esrf_new+$ulg_new+$uliege_new)) new mail(s)"
|
notify-send --hint=string:x-dunst-stack-tag:fV84ivMi 'Mails ' "$new new mail(s)"
|
||||||
fi
|
fi
|
||||||
# =============================================================
|
# =============================================================
|
||||||
|
|
||||||
|
@ -65,15 +65,15 @@ on-download-error=/home/thomas/.config/aria2/download-error.sh
|
|||||||
|
|
||||||
** Download Start Script
|
** Download Start Script
|
||||||
#+begin_src bash :tangle ~/.config/aria2/download-start.sh :comments both :mkdirp yes :shebang "#!/bin/bash"
|
#+begin_src bash :tangle ~/.config/aria2/download-start.sh :comments both :mkdirp yes :shebang "#!/bin/bash"
|
||||||
dunstify "DL Started" "$(basename \"$3\" 2> /dev/null)"
|
notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW "DL Started" "$(basename \"$3\" 2> /dev/null)"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Download Complete Script
|
** Download Complete Script
|
||||||
#+begin_src bash :tangle ~/.config/aria2/download-complete.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
#+begin_src bash :tangle ~/.config/aria2/download-complete.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
||||||
dunstify "DL Completed" "$(basename \"$3\" 2> /dev/null)"
|
notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW "DL Completed" "$(basename \"$3\" 2> /dev/null)"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Download Error Script
|
** Download Error Script
|
||||||
#+begin_src bash :tangle ~/.config/aria2/download-error.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
#+begin_src bash :tangle ~/.config/aria2/download-error.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
||||||
dunstify --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)"
|
notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
Loading…
Reference in New Issue
Block a user