summaryrefslogtreecommitdiffstats
path: root/bin/hush/wifi
diff options
context:
space:
mode:
Diffstat (limited to 'bin/hush/wifi')
-rwxr-xr-xbin/hush/wifi38
1 files changed, 0 insertions, 38 deletions
diff --git a/bin/hush/wifi b/bin/hush/wifi
deleted file mode 100755
index 38c70ee..0000000
--- a/bin/hush/wifi
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-set -eu
-set -o pipefail
-
-DEV=wlp3s0
-OPEN=open
-
-if [ -z "${1:-}" ]; then
- if sudo netctl status $OPEN > /dev/null 2>&1; then
- sudo netctl restart $OPEN
- else
- sudo systemctl restart netctl-auto@$DEV
- fi
-else
- case "$1" in
- open)
- if [ -n "${2:-}" ]; then
- sudo sed -i "s/^ESSID=.*/ESSID='${2}'/" "/etc/netctl/${OPEN}"
- fi
-
- if sudo netctl status $OPEN > /dev/null 2>&1; then
- sudo netctl restart $OPEN
- else
- sudo systemctl stop netctl-auto@$DEV
- sudo netctl start $OPEN
- fi
- ;;
- wpa)
- if ! sudo systemctl status netctl-auto@$DEV > /dev/null 2>&1; then
- sudo netctl stop $OPEN
- sudo systemctl start netctl-auto@$DEV
- fi
- ;;
- scan)
- sudo iw dev $DEV scan | grep SSID | perl -nle 's/^.*SSID: //; print unless $seen{$_}++'
- ;;
- esac
-fi