2016-06-15 03:32:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.hpp"
|
2023-05-15 12:12:20 +00:00
|
|
|
#include "utils/restack.hpp"
|
2016-06-15 03:32:35 +00:00
|
|
|
#include "utils/socket.hpp"
|
|
|
|
|
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 {
|
2023-10-08 18:36:33 +00:00
|
|
|
using connection_t = unique_ptr<socket_util::unix_connection>;
|
|
|
|
|
|
|
|
struct payload {
|
|
|
|
char data[BUFSIZ]{'\0'};
|
|
|
|
size_t len = 0;
|
|
|
|
};
|
2016-06-15 03:32:35 +00:00
|
|
|
|
2023-10-08 18:36:33 +00:00
|
|
|
using payload_t = unique_ptr<payload>;
|
2016-06-15 03:32:35 +00:00
|
|
|
|
2023-10-08 18:36:33 +00:00
|
|
|
restack_util::params get_restack_params(connection& conn);
|
2016-10-11 16:53:51 +00:00
|
|
|
|
2023-10-08 18:36:33 +00:00
|
|
|
string get_socket_path();
|
2016-10-11 16:53:51 +00:00
|
|
|
|
2023-10-08 18:36:33 +00:00
|
|
|
payload_t make_payload(const string& cmd);
|
|
|
|
connection_t make_connection();
|
|
|
|
connection_t make_subscriber();
|
|
|
|
} // namespace bspwm_util
|
2016-06-15 03:32:35 +00:00
|
|
|
|
2016-11-19 05:22:44 +00:00
|
|
|
POLYBAR_NS_END
|