From 19d6bc29cc7fd650e1656b5a6e3f2b66f17fd3b2 Mon Sep 17 00:00:00 2001 From: Arne Schauf Date: Fri, 5 Feb 2016 21:25:35 +0100 Subject: [PATCH] show v6 in statusbar --- qtile_config.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qtile_config.py b/qtile_config.py index f6be391..ea04614 100644 --- a/qtile_config.py +++ b/qtile_config.py @@ -125,6 +125,15 @@ def getIp(): r = requests.get("http://ipv4.nsupdate.info/myip") return r.text + +def getIpv6(): + import requests + try: + r = requests.get("http://ipv6.nsupdate.info/myip") + return r.text + except: + return 'No IPv6' + screens = [ Screen( top=bar.Bar( @@ -142,6 +151,8 @@ screens = [ [ widget.WindowName(), widget.Notify(), + widget.GenPollText(func=getIpv6), + widget.Sep(), widget.GenPollText(func=getIp), widget.Sep(), widget.ThermalSensor(tag_sensor='Core 0'),