From 032cab6ba8f11523648e21d3177adae5258ca1e0 Mon Sep 17 00:00:00 2001 From: Michel Fedde Date: Fri, 17 Oct 2025 16:40:31 +0200 Subject: [PATCH] Fixed id selection for 2fa rofi --- .config/rofi/scripts/2fa.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 |