[modules] Add support for disk utilization
Add a new module "disk" that takes an optional parameter (the path) and displays free & total disk space, along with the usage percentage. Also, added Tunnel/VPN support to the themeing of the "net" module.
This commit is contained in:
parent
b235ae88a4
commit
bb6ca556c7
5 changed files with 59 additions and 14 deletions
8
bumblebee/util.py
Normal file
8
bumblebee/util.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
def bytefmt(num):
|
||||
for unit in [ "", "Ki", "Mi", "Gi" ]:
|
||||
if num < 1024.0:
|
||||
return "{:.2f}{}B".format(num, unit)
|
||||
num /= 1024.0
|
||||
return "{:05.2f%}{}GiB".format(num)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue