dotfiles/bin/ssh-askpass-rofi

11 lines
314 B
Bash
Executable file

#!/usr/bin/env bash
arg="$*"
key="$(echo "${arg}" | perl -ne "/'(.*)'/"' and print "$1\n"')"
pub="${key}.pub"
fingerprint="$(ssh-keygen -l -v -f "${pub}")"
mesg="${arg}
${fingerprint}
"
rofi -dmenu -disable-history -no-fixed-num-lines -l 1 -i -input /dev/null -password -p 'Passphrase' -mesg "${mesg}"