#!/bin/sh {{- if eq .wm "x11" }} # Home laptop uname="$(gopass ls --flat | dmenu -l 15 -p 'Username: ' | xargs -r gopass show | sed -n '2p')" # [t]ype or copy if [ "$1" = "-t" ] ; then xdotool type --delay 1 --clearmodifiers "${uname}" else printf "${uname}" | xsel -ib -t 30000 fi {{- else }} uname="$(gopass ls --flat | wmenu -l 15 -p 'Username: ' -f 'Liberation Mono 12px' | xargs -r gopass show | sed -n '2p')" # [t]ype or copy if [ "$1" = "-t" ] ; then wtype "${uname}" else wl-copy "${uname}" ( sleep 30 && wl-copy -c ) & fi {{- end }}