Last active
December 22, 2015 12:27
-
-
Save vn971/25cb151003de756214ce to your computer and use it in GitHub Desktop.
hedgewars-chat-notify.sh (notifies on new CHAT messages in multiplayer mode)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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