Fixed id selection for 2fa rofi
This commit is contained in:
parent
ab7d9f188e
commit
032cab6ba8
1 changed files with 2 additions and 2 deletions
|
|
@ -27,10 +27,10 @@ getApiToken
|
|||
setOption no-custom true
|
||||
case $ROFI_RETV in
|
||||
0)
|
||||
echo -en $(curl --oauth2-bearer "$token" "$DOMAIN/api/v1/twofaccounts" | jq -r '.[] | "\(.id)\\0display\\x1f\(.service) - \(.account)\\x1finfo\\x1f\(.)\\n"')
|
||||
echo -en $(curl --oauth2-bearer "$token" "$DOMAIN/api/v1/twofaccounts" | jq -r 'map("\(.id)\\0display\\x1f\(.service) - \(.account)\\x1finfo\\x1f\(.)\\n") | add')
|
||||
;;
|
||||
1)
|
||||
id=$@
|
||||
id=$(echo $ROFI_INFO | jq -r '.id')
|
||||
|
||||
curl --oauth2-bearer "$token" "$DOMAIN/api/v1/twofaccounts/$id/otp" |
|
||||
jq ".password" -r |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue