aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/debug/HyprCtl.hpp
blob: 0dd4f7410084385cd40bb28b73e8a40c834c3726 (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
#pragma once

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

namespace HyprCtl {
    void            startHyprCtlSocket();

    // 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
    };
};