Organized source tree
This commit is contained in:
46
include/Client.h
Normal file
46
include/Client.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef CLIENT_H
|
||||
#define CLIENT_H
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
struct WorkspaceSignature {
|
||||
public:
|
||||
int id;
|
||||
std::string name;
|
||||
|
||||
friend void from_json(const json& j, WorkspaceSignature& ws);
|
||||
};
|
||||
|
||||
class Client {
|
||||
public:
|
||||
std::string address;
|
||||
bool mapped;
|
||||
bool hidden;
|
||||
std::array<int, 2> size;
|
||||
WorkspaceSignature workspace;
|
||||
bool floating;
|
||||
bool pseudo;
|
||||
int monitor;
|
||||
std::string className;
|
||||
std::string title;
|
||||
std::string initialClass;
|
||||
std::string initialTitle;
|
||||
int pid;
|
||||
bool xwayland;
|
||||
bool pinned;
|
||||
int fullscreen;
|
||||
int fullscreenClient;
|
||||
std::string swallowing;
|
||||
int focusHistory;
|
||||
bool inhibitingIdle;
|
||||
std::string xdgTag;
|
||||
std::string xdgDescription;
|
||||
|
||||
friend void from_json(const json& j, Client& client);
|
||||
};
|
||||
|
||||
#endif
|
||||
16
include/HyprlandService.h
Normal file
16
include/HyprlandService.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef HYPRLAND_SERVICE_H
|
||||
#define HYPRLAND_SERVICE_H
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include "Workspace.h"
|
||||
#include "Client.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
class HyprlandService {
|
||||
public:
|
||||
static Workspace getCurrentWorkspace();
|
||||
static std::list<Client> getClients();
|
||||
static std::string exec(const std::string& command);
|
||||
};
|
||||
#endif
|
||||
23
include/Workspace.h
Normal file
23
include/Workspace.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef WORKSPACE_H
|
||||
#define WORKSPACE_H
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
class Workspace {
|
||||
public:
|
||||
int id;
|
||||
std::string name;
|
||||
std::string monitor;
|
||||
int monitorID;
|
||||
int windows;
|
||||
bool hasfullscreen;
|
||||
std::string lastwindow;
|
||||
std::string lastwindowtitle;
|
||||
bool ispersistent;
|
||||
|
||||
friend void from_json(const json& j, Workspace& workspace);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user