mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-10 07:45:59 +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"))
|
if (!getenv("XDG_RUNTIME_DIR"))
|
||||||
throw std::runtime_error("XDG_RUNTIME_DIR is not set!");
|
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
|
// parse some args
|
||||||
std::string configPath;
|
std::string configPath;
|
||||||
for (int i = 1; i < argc; ++i) {
|
for (int i = 1; i < argc; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue