diff options
author | Aylur <[email protected]> | 2024-12-28 01:33:32 +0100 |
---|---|---|
committer | Aylur <[email protected]> | 2024-12-28 01:33:32 +0100 |
commit | ebcccc4ae13f690220374497f932f58ec5fd7cfd (patch) | |
tree | 50289a84174e5df734d789633b878f895ff5435b /examples/py | |
parent | 661b14cc893c5be17a4fce8fa269074785f57a36 (diff) |
fix: examples without wifi
Diffstat (limited to 'examples/py')
-rw-r--r-- | examples/py/simple-bar/widget/Bar.py | 5 |
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): |