diff options
Diffstat (limited to 'bin/netm')
| -rwxr-xr-x | bin/netm | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/bin/netm b/bin/netm index fab7e95..0ea9d2e 100755 --- a/bin/netm +++ b/bin/netm @@ -1327,39 +1327,12 @@ show_qrcode() { fi local qr_string="WIFI:T:${security};S:${ssid};P:${password};;" - local qr_file="/tmp/hyprltm-net-qr-${ssid}.png" - show_loading_notification "$tr_qrcode_generating" - qrencode -o "$qr_file" -s 10 -m 2 "$qr_string" - kill_loading_notification - - # Display QR code inside Rofi - # -i: Enable icons - # -theme-str: Override theme to show large icon and no text input - # Display QR code inside Rofi - # -i: Enable icons - # -show-icons: Required to show icons in dmenu mode - # -theme-str: Override theme to show large icon and no text input - - # We use the successful configuration from the test script - local rofi_override=" - window { width: 500px; } - listview { lines: 1; scrollbar: false; } - element { orientation: vertical; padding: 20px; children: [ element-icon, element-text ]; } - element-icon { enabled: true; size: 300px; horizontal-align: 0.5; } - element-text { horizontal-align: 0.5; } - entry { enabled: false; } - inputbar { enabled: false; } - " - - # We pass an entry with the icon set to the QR file path - # Format: Valid Text \0icon\x1f/path/to/image.png - # We use "Scan to Connect" as the text under the QR code - echo -e "Scan to Connect\0icon\x1f${qr_file}" | - fuzzel --dmenu -i -show-icons -p "$tr_qrcode_message" - - # Cleanup after Rofi closes - rm -f "$qr_file" 2>/dev/null + { + echo "" # spacer + qrencode -t UTF8i -s 10 -m 2 "$qr_string" + } | + display_menu 4 "Scan to connect..." "" '-l 18' } # Get password for a known Wi-Fi connection |