Merge branch 'master' of gitlab.cs.fau.de:ik15ydit/config

This commit is contained in:
Sheppy
2018-06-02 14:08:38 +02:00
5 changed files with 43 additions and 4 deletions

View File

@@ -16,6 +16,14 @@ def guthaben():
guthaben = hl_utils.color_panel(guthaben,col)
return guthaben;
def quota():
q = ''
if not hl_utils.is_cip():
return ''
else:
with open(hl_utils.hlpath("quota.cip")) as f:
return f.read()
def vpn():
vpn = ''
if hl_utils.is_cip():
@@ -29,6 +37,8 @@ def vpn():
def ip():
with open(hl_utils.hlpath(IP_LOG)) as f:
tmp = f.read()
if len(tmp) > 20:
tmp = hl_utils.color_panel("Public IP: IP6 ",GREEN)
tmp = ' '+tmp
return tmp;
@@ -60,7 +70,7 @@ def countdown():
tmp = "{} von 150 Tagen bis Abgabe verbleibend".format(delta.days)
else:
tmp = "{}h bis BC Abgabe".format(delta.hours)
tmp = hl_utils.color_panel(tmp,YELLOW)
tmp = hl_utils.color_panel(tmp,hl_utils.get_color(delta.days,0,180))
return tmp