diff --git a/config.sh b/config.sh index b7d8534..54f657b 100755 --- a/config.sh +++ b/config.sh @@ -4,6 +4,9 @@ # modules location . "$HOME/.config/candybar/modules.sh" +# network device, needed for upload and download modules +export netdevice="" + # module list. uncomment to enable. # re-arrange to change order. # module name icon/prefix suffix diff --git a/modules.sh b/modules.sh index a7ed9ea..262ceae 100755 --- a/modules.sh +++ b/modules.sh @@ -60,8 +60,6 @@ module_todo() { [ "$todooutput" = "" ] || export bar="${bar}${1}${todooutput}${2}" } -export netdevice="" - module_upload() { # https://github.com/speediegamer/xshbar-plugins/blob/main/netstat.plugin up="$(cat /sys/class/net/${netdevice}/statistics/rx_bytes | awk '{$1=$1/1024000; print $1"B";}' | tail -n 1)"