10321a0d21
remove .local/bin/dwmbar add .local/bin/statusbar scripts directory update .profile ($PATH) update .xprofile (dwmblocks at startup)
21 lines
660 B
Bash
Executable File
21 lines
660 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
######################################################################
|
|
# @author : swytch (swytch@$HOSTNAME)
|
|
# @file : sb-internet
|
|
# @license : MIT
|
|
# @created : Saturday Feb 13, 2021 17:35:49 CET
|
|
#
|
|
# @description : internet block for dwmblocks
|
|
######################################################################
|
|
|
|
|
|
# Wifi quality percentage and icon if ethernet is connected.
|
|
wifi="$(grep "^\s*w" /proc/net/wireless | awk '{ printf int($3 * 100 / 70) }')"
|
|
[ $wifi -ne 0 ] && printf "直 %3d%%" $wifi || printf "睊 ---"
|
|
eth="$(cat /sys/class/net/enp0s25/operstate)"
|
|
if [ "up" = "$eth" ]; then
|
|
printf " / "
|
|
fi
|
|
|