From 02308076e833029cb84467e1773aacbac8ae1f0a Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Tue, 12 Mar 2019 20:29:37 +0100 Subject: Simple changes to some scripts. --- i3blocks/i3internet.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'i3blocks') diff --git a/i3blocks/i3internet.sh b/i3blocks/i3internet.sh index ab26611..1523c9b 100755 --- a/i3blocks/i3internet.sh +++ b/i3blocks/i3internet.sh @@ -11,14 +11,17 @@ if [ $wstatus = "down" ]; then wifi="❌" else # with IP - wifi="$(nmcli | grep "wlp2s0: conectado to " | cut -d' ' -f4-) ($(ip addr show wlp2s0 | grep "inet " | cut -d' ' -f6)) ($(grep "^\s*w" /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}'))" - # no IP - #wifi="$(nmcli | grep "wlp2s0: conectado to " | cut -d' ' -f4-) ($(grep "^\s*w" /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}'))" + #wifi="✔️$(nmcli | grep "wlp2s0: connected to " | cut -d' ' -f4-) ($(ip addr show wlp2s0 | grep "inet " | cut -d' ' -f6)) ($(grep "^\s*w" /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}'))" + # with name + wifi="✔️ $(nmcli | grep "wlp2s0: connected to " | cut -d' ' -f4-) ($(grep "^\s*w" /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}'))" fi if [ $estatus = "down" ]; then en="❌" else - en=$(ip addr show enp3s0 | grep "inet " | cut -d' ' -f6) + # with IP + #en=$(ip addr show enp3s0 | grep "inet " | cut -d' ' -f6) + # no IP + en=✔️ fi -echo "📶$wifi 🌐$en" +echo "📶$wifi 🌐$en" -- cgit v1.2.1