19 lines
720 B
Bash
Executable File
19 lines
720 B
Bash
Executable File
#!/bin/zsh
|
|
|
|
icon1="$HOME/img/.icn/trans1.png"
|
|
icon2="$HOME/img/.icn/trans2.png"
|
|
|
|
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
|