wl-mitm/contrib/notify-libnotify.sh
Peter Cai 23de31af7b Implement application toplevel title and id tracking
This makes messages emitted by ask and notify commands much better
2025-03-05 21:50:24 -05:00

15 lines
297 B
Bash
Executable file

#!/usr/bin/env bash
msg="$3"
if [ -z "$msg" ]; then
msg="called $1::$2"
fi
if [ ! -z "$WL_MITM_LAST_TOPLEVEL_TITLE" ]; then
msg="\"$WL_MITM_LAST_TOPLEVEL_TITLE\" $msg"
elif [ ! -z "$WL_MITM_LAST_TOPLEVEL_APP_ID" ]; then
msg="\"$WL_MITM_LAST_TOPLEVEL_APP_ID\" $msg"
fi
notify-send "$msg"