#!/bin/sh echo 'OK this mf ready' while read stdin; do case $stdin in *GETPIN*) echo "D `dmenu-wl -P -po "$KEYNAME ($KEYID)" -nb '#2b3339' -nf '#d3c6aa' -sb '#d3c6aa' -sf '#212736' -h 22 -fn 'DroidSansM Nerd Font'`"; echo "OK" ;; *SETDESC*) KEYNAME=${stdin#*:%0A%22}; KEYNAME=${KEYNAME%\%22\%0A*}; KEYID=${stdin#*ID }; KEYID=${KEYID%,*}; echo OK ;; *SETERROR*) notify-send "${stdin#SETERROR }"; echo "OK" ;; *BYE*) exit 0 ;; *) echo OK ;; esac done