i have a sh script. i want libnotify to call that script instead of dunst or anything

thanks

  • jacky
    link
    fedilink
    arrow-up
    0
    ·
    4 days ago

    tiramisu sends notification to stdout, so you can write a wrapper around it to call any program or script you want.

    e.g. (using herbe to display notifications):

    #!/bin/bash
    buf=''
    /usr/bin/tiramisu -j | while read -r line; do
            buf="${buf}${line}"
            jq -e <<< "${buf}"
            if [[ $? -ne 4 ]]; then
                    /usr/bin/herbe "$(/usr/bin/jq -cMr '.summary' <<< "$buf")" "$(/usr/bin/jq -cMr '.body' <<< "$buf")"
                    buf=''
            else
                    buf="${buf}\\n"
            fi
    done