diff --git a/docker/dev.sh b/docker/dev.sh index 1c8ef12..2f20248 100755 --- a/docker/dev.sh +++ b/docker/dev.sh @@ -580,9 +580,21 @@ cmd_zeus() { echo "" if command -v qrencode &> /dev/null; then - qrencode -t ANSIUTF8 -m 1 "$lndconnect" + local qr_file="$STATE_DIR/zeus-lndconnect.png" + qrencode -o "$qr_file" -s 6 -l L "$lndconnect" + echo -e "QR code saved to: ${GREEN}$qr_file${NC}" echo "" - echo -e "${DIM}Scan with Zeus to connect to lnd-3 (funding node)${NC}" + + # Try to open the image + if command -v xdg-open &> /dev/null; then + xdg-open "$qr_file" 2>/dev/null & + echo -e "${DIM}Opening QR code image...${NC}" + elif command -v open &> /dev/null; then + open "$qr_file" 2>/dev/null & + echo -e "${DIM}Opening QR code image...${NC}" + else + echo -e "${DIM}Open the PNG file to scan with Zeus${NC}" + fi else echo -e "${DIM}$lndconnect${NC}" echo ""