pull/2372/head
Absobel 2023-08-02 01:19:19 +09:00
parent e74a791a37
commit 5e57dd4713
1 changed files with 4 additions and 4 deletions

View File

@ -130,13 +130,13 @@ waybar::modules::Network::Network(const std::string &id, const Json::Value &conf
} }
} }
createEventSocket();
createInfoSocket();
if (!ping_servers_.empty()) { if (!ping_servers_.empty()) {
startPingCheckThread(); startPingCheckThread();
} }
createEventSocket();
createInfoSocket();
dp.emit(); dp.emit();
// Ask for a dump of interfaces and then addresses to populate our // Ask for a dump of interfaces and then addresses to populate our
// information. First the interface dump, and once done, the callback // information. First the interface dump, and once done, the callback
@ -299,7 +299,7 @@ const std::string waybar::modules::Network::getNetworkState() const {
if (!carrier_) return "disconnected"; if (!carrier_) return "disconnected";
if (ipaddr_.empty()) return "linked"; if (ipaddr_.empty()) return "linked";
if (essid_.empty() && has_internet_access_) return "ethernet"; if (essid_.empty() && has_internet_access_) return "ethernet";
else if (essid_.empty() && !has_internet_access_) return "ethernet-no-internet"; if (essid_.empty() && !has_internet_access_) return "ethernet-no-internet";
if (!has_internet_access_) return "wifi-no-internet"; if (!has_internet_access_) return "wifi-no-internet";
return "wifi"; return "wifi";
} }