3 ms·
#!/bin/sh # expects keyboard shortcut to be super+2 twof=`oathtool --totp mysecret` xset r off xdotool keyup --window 0 2 type --clearmodifiers
by Jach 8y ago
#!/bin/sh
# expects keyboard shortcut to be super+2
twof=`oathtool --totp mysecret`
xset r off
xdotool keyup --window 0 2 type --clearmodifiers --window 0 "$twof"
xset r on
sleep 0.3 && xdotool key 'Super' &
Shhh... (By the way real 2FA devices like yubikeys are great...)