#!/bin/sh escape() { printf "%s" "$1" | sed 's#\#\\#g' } strip() { printf "%s" "$1" | sed 's,/.*,,' } buf=$(strip "$BUFFER") sender=$(strip "$SENDER") notify-send "[$buf] $sender" "$MESSAGE"