Skip to content

Instantly share code, notes, and snippets.

@vn971
Last active December 22, 2015 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vn971/25cb151003de756214ce to your computer and use it in GitHub Desktop.
Save vn971/25cb151003de756214ce to your computer and use it in GitHub Desktop.
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