From 033f0b01b7d7aefd8867320e569344de5713f57f Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 15 Aug 2020 10:36:15 +0200 Subject: [PATCH] Fix rfkill condition --- src/modules/network.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index 4e96cef..ab9b2e5 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -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";