hedgewars-chat-notify.sh (notify on new CHAT messages in multiplayer mode)
Tue, 2015-12-22 11:39
I created a simple script to launch `hedgewars` and get a Desktop notification on each CHAT message in multiplayer mode.
Note that it catches both public room chat and your gaming chat. (Normally, you don't see public chat once you joined a gaming room.)
The script: https://gist.github.com/vn971/25cb151003de756214ce
Content (may become outdated):
Quote:
#!/bin/bash -eu
hedgewars 2>&1 | (
while read -r LINE; do
if [[ "$LINE" == *CHAT* ]]; then
notify-send "$LINE";
echo "$LINE";
fi;
done;
)
Special thanks: the idea to catch stderr was suggested by nemo.