diff --git a/herbstluftwm/hl_status_deamon.py b/herbstluftwm/hl_status_deamon.py index 9bda1ef..0ed653a 100755 --- a/herbstluftwm/hl_status_deamon.py +++ b/herbstluftwm/hl_status_deamon.py @@ -146,21 +146,11 @@ def pr_acct_status(): def vpn_status(): if not hl_utils.is_cip(): - out_vpn = hl_utils.shexec("ps -ef").split("\n") - - ret = 0 - for l in out_vpn: - if 'openvpn' in l and not 'sudo' in l and not 'grep' in l and not 'cip.sh' in l: - ret += 1; - if ret == 0: - out_vpn = hl_utils.color_panel("VPN: Link Down",RED) - elif ret == 1: + out_vpn = hl_utils.shexec("ip r g 8.8.8.8").split("\n")[0] + if "dev tun0" in out_vpn: out_vpn = hl_utils.color_panel("VPN: In Use",GREEN) - elif ret > 1: - out_vpn = hl_utils.color_panel("multiple VPNs connected",YELLOW) else: - out_vpn = hl_utils.color_panel("VPN: STATUS UNKOWN ??",RED) - + out_vpn = hl_utils.color_panel("VPN: Link Down",RED) with open(hl_utils.hlpath(VPN_LOG),'w+') as g: g.write(out_vpn) @@ -181,7 +171,11 @@ def ip_status(): tmp = hl_utils.color_panel(ip,GREEN) except: last_ip = "" - tmp = hl_utils.color_panel("Offline",RED) + try: + hl_utils.shexec("wget --timeout=2 -O- --quiet https://wwwcip.cs.fau.de/") + tmp = hl_utils.color_panel("AtlantisHQ Unreachable",RED) + except: + tmp = hl_utils.color_panel("No Internet Connection",RED) with open(hl_utils.hlpath(IP_LOG),'w') as g: g.write(tmp) diff --git a/i3lock/bg.png b/i3lock/bg.png index dc72d84..66ed52b 100644 Binary files a/i3lock/bg.png and b/i3lock/bg.png differ diff --git a/libcoloredstderr.so b/libcoloredstderr.so index 6cb9f8e..2181ac8 100755 Binary files a/libcoloredstderr.so and b/libcoloredstderr.so differ