mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
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…
x
Reference in New Issue
Block a user