aboutsummaryrefslogtreecommitdiff
path: root/bin/connect_wlan
diff options
context:
space:
mode:
Diffstat (limited to 'bin/connect_wlan')
-rwxr-xr-xbin/connect_wlan4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/connect_wlan b/bin/connect_wlan
index 7d27878..62aabc2 100755
--- a/bin/connect_wlan
+++ b/bin/connect_wlan
@@ -1,9 +1,11 @@
-#!/bin/env dash
+#!/bin/env bash
# script to pipe scanned networks to dmenu, using iwd
station="$(iwctl device list | grep station | awk ' { print $1 } ')"
+iwctl station "$station" disconnect
+
iwctl station "$station" scan
ssid="$(iwctl station "$station" get-networks | dmenu -l 6 -p "Connect to a network:" | sed -e 's/psk.*$//g' -e 's/^\W*//g' -e 's/\W*$//g')"