aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/statusbar/sb-internet
diff options
context:
space:
mode:
authorawy <awy@awy.one>2024-11-30 16:55:21 +0300
committerawy <awy@awy.one>2024-11-30 16:55:21 +0300
commitb893bee74dcbdc1e11daa98da39c49e6afecc9e6 (patch)
treecbf711641dac69e5879f165495231f948c0d63d2 /.local/bin/statusbar/sb-internet
parent18497419838d63c09fa86ed2217b94b7a2b2b32a (diff)
small fixes + sb-disk module
Diffstat (limited to '.local/bin/statusbar/sb-internet')
-rwxr-xr-x.local/bin/statusbar/sb-internet28
1 files changed, 14 insertions, 14 deletions
diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet
index 07774e0..e138115 100755
--- a/.local/bin/statusbar/sb-internet
+++ b/.local/bin/statusbar/sb-internet
@@ -1,8 +1,8 @@
#!/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
+# Show wifi ๓ฐคจ and percent strength or ๓ฐคฎ if none.
+# Show ๏›ฟ if connected to ethernet or ๓ฑ˜– if none.
+# Show ๏€ฃ if a vpn connection is active
togglevpn() {
if [ ! -n "$(cat /sys/class/net/libre/operstate 2>/dev/null)" ];then
@@ -16,28 +16,28 @@ togglevpn() {
case $BLOCK_BUTTON in
1) togglevpn 2>/dev/null ;;
- 3) notify-send "๐ŸŒ Internet module" "\- Click to enable/disable VPN
- โŒ: wifi disabled
- ๐Ÿ“ก: no wifi connection
- ๐Ÿ“ถ: wifi connection with quality
- โŽ: no ethernet
- ๐ŸŒ: ethernet working
- ๐Ÿ”’: vpn is active
+ 3) notify-send "๏‚ฌ Internet module" "\- Click to enable/disable VPN
+๏€ : wifi disabled
+๓ฐคฎ : no wifi connection
+๓ฐคจ : wifi connection with quality
+๓ฑ˜– : no ethernet
+๏›ฟ : ethernet working
+๏€ฃ : vpn is active
" ;;
8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
# Wifi
if [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'up' ] ; then
- wifiicon="$(awk '/^\s*w/ { print "๐Ÿ“ถ", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
+ wifiicon="$(awk '/^\s*w/ { print "๓ฐคจ ", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ] ; then
- [ "$(cat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="๐Ÿ“ก " || wifiicon="โŒ "
+ [ "$(cat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="๓ฐคฎ " || wifiicon="๏€ "
fi
# Ethernet
-[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="๏›ฟ " || ethericon="โŽ"
+[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="๏›ฟ " || ethericon="๓ฑ˜– "
-# Wireguard
+# VPN (change libre to your tun interface name)
[ -n "$(cat /sys/class/net/libre/operstate 2>/dev/null)" ] && tunicon=" ๏€ฃ "
printf "%s%s%s\n" "$wifiicon" "$ethericon" "$tunicon"