summaryrefslogtreecommitdiff
path: root/bin/.bin/wpa
blob: c37ba1561af4e8de0062f972c6e0a33a9ebf5f5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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-wlp3s0.conf
        ;;
    n*)
        sudo wpa_cli -i wlp3s0 select_network "$2"
        ;;
    l*)
        sudo wpa_cli -i wlp3s0 list_networks
        ;;
    *)
        sudo wpa_cli -i wlp3s0 "$*"
esac