aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/debug/HyprCtl.hpp
blob: 4816c63c8e2723eadafff6eae85012bb0585783c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include "../Compositor.hpp"
#include <fstream>
#include "../helpers/MiscFunctions.hpp"

namespace HyprCtl {
    void        startHyprCtlSocket();
    std::string makeDynamicCall(const std::string& input);

    // very simple thread-safe request method
    inline bool             requestMade  = false;
    inline bool             requestReady = false;
    inline std::string      request      = "";

    inline std::ifstream    requestStream;

    inline wl_event_source* hyprCtlTickSource = nullptr;

    inline int              iSocketFD = -1;

    enum eHyprCtlOutputFormat
    {
        FORMAT_NORMAL = 0,
        FORMAT_JSON
    };
};