From c74365888889dacc403ec50a92180144a771bac4 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sun, 15 Oct 2017 17:29:31 +0200 Subject: Add i3blocks config --- i3/.config/i3blocks/bin/wifi | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 i3/.config/i3blocks/bin/wifi (limited to 'i3/.config/i3blocks/bin/wifi') diff --git a/i3/.config/i3blocks/bin/wifi b/i3/.config/i3blocks/bin/wifi new file mode 100755 index 0000000..2e47da2 --- /dev/null +++ b/i3/.config/i3blocks/bin/wifi @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +quality=$(lspci | grep -i Wireless | sed 's/^.*(rev \(.*\))/\1/') +ssid=$(iwconfig wlp2s0 | grep -oP '(?<=ESSID:").*(?=")') +address=$(ip addr show wlp2s0 | grep -oP -m1 "(?<=inet ).*(?=/)") + +echo "(${quality}% at ${ssid}) ${address}" -- cgit v1.2.3