diff options
author | vaxerski <[email protected]> | 2022-09-19 21:06:44 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-09-19 21:06:44 +0100 |
commit | e42de0b77807ab27666e82ec6f78bc286b9d0754 (patch) | |
tree | 02da43f97dab4a56c82cf8ecfff2f43d31abcdb1 /src/main.cpp | |
parent | ec6144e5da3e7a0efc7579c0e5948d13eb776407 (diff) | |
download | Hyprland-e42de0b77807ab27666e82ec6f78bc286b9d0754.tar.gz Hyprland-e42de0b77807ab27666e82ec6f78bc286b9d0754.zip |
export HYPRLAND_CMD for scripts
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4c61f380..a7e77a02 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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) { |