This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
2020-03-29 19:16:35 +00:00
|
|
|
#!/bin/zsh
|
|
|
|
|
2020-04-14 04:07:37 +00:00
|
|
|
icon1="$HOME/img/.icn/trans1.png"
|
|
|
|
icon2="$HOME/img/.icn/trans2.png"
|
2020-03-29 19:16:35 +00:00
|
|
|
|
|
|
|
killall transmission-daemon 2> /dev/null
|
|
|
|
transmission-daemon --foreground --log-info 2>&1 | while read line; do
|
|
|
|
echo $line |
|
|
|
|
grep -v "announcer.c:\|platform.c:\|announce done (tr-dht.c:" |
|
|
|
|
grep -v "Saved.*variant.c:" |
|
|
|
|
while read line; do
|
|
|
|
echo $line | grep -q "Queued for verification (verify.c:" &&
|
|
|
|
notify-send -i "$icon1" --app-name="Transmission Started" "${line#* * }"
|
|
|
|
echo $line | grep -q "changed from .Incomplete. to .Complete." &&
|
|
|
|
notify-send -i "$icon2" --app-name="Transmission Complete" "${line#* * }"
|
|
|
|
echo $line | systemd-cat --identifier="TransWrap" --priority=5
|
|
|
|
done 2>&1 > /dev/null
|
|
|
|
done&disown
|