show external IP in infobar
This commit is contained in:
1 parent
17c23fbac8
commit
0a283817f0
1 file changed
+7
@@ -110,6 +110,12 @@ widget_defaults = dict(
|
|||||||
padding=3,
|
padding=3,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def getIp():
|
||||||
|
import requests
|
||||||
|
r = requests.get("http://ipv4.nsupdate.info/myip")
|
||||||
|
return r.text
|
||||||
|
|
||||||
screens = [
|
screens = [
|
||||||
Screen(
|
Screen(
|
||||||
top=bar.Bar(
|
top=bar.Bar(
|
||||||
@@ -126,6 +132,7 @@ screens = [
|
|||||||
[
|
[
|
||||||
widget.WindowName(),
|
widget.WindowName(),
|
||||||
widget.Notify(),
|
widget.Notify(),
|
||||||
|
widget.GenPollText(func=getIp),
|
||||||
widget.Sep(),
|
widget.Sep(),
|
||||||
widget.ThermalSensor(tag_sensor='Core 0'),
|
widget.ThermalSensor(tag_sensor='Core 0'),
|
||||||
widget.ThermalSensor(tag_sensor='temp1'),
|
widget.ThermalSensor(tag_sensor='temp1'),
|
||||||
|
|||||||
Reference in new issue
Block a user