Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
add override_env
Browse files Browse the repository at this point in the history
  • Loading branch information
galister committed Jun 4, 2023
1 parent 75afe2e commit 0a44734
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 4 additions & 0 deletions Resources/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions Types/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,6 @@ public static bool Load()
public bool FallbackCursors;

public Dictionary<string, string> ExportInputs;

public Dictionary<string, string>? OverrideEnv;
}

0 comments on commit 0a44734

Please sign in to comment.