Parsing home directory from the operating system dynamically

This commit is contained in:
2025-06-11 09:55:00 +02:00
parent 256d27cf13
commit 1c3d34544e
4 changed files with 26 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
#ifndef MACROS_H
#define MACROS_H
#define HYPRLAND_CONF_DIR "/home/typo/.config/hypr/"
#define HYPRLAND_CONF_DIR ".config/hypr/"
#define FLOATING_RULE_CONF_FILE HYPRLAND_CONF_DIR "hyprland/floatbydefault.conf"
#define HYPRCTL_BINARY "/usr/bin/hyprctl"
@@ -10,7 +10,5 @@
#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

View File

@@ -6,6 +6,7 @@
class ShellService {
public:
static std::string exec(const std::string& command);
static std::string getHomePath();
};
#endif