mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 07:01:57 -07:00
export HYPRLAND_CMD for scripts
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user