diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-05-27 21:11:39 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-05-27 21:11:39 +0200 |
commit | 8e97cff50b77a5c381447e675ea448865aa69d74 (patch) | |
tree | 0334953d72201a7987d41d0df8d2ea9f1b06c76a /.local/bin/statusbar/internet | |
parent | 5f6c5f827e1789f27339e2f0e63d298cecb039d8 (diff) |
Bug fix in PATH export, added some of Luke's scripts
Diffstat (limited to '.local/bin/statusbar/internet')
-rw-r--r-- | .local/bin/statusbar/internet | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/.local/bin/statusbar/internet b/.local/bin/statusbar/internet deleted file mode 100644 index ee1a160..0000000 --- a/.local/bin/statusbar/internet +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# Show wifi 📶 and percent strength or 📡 if none. -# Show 🌐 if connected to ethernet or ❎ if none. -# Show 🔒 if a vpn connection is active - -case $BLOCK_BUTTON in - 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;; - 3) notify-send "🌐 Internet module" "\- Click to connect -📡: no wifi connection -📶: wifi connection with quality -❎: no ethernet -🌐: ethernet working -🔒: vpn is active -" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; -esac - -case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in - down) wifiicon="📡 " ;; - up) wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;; -esac - -printf "%s%s%s\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/🔒/" /sys/class/net/tun*/operstate 2>/dev/null)" |