mirror of
https://gitlab.com/mlunax/dotfiles.git
synced 2025-04-19 16:55:36 +00:00
17 lines
298 B
Bash
17 lines
298 B
Bash
#!/bin/sh
|
|
|
|
escape() {
|
|
printf "%s" "$1" | sed 's#\\#\\\\#g'
|
|
}
|
|
|
|
if [ "$BUFFER" = "$SENDER" ]; then
|
|
title="[$BUFFER]"
|
|
else
|
|
title="[$BUFFER] $SENDER"
|
|
fi
|
|
|
|
focus=$(xdotool getwindowfocus getwindowname |grep -c senpai)
|
|
|
|
if [ "$focus" -eq 0 ]; then
|
|
notify-send "$title" "$(escape "$MESSAGE")"
|
|
fi
|