Changed behaviour for login tracking

This commit is contained in:
Sheppy
2017-12-13 18:03:47 +01:00
parent f961470d7f
commit fbf9496846
3 changed files with 7 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ hc emit_hook reload
xsetroot -solid '#5A8E3A'
# reset
rm ~/.config/herbstluftwm/*.log
hc keyunbind --all
pkill xautolock
# WONT WORK --> cause process has other name no idea which though pkill -s 15 hl_status_deamon #send SIGTERM for correct termination during write

View File

@@ -14,6 +14,6 @@ BATTERY_LOG = "battery.log"
IP_LOG = "ip.log"
LOGINS_LOG = "logins.log"
BATTERY_CRITICAL = 2 # in %
BATTERY_CRITICAL = 3 # in %
BAT_WARNING_STR = ">>>>>>>>>>>>>>>> ------------ WARNING BATTER FAILURE IMMINENT ------------ <<<<<<<<<<<<<"
VALUES_KEPT = 10

View File

@@ -47,8 +47,11 @@ def date():
return hl_utils.shexec("date +' ^fg(#efefef)%H:%M^fg(#909090), %Y-%m-^fg(#efefef)%d'")
def logins():
with open(hl_utils.hlpath(LOGINS_LOG),'r') as f:
return f.read()
try:
with open(hl_utils.hlpath(LOGINS_LOG),'r') as f:
return f.read()
except:
return ""
if __name__ == "__main__":
print(logins(),ip(),vpn(),guthaben(),battery(),date(),sep='',end='')