Skip to content

Instantly share code, notes, and snippets.

@Lechindianer
Forked from JamesTheBard/eventcmd
Last active December 2, 2015 02:51
Show Gist options
  • Save Lechindianer/9953299 to your computer and use it in GitHub Desktop.
Save Lechindianer/9953299 to your computer and use it in GitHub Desktop.
Eventcmd for mcabber
#!/bin/sh
echo "$1 $2 $3 $4" >> ~/test.mcabber.log
EVENT_TYPE=$1
EVENT_SUBTYPE=$2
JID=$3
FILE=$4
TITLE="mcabber"
#ICON="$HOME/.mcabber/images/chat.png"
TIMEOUT=10000
function new_message_in() {
# notify-send -i $ICON -t $TIMEOUT "$TITLE" "New message from ${JID}."
notify-send -t $TIMEOUT "$TITLE" "New message from ${JID}."
}
if [[ $EVENT_TYPE == "MSG" ]] && [[ $EVENT_SUBTYPE == "IN" ]]
then
new_message_in
fi
@Lechindianer
Copy link
Author

mcabberrc:

set events_command = ~/.mcabber/eventcmd
set events_ignore_active_window = 1
set eventcmd_use_nickname = 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment