Merge remote-tracking branch 'origin/master' into tray-gdbus

This commit is contained in:
topisani
2018-10-04 18:04:36 +02:00
21 changed files with 132 additions and 63 deletions

View File

@ -13,10 +13,12 @@ class Custom : public ALabel {
Custom(const std::string, const Json::Value&);
auto update() -> void;
private:
void worker();
void delayWorker();
void continuousWorker();
const std::string name_;
waybar::util::SleeperThread thread_;
waybar::util::command::res output_;
};
}

View File

@ -17,8 +17,8 @@ class Network : public ALabel {
~Network();
auto update() -> void;
private:
static uint64_t netlinkRequest(int, void*, uint32_t, uint32_t groups = 0);
static uint64_t netlinkResponse(int, void*, uint32_t, uint32_t groups = 0);
static int netlinkRequest(int, void*, uint32_t, uint32_t groups = 0);
static int netlinkResponse(int, void*, uint32_t, uint32_t groups = 0);
static int scanCb(struct nl_msg*, void*);
void disconnected();
@ -33,7 +33,7 @@ class Network : public ALabel {
int ifid_;
sa_family_t family_;
int sock_fd_;
struct sockaddr_nl nladdr_ = {0};
struct sockaddr_nl nladdr_ = {};
struct nl_sock* sk_ = nullptr;
int nl80211_id_;

View File

@ -1,6 +1,7 @@
#pragma once
#include <fmt/format.h>
#include <tuple>
#include "bar.hpp"
#include "client.hpp"
#include "util/chrono.hpp"
@ -16,7 +17,7 @@ class Window : public ALabel {
auto update() -> void;
private:
void worker();
std::string getFocusedNode(Json::Value nodes);
std::tuple<int, std::string> getFocusedNode(Json::Value nodes);
void getFocusedWindow();
Bar& bar_;
@ -24,6 +25,7 @@ class Window : public ALabel {
util::JsonParser parser_;
Ipc ipc_;
std::string window_;
int windowId_;
};
}

View File

@ -18,7 +18,7 @@ class Workspaces : public IModule {
private:
void worker();
void addWorkspace(Json::Value);
std::string getIcon(std::string);
std::string getIcon(std::string, Json::Value);
bool handleScroll(GdkEventScroll*);
int getPrevWorkspace();
int getNextWorkspace();