export HYPRLAND_CMD for scripts

This commit is contained in:
Vaxry 2022-09-19 21:06:44 +01:00
parent ec6144e5da
commit e42de0b778

View file

@ -14,6 +14,12 @@ int main(int argc, char** argv) {
if (!getenv("XDG_RUNTIME_DIR"))
throw std::runtime_error("XDG_RUNTIME_DIR is not set!");
// export HYPRLAND_CMD
std::string cmd = "";
for (auto i = 0; i < argc; ++i)
cmd += std::string(i == 0 ? "" : " ") + argv[i];
setenv("HYPRLAND_CMD", cmd.c_str(), 1);
// parse some args
std::string configPath;
for (int i = 1; i < argc; ++i) {