summaryrefslogtreecommitdiff
path: root/functions/ipw.fish
diff options
context:
space:
mode:
Diffstat (limited to 'functions/ipw.fish')
-rw-r--r--functions/ipw.fish5
1 files changed, 5 insertions, 0 deletions
diff --git a/functions/ipw.fish b/functions/ipw.fish
new file mode 100644
index 0000000..3885717
--- /dev/null
+++ b/functions/ipw.fish
@@ -0,0 +1,5 @@
+function ipw --description "get information about the current default wifi"
+ set -l defaultWifi (/usr/bin/ip r | /usr/bin/grep --color=none default | tr ' ' '\n' | /usr/bin/grep dev -A1 --color=none | tail -n 1)
+ iw $defaultWifi link
+ printf "iw $defaultWifi link"
+end