Fix rfkill condition
This commit is contained in:
parent
591eb2ea38
commit
033f0b01b7
|
@ -195,13 +195,13 @@ void waybar::modules::Network::worker() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string waybar::modules::Network::getNetworkState() const {
|
const std::string waybar::modules::Network::getNetworkState() const {
|
||||||
#ifdef WANT_RFKILL
|
|
||||||
if (ifid_ == -1) {
|
if (ifid_ == -1) {
|
||||||
|
#ifdef WANT_RFKILL
|
||||||
if (rfkill_.getState())
|
if (rfkill_.getState())
|
||||||
return "disabled";
|
return "disabled";
|
||||||
|
#endif
|
||||||
return "disconnected";
|
return "disconnected";
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (ipaddr_.empty()) return "linked";
|
if (ipaddr_.empty()) return "linked";
|
||||||
if (essid_.empty()) return "ethernet";
|
if (essid_.empty()) return "ethernet";
|
||||||
return "wifi";
|
return "wifi";
|
||||||
|
|
Loading…
Reference in New Issue