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