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