feat: network show iface from ip if it's different than selected

This commit is contained in:
Alfredo Monclus committed 2026-03-08 12:13:51 -03:00
1 parent 0182c30c4b
commit 78b02ef026
1 file changed
+7 -1
+7 -1
View File
@@ -173,7 +173,13 @@ class SdbusNm:
return "?"
active_connection = ActiveConnection(active_connection_path)
ip_info = IPv4Config(active_connection.ip4_config)
return ip_info.address_data[0]["address"][1]
ip = ip_info.address_data[0]["address"][1]
dev_obj = NetworkDeviceGeneric(active_connection.devices[0])
iface_name = dev_obj.interface
if iface_name == self.wlan_device.interface:
return ip
return f"{ip} ({iface_name})"
def get_networks(self):
networks = []