From 1ff834e2b06761b083df9959d6c3d6bd2a94d2de Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Tue, 1 Dec 2020 20:21:04 +0000 Subject: mah thinkpad --- bin/.bin/wpa | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bin/.bin/wpa (limited to 'bin/.bin/wpa') diff --git a/bin/.bin/wpa b/bin/.bin/wpa new file mode 100755 index 0000000..89f0141 --- /dev/null +++ b/bin/.bin/wpa @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +#https://github.com/icyphox/bin/blob/master/wpa +case "$1" in + r*) + sudo pkill wpa_supplicant + sudo wpa_supplicant -i wlp3s0 -B -c /etc/wpa_supplicant/wpa_supplicant.conf + ;; + n*) + sudo wpa_cli -i wlp3s0 select_network "$2" + ;; + l*) + sudo wpa_cli -i wlp3s0 list_networks + ;; + *) + sudo wpa_cli -i wlp3s0 "$*" +esac -- cgit v1.2.3