mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 00:09:49 +01:00
export HYPRLAND_CMD for scripts
This commit is contained in:
parent
ec6144e5da
commit
e42de0b778
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue