mirror of
https://github.com/FAUSheppy/config
synced 2025-12-06 23:21:34 +01:00
fsad
This commit is contained in:
@@ -51,7 +51,7 @@ hc spawn ~/.config/herbstluftwm/hl_status_deamon.py
|
|||||||
|
|
||||||
# keybindings
|
# keybindings
|
||||||
#client handling
|
#client handling
|
||||||
hc keybind $Mod-Shift-q spawn /bin/bash -c "pkill hl_status_deamo & pkill ssh-agent & herbstclient quit"
|
hc keybind $Mod-Shift-q spawn /bin/bash -c "pkill hl_status_deamo & pkill ssh-agent & ~/.config/other/notify_logout.sh &herbstclient quit"
|
||||||
if [[ $HOST =~ atlantis* ]]; then
|
if [[ $HOST =~ atlantis* ]]; then
|
||||||
hc keybind $Mod-Shift-p spawn sudo /sbin/poweroff
|
hc keybind $Mod-Shift-p spawn sudo /sbin/poweroff
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -16,17 +16,19 @@ bat_prev = -1
|
|||||||
|
|
||||||
def sigusr1_handler(signum, frame):
|
def sigusr1_handler(signum, frame):
|
||||||
save()
|
save()
|
||||||
|
|
||||||
|
def pw():
|
||||||
|
pw="NOPE"
|
||||||
|
try:
|
||||||
|
with open(hl_utils.hlpath("password.cip",False)) as f:
|
||||||
|
return f.read().strip("\n")
|
||||||
|
except:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
|
||||||
def cip_logins():
|
def cip_logins():
|
||||||
MAX_LOGINS=5
|
MAX_LOGINS=5
|
||||||
pw="NOPE"
|
cmd="wget -q -O- --user cip --password "+pw()+" 'https://atlantishq.de/cipactive/active_logins'"
|
||||||
try:
|
|
||||||
with open(hl_utils.hlpath("password.cip",False)) as f:
|
|
||||||
pw=f.read().strip("\n")
|
|
||||||
except:
|
|
||||||
return ""
|
|
||||||
cmd="wget -q -O- --user cip --password "+pw+" 'https://atlantishq.de/cipactive/active_logins'"
|
|
||||||
try:
|
try:
|
||||||
l=hl_utils.shexec(cmd).split("\n")
|
l=hl_utils.shexec(cmd).split("\n")
|
||||||
except:
|
except:
|
||||||
@@ -177,9 +179,9 @@ def save():
|
|||||||
trace_login()
|
trace_login()
|
||||||
|
|
||||||
def trace_login():
|
def trace_login():
|
||||||
if hl_utils.is_cip():
|
if hl_utils.is_cip() or True:
|
||||||
try:
|
try:
|
||||||
tmp = hl_utils.shexec("wget --timeout=3 -O- --quiet 'https://atlantishq.de/ciplog/"+socket.gethostname()+"&active&"+str(datetime.now())+"'")
|
tmp = hl_utils.shexec("wget --timeout=3 -O- --user cip --password "+pw()+"--quiet 'https://atlantishq.de/ciplog/"+socket.gethostname()+"&active&"+str(datetime.now())+"'")
|
||||||
except:
|
except:
|
||||||
tmp = "Service Unreachable"
|
tmp = "Service Unreachable"
|
||||||
with open(hl_utils.hlpath("cip_logins.log"),'w') as f:
|
with open(hl_utils.hlpath("cip_logins.log"),'w') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user