diff options
-rwxr-xr-x | bin/hornet/wifi | 38 | ||||
-rw-r--r-- | config/i3status/config | 8 | ||||
-rw-r--r-- | config/sh/aliases | 1 |
3 files changed, 5 insertions, 42 deletions
diff --git a/bin/hornet/wifi b/bin/hornet/wifi deleted file mode 100755 index 14eba23..0000000 --- a/bin/hornet/wifi +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -set -eu -set -o pipefail - -DEV=wlp0s20f3 -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 diff --git a/config/i3status/config b/config/i3status/config index 4ebe442..e7ff076 100644 --- a/config/i3status/config +++ b/config/i3status/config @@ -4,7 +4,7 @@ general { } order += "cpu_usage" -order += "wireless wlp0s20f3" +order += "wireless wlan0" order += "battery 0" order += "time" order += "load" @@ -13,9 +13,9 @@ cpu_usage { format = "CPU: %usage" } -wireless wlp0s20f3 { - format_up = "wlp0s20f3: (%essid: %quality)" - format_down = "wlp0s20f3" +wireless wlan0 { + format_up = "wlan0: (%essid: %quality)" + format_down = "wlan0" } battery 0 { diff --git a/config/sh/aliases b/config/sh/aliases index cbedfec..3ae4e9a 100644 --- a/config/sh/aliases +++ b/config/sh/aliases @@ -37,6 +37,7 @@ alias utc="env TZ=UTC date" alias pd="perldoc" alias pc="p | xclip -l 1" alias svim="vim -i NONE -u NONE -U NONE --noplugin --cmd 'set noswapfile' --cmd 'set nobackup' --cmd 'set nomodeline' --cmd 'set noexrc'" +alias wifi="sudo systemctl restart iwd" # }}} # vim:ft=sh:fdm=marker |