Outsourced macros

This commit is contained in:
2025-06-10 16:44:44 +02:00
parent d1a2ef710f
commit 0300b5d61d
2 changed files with 16 additions and 7 deletions

View File

@@ -1,13 +1,6 @@
#ifndef HYPRLAND_SERVICE_H
#define HYPRLAND_SERVICE_H
#define HYPRLAND_CONF_DIR "~/.config/hypr/"
#define FLOATING_RULE_CONF_FILE HYPRLAND_CONF_DIR "hyprland/floatbydefault.conf"
#define HYPRCTL_BINARY "/usr/bin/hyprctl"
#define NULL_PATH "/dev/null"
#define SET_FLOATING_RULE "/usr/bin/echo 'windowrule = float,class:.*' > " FLOATING_RULE_CONF_FILE
#define REMOVE_FLOATING_RULE "/usr/bin/cat " NULL_PATH " > " FLOATING_RULE_CONF_FILE
#include <list>
#include <string>
#include "Workspace.h"

16
include/Macros.h Normal file
View File

@@ -0,0 +1,16 @@
#ifndef MACROS_H
#define MACROS_H
#define HYPRLAND_CONF_DIR "/home/typo/.config/hypr/"
#define FLOATING_RULE_CONF_FILE HYPRLAND_CONF_DIR "hyprland/floatbydefault.conf"
#define HYPRCTL_BINARY "/usr/bin/hyprctl"
#define NULL_PATH "/dev/null"
#define ECHO_PATH "/usr/bin/echo"
#define CAT_PATH "/usr/bin/cat"
#define FLOATING_RULE "windowrule = float,class:.*"
#define SET_FLOATING_RULE ECHO_PATH " 'windowrule = float,class:.*' > " FLOATING_RULE_CONF_FILE
#define REMOVE_FLOATING_RULE CAT_PATH " " NULL_PATH " > " FLOATING_RULE_CONF_FILE
#endif