mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Handle screens disconnection (#29)
This commit is contained in:
@ -16,6 +16,7 @@ namespace fs = std::filesystem;
|
||||
class Battery : public ALabel {
|
||||
public:
|
||||
Battery(Json::Value);
|
||||
~Battery();
|
||||
auto update() -> void;
|
||||
private:
|
||||
std::string getIcon(uint16_t percentage);
|
||||
@ -24,6 +25,7 @@ class Battery : public ALabel {
|
||||
|
||||
util::SleeperThread thread_;
|
||||
std::vector<fs::path> batteries_;
|
||||
int fd_;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ namespace waybar::modules {
|
||||
class Network : public ALabel {
|
||||
public:
|
||||
Network(Json::Value);
|
||||
~Network();
|
||||
auto update() -> void;
|
||||
private:
|
||||
static uint64_t netlinkRequest(int, void*, uint32_t, uint32_t groups = 0);
|
||||
|
@ -10,6 +10,7 @@ namespace waybar::modules {
|
||||
class Pulseaudio : public ALabel {
|
||||
public:
|
||||
Pulseaudio(Json::Value);
|
||||
~Pulseaudio();
|
||||
auto update() -> void;
|
||||
private:
|
||||
static void subscribeCb(pa_context*, pa_subscription_event_type_t,
|
||||
|
@ -12,6 +12,7 @@ namespace waybar::modules::sway {
|
||||
class Window : public ALabel {
|
||||
public:
|
||||
Window(waybar::Bar&, Json::Value);
|
||||
~Window();
|
||||
auto update() -> void;
|
||||
private:
|
||||
std::string getFocusedNode(Json::Value nodes);
|
||||
|
@ -12,6 +12,7 @@ namespace waybar::modules::sway {
|
||||
class Workspaces : public IModule {
|
||||
public:
|
||||
Workspaces(waybar::Bar&, Json::Value);
|
||||
~Workspaces();
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget &();
|
||||
private:
|
||||
|
Reference in New Issue
Block a user