Add new scripts for system monitoring and remove deprecated scripts

This commit is contained in:
2025-03-14 09:13:55 +00:00
parent d29b44e783
commit bde27ebfb1
20 changed files with 7 additions and 1740 deletions

13
scripts/neticon Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
# Wifi
if [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'up' ]; then
wifiicon="$(awk '/^[[:space:]]*w/ { gsub(/[[:space:]]+/, " "); print " ", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ]; then
wifiicon=" "
fi
# Ethernet
[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="󰛳 " || ethericon="󰅛 "
printf "%s%s\n" "$wifiicon" "$ethericon"