dgy
/
hexagons
Archived
1
0
Fork 0
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.
hexagons/.local/bin/tsd

18 lines
715 B
Bash
Executable File

#!/bin/zsh
icon="$XDG_DATA_HOME/icons/Haiku/scalable/apps/transmission.svg"
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 "$icon" --app-name="Transmission Started" "${line#* * }"
echo $line | grep -q "changed from .Incomplete. to .Complete." &&
notify-send -i "$icon" --app-name="Transmission Complete" "${line#* * }"
# echo $line | systemd-cat --identifier="TransWrap" --priority=5
done 2>&1 > /dev/null
done&disown