diff --git a/.config/rofi/scripts/2fa.sh b/.config/rofi/scripts/2fa.sh index 7ecb2c5..54b3697 100755 --- a/.config/rofi/scripts/2fa.sh +++ b/.config/rofi/scripts/2fa.sh @@ -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 |