diff --git a/config.py b/config.py new file mode 100644 index 0000000..38dc282 --- /dev/null +++ b/config.py @@ -0,0 +1,13 @@ +class bcolors: + EMPTY = '\033[34m' #BLUE + MIDWAY = '\033[33m' #YELLOW + FULL = '\033[31m' #RED + RESET = '\033[0m' #RESET COLOR + UNUSED = '\033[90m' #UNUSED + +class env: + mountpoints = ['/'] # Add mountpoints here to be displayed in diskusage script + services = { # Add services here to be displayed in the services display script +# 'service name' : 'display name' + 'gdm': 'GNOME Display Manager' + } diff --git a/diskusage.py b/diskusage.py index 719154b..39cc6c4 100644 --- a/diskusage.py +++ b/diskusage.py @@ -1,14 +1,8 @@ import os +from config import bcolors,env barWidth = 50 -class bcolors: - EMPTY = '\033[34m' #BLUE - MIDWAY = '\033[33m' #YELLOW - FULL = '\033[31m' #RED - RESET = '\033[0m' #RESET COLOR - UNUSED = '\033[90m' #UNUSED - # Function to generate usage bar based on percentage of storage in use def generateBar(percentage): no_used = int((percentage/100)*barWidth)