fix: network module not displaying rfkill state
This commit is contained in:
@ -223,8 +223,8 @@ void waybar::modules::Network::worker() {
|
|||||||
std::lock_guard<std::mutex> lock(mutex_);
|
std::lock_guard<std::mutex> lock(mutex_);
|
||||||
if (ifid_ > 0) {
|
if (ifid_ > 0) {
|
||||||
getInfo();
|
getInfo();
|
||||||
dp.emit();
|
|
||||||
}
|
}
|
||||||
|
dp.emit();
|
||||||
}
|
}
|
||||||
thread_timer_.sleep_for(interval_);
|
thread_timer_.sleep_for(interval_);
|
||||||
};
|
};
|
||||||
@ -271,10 +271,10 @@ void waybar::modules::Network::worker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const std::string waybar::modules::Network::getNetworkState() const {
|
const std::string waybar::modules::Network::getNetworkState() const {
|
||||||
if (ifid_ == -1) {
|
|
||||||
#ifdef WANT_RFKILL
|
#ifdef WANT_RFKILL
|
||||||
if (rfkill_.getState()) return "disabled";
|
if (rfkill_.getState()) return "disabled";
|
||||||
#endif
|
#endif
|
||||||
|
if (ifid_ == -1) {
|
||||||
return "disconnected";
|
return "disconnected";
|
||||||
}
|
}
|
||||||
if (!carrier_) return "disconnected";
|
if (!carrier_) return "disconnected";
|
||||||
|
Reference in New Issue
Block a user