Fix rfkill condition

This commit is contained in:
Alex 2020-08-15 10:36:15 +02:00 committed by GitHub
parent 591eb2ea38
commit 033f0b01b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -195,13 +195,13 @@ void waybar::modules::Network::worker() {
}
const std::string waybar::modules::Network::getNetworkState() const {
#ifdef WANT_RFKILL
if (ifid_ == -1) {
#ifdef WANT_RFKILL
if (rfkill_.getState())
return "disabled";
#endif
return "disconnected";
}
#endif
if (ipaddr_.empty()) return "linked";
if (essid_.empty()) return "ethernet";
return "wifi";