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

Commit

Permalink
add option to not auto-start with steamvr
Browse files Browse the repository at this point in the history
  • Loading branch information
galister committed Apr 6, 2023
1 parent eeca0da commit bebd9ad
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Core/ManifestInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ public static void EnsureInstalled()
Console.WriteLine($"Manifest installed to {ManifestPath}");

}

public static void EnsureUninstalled()
{
if (OpenVR.Applications.IsApplicationInstalled(AppKey))
{
Console.WriteLine("Removing SteamVR manifest...");
OpenVR.Applications.RemoveApplicationManifest(ManifestPath);
}
}

private static string GetExecutablePath()
{
Expand Down
5 changes: 4 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ void SignalHandler(PosixSignalContext context)
PosixSignalRegistration.Create(PosixSignal.SIGHUP, SignalHandler);
PosixSignalRegistration.Create(PosixSignal.SIGTERM, SignalHandler);

ManifestInstaller.EnsureInstalled();
if (Config.Instance.NoAutoStart)
ManifestInstaller.EnsureUninstalled();
else
ManifestInstaller.EnsureInstalled();

if (!Config.Instance.FallbackCursors)
manager.RegisterChild(new DesktopCursor());
Expand Down
4 changes: 4 additions & 0 deletions Resources/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ fallback_cursors: false
# pw-fallback: cpu capture through pipewire. try this if you have issues with the other methods.
wayland_capture: auto

# do not install the manifest into steamvr for auto-start
# this will also uninstall any previously installed manifest
no_auto_start: false

## enable to swap red and blue channels
wayland_color_swap: false

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

public bool NoAutoStart;

public string WaylandCapture;
public bool WaylandColorSwap;

Expand Down

0 comments on commit bebd9ad

Please sign in to comment.