diff options
author | Shubham Saini <pryr@pryr.xyz> | 2020-12-01 20:21:04 +0000 |
---|---|---|
committer | Shubham Saini <pryr@pryr.xyz> | 2020-12-01 20:21:04 +0000 |
commit | 1ff834e2b06761b083df9959d6c3d6bd2a94d2de (patch) | |
tree | abb8ff13bab1c6b5a0c0b17f2d29c058358d2135 /bin/.bin/wpa | |
parent | 90e96958f919df1f914381e93a97d77506fdcf03 (diff) |
mah thinkpad
Diffstat (limited to 'bin/.bin/wpa')
-rwxr-xr-x | bin/.bin/wpa | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | #https://github.com/icyphox/bin/blob/master/wpa | ||
3 | case "$1" in | ||
4 | r*) | ||
5 | sudo pkill wpa_supplicant | ||
6 | sudo wpa_supplicant -i wlp3s0 -B -c /etc/wpa_supplicant/wpa_supplicant.conf | ||
7 | ;; | ||
8 | n*) | ||
9 | sudo wpa_cli -i wlp3s0 select_network "$2" | ||
10 | ;; | ||
11 | l*) | ||
12 | sudo wpa_cli -i wlp3s0 list_networks | ||
13 | ;; | ||
14 | *) | ||
15 | sudo wpa_cli -i wlp3s0 "$*" | ||
16 | esac | ||