mirror of
https://github.com/FAUSheppy/config
synced 2025-12-06 07:01:36 +01:00
No Idea where that went in the first palce..
This commit is contained in:
@@ -11,12 +11,13 @@ GREEN = 0x32CD32
|
|||||||
YELLOW = 0xffff00
|
YELLOW = 0xffff00
|
||||||
|
|
||||||
#Druckerguthaben
|
#Druckerguthaben
|
||||||
while(True):
|
def pr_acct_status()_
|
||||||
if is_cip():
|
if is_cip():
|
||||||
path = hlpath("pracct.log")
|
path = hlpath("pracct.log")
|
||||||
out = color_remove(shexec("pr_acct").split("\n")[0]).split(' ')[-1]
|
out = color_remove(shexec("pr_acct").split("\n")[0]).split(' ')[-1]
|
||||||
with open(path,'w+') as f:
|
with open(path,'w+') as f:
|
||||||
f.write(out)
|
f.write(out)
|
||||||
|
def vpn_status():
|
||||||
if not is_cip():
|
if not is_cip():
|
||||||
vpn_path = hlpath("vpn_status.log")
|
vpn_path = hlpath("vpn_status.log")
|
||||||
out_vpn = subprocess.check_output(["ps","-ef"]).decode().split('\n')
|
out_vpn = subprocess.check_output(["ps","-ef"]).decode().split('\n')
|
||||||
@@ -27,15 +28,19 @@ while(True):
|
|||||||
ret += 1;
|
ret += 1;
|
||||||
print(ret)
|
print(ret)
|
||||||
if ret <= 1:
|
if ret <= 1:
|
||||||
out_vpn = color_panel("VPN DEACTIVATED",RED)
|
out_vpn = color_panel("VPN: Link Down",RED)
|
||||||
elif ret <= 3:
|
elif ret <= 3:
|
||||||
out_vpn = color_panel("VPN CONNECTED",GREEN)
|
out_vpn = color_panel("VPN: In Use",GREEN)
|
||||||
elif ret >= 4:
|
elif ret >= 4:
|
||||||
out_vpn = color_panel("multiple VPNs connected",YELLOW)
|
out_vpn = color_panel("multiple VPNs connected",YELLOW)
|
||||||
else:
|
else:
|
||||||
out_vpn = color_panel("WTF VPN STATUS BROKEN",RED)
|
out_vpn = color_panel("VPN: WTF alles kaputt",RED)
|
||||||
#print(out_vpn)
|
#print(out_vpn)
|
||||||
with open(vpn_path,'w+') as g:
|
with open(vpn_path,'w+') as g:
|
||||||
g.write(out_vpn)
|
g.write(out_vpn)
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
sys.exit()
|
|
||||||
|
if __name__ = '__main__':
|
||||||
|
while(True):
|
||||||
|
vpn_status()
|
||||||
|
pr_acct_status()
|
||||||
|
|||||||
1
i3lock/piclock.sh
Executable file
1
i3lock/piclock.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
i3lock -i ~/.config/i3lock/bg.png -t
|
||||||
Reference in New Issue
Block a user