#pragma once #include #include "common.hpp" #include "x11/extensions/randr.hpp" POLYBAR_NS class connection; namespace i3_util { using connection_t = i3ipc::connection; using workspace_t = i3ipc::workspace_t; const auto ws_numsort = [](shared_ptr a, shared_ptr b) { return a->num < b->num; }; vector> workspaces(const connection_t& conn, const string& output = "", const bool show_urgent = false); shared_ptr focused_workspace(const connection_t&); vector root_windows(connection& conn, const string& output_name = ""); xcb_window_t get_restack_sibling(connection& conn); } namespace { inline bool operator==(i3_util::workspace_t& a, i3_util::workspace_t& b) { return a.num == b.num && a.output == b.output; } inline bool operator!=(i3_util::workspace_t& a, i3_util::workspace_t& b) { return !(a == b); } } POLYBAR_NS_END