#!/bin/sh set -Ceu # for nixos exists=$(command -v pgrep || echo "") if [ -z "$exists" ]; then PATH="/run/current-system/sw/bin/:"$PATH fi if pgrep -x 'X|Xorg' >/dev/null; then /home/"$USER"/bin/pinentry-dmenu "$@" else pinentry-curses "$@" fi