mirror of
https://github.com/FAUSheppy/config
synced 2025-12-06 07:01:36 +01:00
Merge branch 'master' of gitlab.cs.fau.de:ik15ydit/config
This commit is contained in:
@@ -35,7 +35,7 @@ if [[ "$HOST" == "atlantislaptop" ]]; then
|
||||
hc keybind XF86MonBrightnessUp spawn /bin/bash -c 'tee /sys/class/backlight/intel_backlight/brightness <<< "$(expr $(cat /sys/class/backlight/intel_backlight/brightness) + 5)"'
|
||||
hc keybind XF86MonBrightnessDown spawn /bin/bash -c 'tee /sys/class/backlight/intel_backlight/brightness <<< "$(expr $(cat /sys/class/backlight/intel_backlight/brightness) - 5)"'
|
||||
#/usr/bin/dunst &
|
||||
hc keybind $Mod-o spawn /bin/bash -c "/home/ik15ydit/.config/i3lock/piclock.sh && sudo s2disk"
|
||||
hc keybind $Mod-Shift-o spawn /bin/bash -c "sudo s2ram"
|
||||
fi
|
||||
|
||||
### Atlantis general
|
||||
@@ -77,8 +77,8 @@ hc keybind $Mod-p spawn pavucontrol
|
||||
hc keybind $Mod-Shift-l spawn libreoffice
|
||||
hc keybind $Mod-t spawn /bin/bash -c "LC_ALL=en_DK.utf8 && export LC_ALL && thunderbird"
|
||||
hc keybind $Mod-Shift-i spawn urxvt -e ssh ik15ydit@ircbox.cs.fau.de -t 'tmux a -d'
|
||||
hc keybind $Mod-Shift-j spawn urxvt -e ssh sheppy@atlantishq.de -t 'tmux a -d'
|
||||
hc keybind $Mod-Shift-t spawn urxvt -e ssh telegram-sheppy@atlantishq.de -i ~/.ssh/telegram -t "/home/telegram-sheppy/tg/bin/telegram-cli"
|
||||
hc keybind $Mod-j spawn /bin/bash -c "rm $HOME/.config/herbstluftwm/irc.log && herbstclient spawn urxvt -e 'exit'"
|
||||
hc keybind $Mod-e spawn rofi -combi-mode window,run -show combi -modi combi
|
||||
hc keybind $Mod-Shift-e spawn rofi -show run
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import hl_utils
|
||||
from hl_constants import *
|
||||
import string
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
def guthaben():
|
||||
guthaben = ''
|
||||
@@ -63,5 +64,15 @@ def logins():
|
||||
except:
|
||||
return ""
|
||||
|
||||
def countdown():
|
||||
delta = datetime(year=2018,month=7,day=22,hour=20) - datetime.now()
|
||||
if delta.days > 1:
|
||||
tmp = "{} von 180 Tagen bis Abgabe verbleibend".format(delta.days)
|
||||
else:
|
||||
tmp = "{}h bis BC Abgabe".format(delta.hours)
|
||||
tmp = hl_utils.color_panel(tmp,YELLOW)
|
||||
return tmp
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(logins(),ip(),vpn(),guthaben(),battery(),date(),sep='',end='')
|
||||
print(countdown(),logins(),ip(),vpn(),guthaben(),battery(),date(),sep='',end='')
|
||||
|
||||
@@ -64,7 +64,7 @@ def pw():
|
||||
|
||||
def cip_logins(ignore=""):
|
||||
MAX_LOGINS=5
|
||||
cmd="wget -q -O- --user cip --password "+pw()+" 'https://atlantishq.de/cipactive/active_logins'"
|
||||
cmd="wget -q -O- --user cip --password "+pw()+" 'https://atlantishq.de:/cipactive/active_logins'"
|
||||
try:
|
||||
l=hl_utils.shexec(cmd).split("\n")
|
||||
except:
|
||||
@@ -172,7 +172,7 @@ def pr_acct_status():
|
||||
def vpn_status():
|
||||
if not hl_utils.is_cip():
|
||||
out_vpn = hl_utils.shexec("ip r g 8.8.8.8").split("\n")[0]
|
||||
if "dev tun0" in out_vpn:
|
||||
if "dev cip_tun" in out_vpn:
|
||||
out_vpn = hl_utils.color_panel("VPN: In Use",GREEN)
|
||||
else:
|
||||
out_vpn = hl_utils.color_panel("VPN: Link Down",RED)
|
||||
@@ -188,7 +188,7 @@ last_ip="LOL"
|
||||
def ip_status():
|
||||
global last_ip
|
||||
try:
|
||||
ip="Public IP: "+ hl_utils.shexec("wget -4 --timeout=3 -O- --quiet https://atlantishq.de/ipcheck")
|
||||
ip="Public IP: "+ hl_utils.shexec("wget -4 --no-proxy --timeout=3 -O- --quiet https://atlantishq.de:8002/ipcheck")
|
||||
if last_ip == ip:
|
||||
return
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user