Floating rules are now isolated between workspaces
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
#ifndef FILE_SERVICES_H
|
||||
#define FILE_SERVICES_H
|
||||
#ifndef FILE_SERVICE_H
|
||||
#define FILE_SERVICE_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class FileServices {
|
||||
class FileService {
|
||||
public:
|
||||
static bool doesNonEmptyFileExist(std::string);
|
||||
static void emptyFile(std::string);
|
||||
static void createOrOverwriteFile(std::string, std::string);
|
||||
static void appendToFile(std::string, std::string);
|
||||
static void deleteNthLine(std::string, int);
|
||||
static std::vector<std::string> readLines(std::string);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -4,13 +4,17 @@
|
||||
#include <list>
|
||||
#include "Workspace.h"
|
||||
#include "Client.h"
|
||||
#include "WindowRule.h"
|
||||
|
||||
class HyprlandService {
|
||||
public:
|
||||
static Workspace getCurrentWorkspace();
|
||||
static std::list<Client> getClients();
|
||||
static std::list<Client> getClientsOnActiveWorkspace();
|
||||
static std::list<WindowRule> getWindowRules();
|
||||
static std::optional<WindowRule> findConflictingRule(WindowRule);
|
||||
static void setFloatingRule(bool);
|
||||
static void removeRule(WindowRule);
|
||||
static void setClientFloating(Client&);
|
||||
static void setClientTiled(Client&);
|
||||
static void toggleClientFloating(Client&);
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
#define ECHO_PATH "/usr/bin/echo"
|
||||
#define CAT_PATH "/usr/bin/cat"
|
||||
|
||||
#define FLOATING_RULE "windowrule = float,class:.*"
|
||||
#define FLOATING_RULE "windowrule = float, onworkspace:"
|
||||
|
||||
#endif
|
||||
20
include/WindowRule.h
Normal file
20
include/WindowRule.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef WINDOW_RULE_H
|
||||
#define WINDOW_RULE_H
|
||||
|
||||
#include <string>
|
||||
|
||||
class WindowRule {
|
||||
public:
|
||||
//true -> tiling mode
|
||||
//false -> floating mode
|
||||
bool tile;
|
||||
|
||||
//Which workspace to apply to
|
||||
int workspaceID;
|
||||
|
||||
std::string toString();
|
||||
|
||||
static WindowRule parse(std::string);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user