Skip to content

emulating termux-notification

to bodge surplus on wheels (s+ow) on non-Termux systems

termux-notification, part of Termux:API, sends out an android notification

without termux-notification, s+ow will still run as it doesn't use set -e and very carefully handles all command invocations, with termux-notification being the graceful exception\

however, if you would like to emulate it, make an executable globally reachable with the same name

s+ow uses the command as such:

termux-notification \
    --priority "default" \
    --title "surplus on wheels: No bridges" \
    --content "No '$SPOW_BRIDGES' file; message is not sent."
termux-notification \
    --priority "min" \
    --ongoing \
    --id "s+ow" \
    --title "surplus on wheels" \
    --content "s+ow has started running."
termux-notification \
    --priority "min" \
    --id "s+ow" \
    --title "surplus on wheels" \
    --content ...
termux-notification \
    --priority "default" \
    --title "surplus on wheels has errored" \
    --content ...

see https://wiki.termux.com/wiki/Termux-notification for more information