pinentry-wrapper 399 B

123456789101112
  1. #!/bin/sh
  2. # Context-aware pinentry wrapper
  3. # Uses pinentry-curses for terminal sessions and pinentry-gtk for GUI sessions
  4. # Check if we're in a graphical environment
  5. if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then
  6. # GUI environment - use GTK pinentry
  7. exec /usr/bin/pinentry-gnome3 "$@"
  8. else
  9. # Terminal environment - use curses pinentry
  10. exec /usr/bin/pinentry-curses "$@"
  11. fi