mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
parent
d50f0eda6c
commit
03cd362f49
1 changed files with 2 additions and 1 deletions
|
@ -25,9 +25,10 @@ void CIPCSocket::initialize() {
|
||||||
sockaddr_un SERVERADDRESS = {.sun_family = AF_UNIX};
|
sockaddr_un SERVERADDRESS = {.sun_family = AF_UNIX};
|
||||||
|
|
||||||
const auto HISenv = getenv("HYPRLAND_INSTANCE_SIGNATURE");
|
const auto HISenv = getenv("HYPRLAND_INSTANCE_SIGNATURE");
|
||||||
|
const auto RUNTIMEdir = getenv("XDG_RUNTIME_DIR");
|
||||||
const std::string USERID = std::to_string(getpwuid(getuid())->pw_uid);
|
const std::string USERID = std::to_string(getpwuid(getuid())->pw_uid);
|
||||||
|
|
||||||
const auto USERDIR = "/run/user/" + USERID + "/hypr/";
|
const auto USERDIR = RUNTIMEdir ? RUNTIMEdir + std::string{"/hypr/"} : "/run/user/" + USERID + "/hypr/";
|
||||||
|
|
||||||
std::string socketPath = HISenv ? USERDIR + std::string(HISenv) + "/.hyprpaper.sock" : USERDIR + ".hyprpaper.sock";
|
std::string socketPath = HISenv ? USERDIR + std::string(HISenv) + "/.hyprpaper.sock" : USERDIR + ".hyprpaper.sock";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue