From 0a44734311fa681225e4a7842e016eb32f6b15bd Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Mon, 5 Jun 2023 01:14:44 +0200 Subject: [PATCH] add override_env --- Program.cs | 4 ++++ Resources/config.yaml | 4 ++++ Types/Config.cs | 2 ++ 3 files changed, 10 insertions(+) diff --git a/Program.cs b/Program.cs index 917a672..47501a7 100644 --- a/Program.cs +++ b/Program.cs @@ -18,6 +18,10 @@ if (!Config.Load()) return; +if (Config.Instance.OverrideEnv != null) + foreach (var pair in Config.Instance.OverrideEnv) + Environment.SetEnvironmentVariable(pair.Key, pair.Value); + Session.Initialize(); var manager = OverlayManager.Initialize(); diff --git a/Resources/config.yaml b/Resources/config.yaml index 5f397e1..9d629e0 100644 --- a/Resources/config.yaml +++ b/Resources/config.yaml @@ -8,6 +8,10 @@ # - Index of the screen, in order of occurrence ("0": first screen) default_screen: 0 +## Override arbitrary env variables +# override_env: +# WAYLAND_DISPLAY: wayland-1 + # enable if you cannot see lasers for some reason fallback_cursors: false diff --git a/Types/Config.cs b/Types/Config.cs index cb72b2d..057139e 100644 --- a/Types/Config.cs +++ b/Types/Config.cs @@ -110,4 +110,6 @@ public static bool Load() public bool FallbackCursors; public Dictionary ExportInputs; + + public Dictionary? OverrideEnv; }