play/scripts/ykclip-menu.sh

10 lines
183 B
Bash
Raw Normal View History

#!/usr/bin/env bash
name=$(ykman oath list | wofi -k /dev/null -i -d)
line=$(ykman oath code $name | head -n 1)
if test -n "$line"
then
echo $line | awk '{print $NF}' | wl-copy
fi