1#!/bin/sh2# from https://codeberg.org/achill/pinentry-rofi3# ported from pinentry-dmenu4# ported from https://codeberg.org/sewn/home/raw/branch/master/bin/pinentry-wmenu56echo 'OK Pleased to meet you'78while read stdin; do9 echo $stdin >> /tmp/pinenetry10 case $stdin in11 *BYE*) exit ;;12 *SETDESC*) export desc="${stdin/SETDESC/}"; ;;13 *GETPIN*) printf 'D %s\n' $(rofi -dmenu -password -p "${error:+$error }$prompt " -mesg "${desc//%0A/\&\#x0a;}") ;;14 *SETERROR*) error="${stdin#*\ }"; ;;15 *SETPROMPT*) prompt="${stdin#*\ }"; ;;16 *CONFIRM*)17 if rofi -dmenu -p "$prompt" -mesg "$desc" -e "Press Enter to Confirm or Esc to Cancel" > /dev/null; then18 :19 else20 # User canceled21 echo "ERR 83886179 Operation cancelled <Pinentry>"22 continue23 fi24 ;;25 esac2627 echo OK28done29