Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
hedgewars-chat-notify.sh (notifies on new CHAT messages in multiplayer mode)
#!/bin/bash -eu
hedgewars 2>&1 | (
while read -r LINE; do
if [[ "$LINE" == *CHAT* ]]; then
notify-send "$LINE";
echo "$LINE";
fi;
done;
)
# notes:
# you can use `notify-send --icon=hedgewars` to add a beautiful icon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment