summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2025-12-24 19:10:46 +0100
committerache <ache@ache.one>2025-12-24 19:10:46 +0100
commit418bd1ea958bd851b802b140a3a62a4a19fad703 (patch)
tree94d4f69723d89784efec18356e17e394d7cbb79d
parentfeat: Implement 'ia-commit' utility for generating professional git commit me... (diff)
feat: add ipw function to get default wifi information in fish shell
-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