summaryrefslogtreecommitdiff
path: root/examples/py/simple-bar
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-12-28 01:33:32 +0100
committerAylur <[email protected]>2024-12-28 01:33:32 +0100
commitebcccc4ae13f690220374497f932f58ec5fd7cfd (patch)
tree50289a84174e5df734d789633b878f895ff5435b /examples/py/simple-bar
parent661b14cc893c5be17a4fce8fa269074785f57a36 (diff)
fix: examples without wifi
Diffstat (limited to 'examples/py/simple-bar')
-rw-r--r--examples/py/simple-bar/widget/Bar.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/py/simple-bar/widget/Bar.py b/examples/py/simple-bar/widget/Bar.py
index c6902b4..c2fa9e0 100644
--- a/examples/py/simple-bar/widget/Bar.py
+++ b/examples/py/simple-bar/widget/Bar.py
@@ -147,8 +147,9 @@ class Wifi(Astal.Icon):
super().__init__()
Astal.widget_set_class_names(self, ["Wifi"])
wifi = Network.get_default().get_wifi()
- wifi.bind_property("ssid", self, "tooltip-text", SYNC)
- wifi.bind_property("icon-name", self, "icon", SYNC)
+ if wifi:
+ wifi.bind_property("ssid", self, "tooltip-text", SYNC)
+ wifi.bind_property("icon-name", self, "icon", SYNC)
class AudioSlider(Gtk.Box):