better notification for chatrooms
authorTomas Mudrunka <tomas@mudrunka.cz>
Tue, 24 Mar 2015 13:48:46 +0000 (14:48 +0100)
committerTomas Mudrunka <tomas@mudrunka.cz>
Tue, 24 Mar 2015 13:48:46 +0000 (14:48 +0100)
purple/answerscripts.d/00-notify.sh

index dc7033d..f0d7ee1 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
 #Show notification for each incomming message
 ANSW_MSG="$(echo "$ANSW_MSG" | sed -e 's/&/&amp\;/g;s/</\&lt\;/g;s/>/\&gt;/g')"
-notify-send -i pidgin "$ANSW_PROTOCOL:$ANSW_R_NAME" "$ANSW_MSG"
+[ -n "$ANSW_R_ROOM_NAME" ] && room="$ANSW_R_ROOM_NAME:" || room=''
+notify-send -i pidgin "$ANSW_PROTOCOL:$room$ANSW_R_ALIAS" "$ANSW_MSG"
This page took 0.204935 seconds and 4 git commands to generate.