changes requested
parent
9abe1e2790
commit
dd7d78cd60
|
@ -9,12 +9,11 @@ class Rfkill {
|
||||||
Rfkill(enum rfkill_type rfkill_type);
|
Rfkill(enum rfkill_type rfkill_type);
|
||||||
~Rfkill() = default;
|
~Rfkill() = default;
|
||||||
void waitForEvent();
|
void waitForEvent();
|
||||||
int getState() const;
|
bool getState() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum rfkill_type rfkill_type_;
|
enum rfkill_type rfkill_type_;
|
||||||
int state_ = 0;
|
int state_ = 0;
|
||||||
int prev_state_ = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace waybar::util
|
} // namespace waybar::util
|
||||||
|
|
|
@ -15,7 +15,7 @@ Addressed by *bluetooth*
|
||||||
*interval*: ++
|
*interval*: ++
|
||||||
typeof: integer ++
|
typeof: integer ++
|
||||||
default: 60 ++
|
default: 60 ++
|
||||||
The interval in which the network information gets polled (e.g. signal strength).
|
The interval in which the bluetooth state gets updated.
|
||||||
|
|
||||||
*format*: ++
|
*format*: ++
|
||||||
typeof: string ++
|
typeof: string ++
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include <sys/eventfd.h>
|
#include <sys/eventfd.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <linux/rfkill.h>
|
|
||||||
#include "util/format.hpp"
|
#include "util/format.hpp"
|
||||||
#include "util/rfkill.hpp"
|
#include "util/rfkill.hpp"
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,6 @@ void waybar::util::Rfkill::waitForEvent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int waybar::util::Rfkill::getState() const {
|
bool waybar::util::Rfkill::getState() const {
|
||||||
return state_;
|
return state_;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue