1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-10-27 05:23:39 -04:00
polybar/include/utils/bspwm.hpp
2016-11-19 06:26:07 +01:00

36 lines
779 B
C++

#pragma once
#include <xcb/xcb.h>
#include <xcb/xcb_icccm.h>
#include "common.hpp"
#include "config.hpp"
#include "utils/socket.hpp"
#include "utils/string.hpp"
#include "x11/connection.hpp"
#include "x11/randr.hpp"
#include "x11/window.hpp"
POLYBAR_NS
namespace bspwm_util {
struct payload;
using connection_t = unique_ptr<socket_util::unix_connection>;
using payload_t = unique_ptr<payload>;
struct payload {
char data[BUFSIZ]{'\0'};
size_t len = 0;
};
vector<xcb_window_t> root_windows(connection& conn);
bool restack_above_root(connection& conn, const monitor_t& mon, const xcb_window_t win);
string get_socket_path();
payload_t make_payload(string cmd);
connection_t make_connection();
connection_t make_subscriber();
}
POLYBAR_NS_END