feat: network show iface from ip if it's different than selected
This commit is contained in:
1 parent
0182c30c4b
commit
78b02ef026
1 file changed
+7
-1
@@ -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 = []
|
||||
|
||||
Reference in new issue
Block a user