polybar/include/utils/bspwm.hpp

37 lines
785 B
C++
Raw Normal View History

2016-06-15 03:32:35 +00:00
#pragma once
#include <xcb/xcb.h>
#include <xcb/xcb_icccm.h>
2016-06-15 03:32:35 +00:00
#include "common.hpp"
#include "config.hpp"
#include "utils/socket.hpp"
#include "utils/string.hpp"
2016-11-02 19:22:45 +00:00
#include "x11/connection.hpp"
#include "x11/randr.hpp"
#include "x11/window.hpp"
2016-06-15 03:32:35 +00:00
LEMONBUDDY_NS
namespace bspwm_util {
struct payload;
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);
bool restack_above_root(connection& conn, const monitor_t& mon, const xcb_window_t win);
2016-11-02 19:22:45 +00:00
string get_socket_path();
2016-11-02 19:22:45 +00:00
payload_t make_payload(string cmd);
connection_t make_connection();
connection_t make_subscriber();
2016-06-15 03:32:35 +00:00
}
LEMONBUDDY_NS_END