2016-06-14 23:32:35 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <xcb/xcb.h>
|
2016-10-11 12:53:51 -04:00
|
|
|
#include <xcb/xcb_icccm.h>
|
2016-06-14 23:32:35 -04:00
|
|
|
|
|
|
|
#include "common.hpp"
|
|
|
|
#include "config.hpp"
|
|
|
|
#include "utils/socket.hpp"
|
|
|
|
#include "utils/string.hpp"
|
2016-11-02 15:22:45 -04:00
|
|
|
#include "x11/randr.hpp"
|
|
|
|
#include "x11/window.hpp"
|
2016-06-14 23:32:35 -04:00
|
|
|
|
2016-11-19 00:22:44 -05:00
|
|
|
POLYBAR_NS
|
2016-06-14 23:32:35 -04:00
|
|
|
|
2016-11-26 00:13:20 -05:00
|
|
|
class connection;
|
|
|
|
|
2016-06-14 23:32:35 -04:00
|
|
|
namespace bspwm_util {
|
|
|
|
struct payload;
|
2016-10-11 03:23:26 -04:00
|
|
|
using connection_t = unique_ptr<socket_util::unix_connection>;
|
2016-06-14 23:32:35 -04:00
|
|
|
using payload_t = unique_ptr<payload>;
|
|
|
|
|
|
|
|
struct payload {
|
|
|
|
char data[BUFSIZ]{'\0'};
|
|
|
|
size_t len = 0;
|
|
|
|
};
|
|
|
|
|
2016-11-02 15:22:45 -04:00
|
|
|
vector<xcb_window_t> root_windows(connection& conn);
|
|
|
|
bool restack_above_root(connection& conn, const monitor_t& mon, const xcb_window_t win);
|
2016-10-11 12:53:51 -04:00
|
|
|
|
2016-11-02 15:22:45 -04:00
|
|
|
string get_socket_path();
|
2016-10-11 12:53:51 -04:00
|
|
|
|
2016-11-25 07:55:15 -05:00
|
|
|
payload_t make_payload(const string& cmd);
|
2016-11-02 15:22:45 -04:00
|
|
|
connection_t make_connection();
|
|
|
|
connection_t make_subscriber();
|
2016-06-14 23:32:35 -04:00
|
|
|
}
|
|
|
|
|
2016-11-19 00:22:44 -05:00
|
|
|
POLYBAR_NS_END
|