add mail module
This commit is contained in:
parent
57d99e9a72
commit
59fe449ed3
@ -7,6 +7,10 @@
|
|||||||
# network device, needed for upload and download modules
|
# network device, needed for upload and download modules
|
||||||
export netdevice=""
|
export netdevice=""
|
||||||
|
|
||||||
|
# mail directory, needed for mail module
|
||||||
|
export maildir=""
|
||||||
|
|
||||||
|
# module list. uncomment to enable.
|
||||||
# module list. uncomment to enable.
|
# module list. uncomment to enable.
|
||||||
# re-arrange to change order.
|
# re-arrange to change order.
|
||||||
# module name icon/prefix suffix
|
# module name icon/prefix suffix
|
||||||
@ -25,4 +29,5 @@ export netdevice=""
|
|||||||
#module_todo "TODO: " " | "
|
#module_todo "TODO: " " | "
|
||||||
#module_upload "Up: " " | "
|
#module_upload "Up: " " | "
|
||||||
#module_download "Down: " " | "
|
#module_download "Down: " " | "
|
||||||
|
#module_mail "Mail: " " | "
|
||||||
module_date "Date: " ""
|
module_date "Date: " ""
|
||||||
|
@ -71,3 +71,8 @@ module_download() {
|
|||||||
down="$(cat /sys/class/net/${netdevice}/statistics/tx_bytes | awk '{$1=$1/1024000; print $1"B";}' | tail -n 1)"
|
down="$(cat /sys/class/net/${netdevice}/statistics/tx_bytes | awk '{$1=$1/1024000; print $1"B";}' | tail -n 1)"
|
||||||
export bar="${bar}${1}${down}${2}"
|
export bar="${bar}${1}${down}${2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module_mail() {
|
||||||
|
mailoutput="$(ls ${maildir} | wc -l)"
|
||||||
|
[ "$mailoutput" = "0" ] || export bar="${bar}${1}${mailoutput}${2}"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user