12345678910111213141516171819 |
- notify() {
- app="$1"
- icon="$2"
- summary="$3"
- text="$4"
- popup_summary="$5"
- popup_text="$6"
- [ "$icon" = "" ] && icon="icon-lock-information"
- [ "$app" = "" ] && app="${0##*/}"
- [ "$app" != "${app#-}" ] && app="\\$app" # esacpe leading dash
- # Why 42?
- gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify\
- "$app" 42 "$icon" "$summary" "$text" "[]" "{'x-nemo-preview-summary':<'$popup_summary'>, 'x-nemo-preview-body':<'$popup_text'>}" 0
- }
|