From 0860db73ae6fd9a6f6347219d820bf026a6b8b91 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Sun, 27 Sep 2026 17:38:39 +0200 Subject: * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated-commit-by: dots Signed-off-by: Robert Günzler --- bin/netm | 37 +++++-------------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) (limited to 'bin/netm') 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 -- cgit 1.4.1