move netdevice setting to configuration file
This commit is contained in:
parent
ea722302ac
commit
57d99e9a72
@ -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
|
||||
|
@ -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)"
|
||||
|
Loading…
Reference in New Issue
Block a user