everything
This commit is contained in:
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
flake-profile-1-link
|
||||||
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
/nix/store/xx9iiifsq1l2l6rf90i8nx6c03srwhkf-nix-shell-env
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
node_modules
|
||||||
|
|
||||||
|
# Output
|
||||||
|
.output
|
||||||
|
.vercel
|
||||||
|
.netlify
|
||||||
|
.wrangler
|
||||||
|
/.svelte-kit
|
||||||
|
/build
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Env
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
!.env.test
|
||||||
|
|
||||||
|
# Vite
|
||||||
|
vite.config.js.timestamp-*
|
||||||
|
vite.config.ts.timestamp-*
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Package Managers
|
||||||
|
package-lock.json
|
||||||
|
pnpm-lock.yaml
|
||||||
|
yarn.lock
|
||||||
|
bun.lock
|
||||||
|
bun.lockb
|
||||||
|
|
||||||
|
# Miscellaneous
|
||||||
|
/static/
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"recommendations": ["svelte.svelte-vscode", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
# AGENTS.md
|
||||||
|
|
||||||
|
## What this is
|
||||||
|
|
||||||
|
SvelteKit 5 (runes mode) static site that assembles Steam launch commands from
|
||||||
|
composable "program classes" (gamescope, MangoHud, Proton, obs-gamecapture,
|
||||||
|
gamemode). User flips toggles in a tabbed UI; the app renders one flat launch
|
||||||
|
command string like:
|
||||||
|
|
||||||
|
```
|
||||||
|
gamescope -f -- %command% mangohud waitforexecandrun %command%
|
||||||
|
```
|
||||||
|
|
||||||
|
Rendered by adapter-static (`prerender = true` in `src/routes/+page.ts`).
|
||||||
|
|
||||||
|
## Core model (`src/lib/`)
|
||||||
|
|
||||||
|
- `meow.ts` — the engine. `ArgEvaluatable` interface (`enabled()`, `envs()`,
|
||||||
|
`binary()`, `prefix()`, `suffix()`, `priority()`, `arguments()`); `ArgEval`
|
||||||
|
evaluates components: filter `enabled()`, sort by `priority()` (lowest =
|
||||||
|
outermost wrapper), envs as `VAR=VAL` space-joined, each program rendered
|
||||||
|
`prefix binary args suffix` (empty parts dropped), args sorted by `prio` and
|
||||||
|
rendered `arg val` (bare `arg` when val empty), then `%command%` appended.
|
||||||
|
- `programs.ts` — data types + `Program` class implementing `ArgEvaluatable`
|
||||||
|
from a `ProgramConfig`. Key fields: `enabled`, `name`, `binary`, `prefix`,
|
||||||
|
`suffix`, `priority`, `envs`, `args`, `options` (toggleable sub-flags),
|
||||||
|
`envSeparators` (per-var merge separators), option `conflicts` (see below).
|
||||||
|
- `presets.ts` — re-export index only; real factories live per-program in
|
||||||
|
`src/lib/preset/` (see file map).
|
||||||
|
- `preset/helpers.ts` — builders shared by presets: `envToggle(label, env,
|
||||||
|
val, category?)`, `group(program, labels)` (pairwise conflict keys).
|
||||||
|
(Mutually-exclusive flag choices like `-F` filter use ONE option with an
|
||||||
|
`args[].values` dropdown — do NOT reintroduce one-option-per-value.)
|
||||||
|
|
||||||
|
### Semantics to keep in mind
|
||||||
|
|
||||||
|
- Env vars with the same name merge into ONE var: values dedupe, joined by the
|
||||||
|
var's separator from `envSeparators` (default `,`).
|
||||||
|
- `conflicts` keys are `'programname'` (program-level) or
|
||||||
|
`'program:Option label'` (option-level). Only enabled vs enabled conflict;
|
||||||
|
conflicts are displayed as a non-blocking warning banner.
|
||||||
|
- Env merge destructuring: `var` is a reserved word in TS — use
|
||||||
|
`[varName, vals]` in destructures.
|
||||||
|
- Args are space-separated (`-W 1920`), never `arg=val`.
|
||||||
|
|
||||||
|
## File map
|
||||||
|
|
||||||
|
| file | role |
|
||||||
|
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `src/lib/meow.ts` | evaluation engine (see above) |
|
||||||
|
| `src/lib/programs.ts` | types + `Program` adapter + `findConflicts()` |
|
||||||
|
| `src/lib/presets.ts` | re-exports the eight preset factories |
|
||||||
|
| `src/lib/preset/helpers.ts` | shared option builders |
|
||||||
|
| `src/lib/preset/gamescope.ts` | gamescope args (fullscreen, filter/scale dropdowns, HDR, VR, …) |
|
||||||
|
| `src/lib/preset/proton-ge.ts` | GloriousEggroll Proton env toggles |
|
||||||
|
| `src/lib/preset/proton-cachyos.ts` | CachyOS Proton env toggles (largest set) |
|
||||||
|
| `src/lib/preset/obs.ts` | obs-gamecapture CLI |
|
||||||
|
| `src/lib/preset/gamemode.ts` | `gamemoderun` wrapper (priority 5 = outermost) |
|
||||||
|
| `src/lib/preset/mangohud.ts` | MANGOHUD env options + `MANGOHUD_CONFIG` separator merge |
|
||||||
|
| `src/lib/preset/mesa.ts` | Mesa Vulkan layers env toggles (anti-lag, overlay layer, fps-monitor) |
|
||||||
|
| `src/lib/preset/prime.ts` | `prime-run` wrapper for NVIDIA PRIME offload |
|
||||||
|
| `src/lib/ProgramForm.svelte` | per-program editor: enabled checkbox, options list, Advanced `<details>` (name/binary/prefix/suffix/priority, env vars, args, env separators) |
|
||||||
|
| `src/lib/decode.ts` | `applyCommand(cmd, programs)` — enable options/programs a pasted command references (only ever enables, never disables) |
|
||||||
|
| `src/routes/+page.svelte` | tabs + `pre.result` command preview + conflict banner; localStorage persistence; decode textarea |
|
||||||
|
| `launch_args_env_vars.md` | reference: gamescope args, Proton env-var tables, OBS, gamemode |
|
||||||
|
| `steam-tinker-launcher.md` | reference: STL v14 docs (gamescope CLI catalog §3.1–3.6, mangohud, proton, dxvk, wine) |
|
||||||
|
|
||||||
|
## Conventions
|
||||||
|
|
||||||
|
- New programs are preset factory functions in `src/lib/preset/<name>.ts`
|
||||||
|
returning a `ProgramConfig`, re-exported from `presets.ts`, imported into
|
||||||
|
`+page.svelte`'s `programs` array.
|
||||||
|
- Every option carries a `category: string`; ProgramForm groups options under
|
||||||
|
category headings (keep categories consistent within a preset).
|
||||||
|
- Every option should also carry a `desc: string`; it appears as a hover
|
||||||
|
tooltip (1 s delay, CSS-only) next to the option row.
|
||||||
|
- Default new presets to `enabled: false` so the default output stays stable.
|
||||||
|
- Preset files ≤ ~140 lines; split if they grow (that's why the directory
|
||||||
|
exists). Shared builders go in `helpers.ts`.
|
||||||
|
- `+page.svelte` uses PURE TAB indentation — never build edit oldText with
|
||||||
|
spaces.
|
||||||
|
- Mutual exclusivity is expressed via `conflicts` (options) or `group()`
|
||||||
|
(helpers), never via extra app state.
|
||||||
|
- `user-select: none` on tabs/labels to stop double-click selection; inputs and
|
||||||
|
`pre.result` stay selectable.
|
||||||
|
|
||||||
|
## Adding options & programs (agent playbook)
|
||||||
|
|
||||||
|
Every task in this repo ends with the verification loop below; a change is not
|
||||||
|
done until all three pass.
|
||||||
|
|
||||||
|
### Add an option to an existing program
|
||||||
|
|
||||||
|
1. Edit `src/lib/preset/<name>.ts` — the program's factory, inside
|
||||||
|
`options: [...]`. Mine the flag/env catalogs from `launch_args_env_vars.md`
|
||||||
|
and `steam-tinker-launcher.md`.
|
||||||
|
2. Pick the builder (from `./helpers`):
|
||||||
|
|
||||||
|
- Env toggle (checkbox sets `VAR=1`):
|
||||||
|
`envToggle('Label', 'ENV_VAR', '1', 'Category')` — pass a custom value as
|
||||||
|
the 3rd arg for non-`1` values.
|
||||||
|
- Flag with a value (gets an editable input in the UI while enabled):
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{ label: 'Mouse sensitivity', enabled: false, args: [{ arg: '-s', val: '1.0', prio: 0 }], category: 'Window' }
|
||||||
|
```
|
||||||
|
|
||||||
|
- Flag with a fixed value set (gets a `<select>` dropdown instead of a
|
||||||
|
text input): add `values: ['auto', 'drm', 'wayland']` to the arg.
|
||||||
|
- Flag whose value must match a regex (input turns red + banner error
|
||||||
|
while invalid): add `pattern: NUM` or `pattern: NUM_DEC` (exported from
|
||||||
|
`./helpers`) or a custom regex source string.
|
||||||
|
|
||||||
|
- Bare flag: same shape with `val: ''` (checkbox only, no input).
|
||||||
|
- Mutually exclusive flag with a fixed value set (e.g. `-F fsr` vs
|
||||||
|
`-F nis`): ONE option with `values` on the arg:
|
||||||
|
`{ label: 'Filter', enabled: false, args: [{ arg: '-F', val: 'fsr', prio: 0, values: ['none', 'linear', 'fsr', 'nis'] }], category: 'Filter' }`.
|
||||||
|
Do NOT create one option per value.
|
||||||
|
|
||||||
|
3. `category` is required — reuse an existing one from that preset or add a new
|
||||||
|
one (it becomes a tab). Keep categories consistent within a preset.
|
||||||
|
4. Mutual exclusivity: `conflicts: ['other-program']` or
|
||||||
|
`conflicts: ['same-program:Other option label']`; `group()` generates
|
||||||
|
these automatically.
|
||||||
|
5. Presets only supply defaults — the form binds arg `val` to an input while
|
||||||
|
the option is enabled, so users can override values.
|
||||||
|
|
||||||
|
### Add a new program
|
||||||
|
|
||||||
|
1. Create `src/lib/preset/<name>.ts` exporting
|
||||||
|
`export function <name>(): ProgramConfig` (model on
|
||||||
|
`src/lib/preset/obs.ts` — the smallest real example).
|
||||||
|
2. Required config: `name`, `enabled` (default `false` so output stays stable),
|
||||||
|
`binary`, `prefix` (wrapper like `'gamemoderun'`), `suffix`
|
||||||
|
(`'waitforexecandrun'` for proton, `'--'` for gamescope-style), `priority`,
|
||||||
|
`envs: []`, `args: []`, `options: [...]`.
|
||||||
|
3. Re-export: add `export { <name> } from './preset/<name>';` to
|
||||||
|
`src/lib/presets.ts`.
|
||||||
|
4. Import it in `src/routes/+page.svelte` and append to the
|
||||||
|
`programs = $state([...])` array.
|
||||||
|
5. Keep the file ≤ ~140 lines; use `envToggle()`/`group()` for builders and
|
||||||
|
repetitive options.
|
||||||
|
|
||||||
|
Priority semantics: components sort ascending by `priority()` — the outermost
|
||||||
|
wrapper has the LOWEST number (gamemoderun=5, gamescope=10, proton=20,
|
||||||
|
mangohud=30).
|
||||||
|
|
||||||
|
## Verification (mandatory before yielding)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm exec prettier --write <edited files> # lint runs prettier --check
|
||||||
|
pnpm check # svelte-check — authoritative type check
|
||||||
|
pnpm lint # prettier --check + eslint
|
||||||
|
pnpm build # adapter-static build
|
||||||
|
```
|
||||||
|
|
||||||
|
All four must pass. `pnpm check` is the authority — see the known quirk below.
|
||||||
|
|
||||||
|
Known traps for agents:
|
||||||
|
|
||||||
|
- **pi-lens/LSP diagnostics on `.svelte` files are stale all session** — they
|
||||||
|
falsely report `enabled` / `category` / `envSeparators` as missing from
|
||||||
|
`ProgramConfig` on every edit. They are noise: the fields verifiably exist in
|
||||||
|
`programs.ts`. Do NOT chase them; rely on `pnpm check` (returns 0 errors
|
||||||
|
every time). The `.ts` files' diagnostics are accurate.
|
||||||
|
- `+page.svelte` uses pure tabs — edit `oldText` must use tabs, not spaces. If
|
||||||
|
the edit tool reports content-drift, re-read the file verbatim before
|
||||||
|
retrying.
|
||||||
|
- This file (AGENTS.md) is auto-reformatted by prettier/markdownlint after
|
||||||
|
edits — always re-read it before further edits; it also uses real em-dashes
|
||||||
|
(`—`).
|
||||||
|
- `var` is a reserved word in TS destructuring — use `[varName, vals]`.
|
||||||
|
- A stale `vite dev` server can serve corrupted modules (missing exports).
|
||||||
|
Fix: kill all `vite` processes and restart — never `pkill -f` with a pattern
|
||||||
|
that also appears in your own command line (it kills your shell).
|
||||||
|
- Do not add options the docs mark as per-user paths or STL-internal settings
|
||||||
|
(Vortex/MO2/winetricks/Conty…); README.md is sv boilerplate, ignore it.
|
||||||
|
|
||||||
|
Reference docs to mine for new options: `launch_args_env_vars.md` and
|
||||||
|
`steam-tinker-launcher.md` (README.md is sv boilerplate, ignore it).
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# sv
|
||||||
|
|
||||||
|
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
|
||||||
|
|
||||||
|
## Creating a project
|
||||||
|
|
||||||
|
If you're seeing this, you've probably already done this step. Congrats!
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# create a new project
|
||||||
|
npx sv create my-app
|
||||||
|
```
|
||||||
|
|
||||||
|
To recreate this project with the same configuration:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# recreate this project
|
||||||
|
pnpm dlx sv@0.16.6 create --template minimal --types ts --add sveltekit-adapter="adapter:static" eslint prettier --install pnpm steam_linux_launch_args
|
||||||
|
```
|
||||||
|
|
||||||
|
## Developing
|
||||||
|
|
||||||
|
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# or start the server and open the app in a new browser tab
|
||||||
|
npm run dev -- --open
|
||||||
|
```
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
To create a production version of your app:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
You can preview the production build with `npm run preview`.
|
||||||
|
|
||||||
|
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import prettier from 'eslint-config-prettier';
|
||||||
|
import path from 'node:path';
|
||||||
|
import js from '@eslint/js';
|
||||||
|
import svelte from 'eslint-plugin-svelte';
|
||||||
|
import { defineConfig, includeIgnoreFile } from 'eslint/config';
|
||||||
|
import globals from 'globals';
|
||||||
|
import ts from 'typescript-eslint';
|
||||||
|
|
||||||
|
const gitignorePath = path.resolve(import.meta.dirname, '.gitignore');
|
||||||
|
|
||||||
|
export default defineConfig(
|
||||||
|
includeIgnoreFile(gitignorePath),
|
||||||
|
js.configs.recommended,
|
||||||
|
ts.configs.recommended,
|
||||||
|
svelte.configs.recommended,
|
||||||
|
prettier,
|
||||||
|
svelte.configs.prettier,
|
||||||
|
{
|
||||||
|
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
||||||
|
rules: {
|
||||||
|
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
|
||||||
|
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
|
||||||
|
'no-undef': 'off'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
projectService: true,
|
||||||
|
extraFileExtensions: ['.svelte'],
|
||||||
|
parser: ts.parser
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Override or add rule settings here, such as:
|
||||||
|
// 'svelte/button-has-type': 'error'
|
||||||
|
rules: {}
|
||||||
|
}
|
||||||
|
);
|
||||||
Generated
+77
@@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"crane": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1784564969,
|
||||||
|
"narHash": "sha256-TkTWNhJV/8Wk3czlbz4bwHZkFCaCHPsOy+oJe4PUiXg=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "7930f6c291de6f83c257839d434592aa085f290a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1784872115,
|
||||||
|
"narHash": "sha256-THPEF2po0fsoH8gNtp+Ae0XFDJH3N/ol7xO3v6VMTJU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "335f0738cb2fa9708f3f428e39d2eae975d1338d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"crane": "crane",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
description = "Build a cargo project without extra checks";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
crane.url = "github:ipetkov/crane";
|
||||||
|
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
crane,
|
||||||
|
flake-utils,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
stripDockerImage = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "strip-docker-image";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "mvanholsteijn";
|
||||||
|
repo = "strip-docker-image";
|
||||||
|
rev = "2bec01f2718e741a1b7fceb39ba3c1a21613e402";
|
||||||
|
hash = "sha256-ZwInCPPtDxCV2nghI70eftFrOmDYIbxTNw3k/fdtbjQ=";
|
||||||
|
};
|
||||||
|
installPhase = ''
|
||||||
|
install -Dm755 bin/strip-docker-image $out/bin/strip-docker-image
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = pkgs.mkShellNoCC {
|
||||||
|
|
||||||
|
VITE_API_URL = "http://0.0.0.0:3000";
|
||||||
|
VITE_PROD_API_URL = "https://stream.h.doloro.co.uk";
|
||||||
|
ADMIN_REF_CODE = "meowmeowpurrrmeow";
|
||||||
|
|
||||||
|
# Additional dev-shell environment variables can be set directly
|
||||||
|
# MY_CUSTOM_DEVELOPMENT_VAR = "something else";
|
||||||
|
|
||||||
|
# Extra inputs can be added here; cargo and rustc are provided by default.
|
||||||
|
packages = [
|
||||||
|
pkgs.nodejs
|
||||||
|
pkgs.pnpm
|
||||||
|
pkgs.just
|
||||||
|
stripDockerImage
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,278 @@
|
|||||||
|
# Launch Args & Env Vars Reference
|
||||||
|
|
||||||
|
## Gamescope
|
||||||
|
|
||||||
|
**Launch:** `gamescope [options] -- %command%`
|
||||||
|
|
||||||
|
| Arg | Description |
|
||||||
|
| ------------------------------- | -------------------------- |
|
||||||
|
| `-W <width>` | Output window width |
|
||||||
|
| `-H <height>` | Output window height |
|
||||||
|
| `-w <width>` | Game viewport width |
|
||||||
|
| `-h <height>` | Game viewport height |
|
||||||
|
| `-S integer` | Integer scaling |
|
||||||
|
| `-S stretch` | Stretch to fill window |
|
||||||
|
| `-b` | Borderless window |
|
||||||
|
| `-f` | Fullscreen window |
|
||||||
|
| `-r <fps>` | Frame rate limit |
|
||||||
|
| `-o <fps>` | Frame rate limit unfocused |
|
||||||
|
| `-F fsr` | FSR upscaling |
|
||||||
|
| `-F nis` | NVIDIA Image Scaling |
|
||||||
|
| `--reshade-effect <path>` | Reshade effect |
|
||||||
|
| `--reshade-technique-idx <idx>` | Reshade technique index |
|
||||||
|
|
||||||
|
**Env vars:** none (passes through to child)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Proton (Valve Official)
|
||||||
|
|
||||||
|
**Launch:**
|
||||||
|
|
||||||
|
```
|
||||||
|
STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.local/share/Steam" \
|
||||||
|
STEAM_COMPAT_DATA_PATH="$HOME/.steam/steam/steamapps/compatdata/$APPID" \
|
||||||
|
~/.steam/steam/steamapps/common/Proton\ $VERSION/proton \
|
||||||
|
waitforexitandrun %command%
|
||||||
|
```
|
||||||
|
|
||||||
|
**Core env vars (set by Steam):**
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
| ---------------------------------- | --------------------------------- |
|
||||||
|
| `STEAM_COMPAT_CLIENT_INSTALL_PATH` | Steam install path |
|
||||||
|
| `STEAM_COMPAT_DATA_PATH` | Game compatdata path |
|
||||||
|
| `STEAM_COMPAT_APP_ID` | Game AppID |
|
||||||
|
| `STEAM_COMPAT_INSTALL_PATH` | Game install path |
|
||||||
|
| `STEAM_COMPAT_TOOL_PATHS` | Colon-separated Proton tool paths |
|
||||||
|
| `STEAM_COMPAT_USER_CONFIG_PATH` | Per-game config override path |
|
||||||
|
| `STEAM_RUNTIME` | `1` to enable Steam Runtime |
|
||||||
|
| `STEAM_RUNTIME_DIR` | Steam Runtime path |
|
||||||
|
| `STEAM_RUNTIME_LIBRARY_PATH` | Steam Runtime library path |
|
||||||
|
| `WINEPREFIX` | Wine prefix path |
|
||||||
|
| `WINEARCH` | Wine arch (`win64` or `win32`) |
|
||||||
|
| `WINEDEBUG` | Wine debug string |
|
||||||
|
| `DISPLAY` | Display server (`:0`) |
|
||||||
|
| `XDG_SESSION_TYPE` | `x11` or `wayland` |
|
||||||
|
|
||||||
|
**Proton launch option env vars:**
|
||||||
|
|
||||||
|
| Compat config string | Env var | Description |
|
||||||
|
| -------------------- | ---------------------------------- | --------------------------------------- |
|
||||||
|
| | `PROTON_LOG` | Debug log to `$HOME/steam-$APPID.log` |
|
||||||
|
| | `PROTON_WAIT_ATTACH` | Wait for debugger |
|
||||||
|
| | `PROTON_CRASH_REPORT_DIR` | Crash log dir |
|
||||||
|
| `wined3d` | `PROTON_USE_WINED3D` | OpenGL wined3d for d3d11/d3d10 |
|
||||||
|
| `nod3d12` | `PROTON_NO_D3D12` | Disable DX12 |
|
||||||
|
| `nod3d11` | `PROTON_NO_D3D11` | Disable DX11 |
|
||||||
|
| `nod3d10` | `PROTON_NO_D3D10` | Disable DX10 |
|
||||||
|
| `nod3d9` | `PROTON_NO_D3D9` | Disable DX9 |
|
||||||
|
| `noesync` | `PROTON_NO_ESYNC` | Disable eventfd sync |
|
||||||
|
| `nofsync` | `PROTON_NO_FSYNC` | Disable futex sync |
|
||||||
|
| `nontsync` | `PROTON_NO_NTSYNC` | Disable ntsync module |
|
||||||
|
| `forcelgadd` | `PROTON_FORCE_LARGE_ADDRESS_AWARE` | Force LARGE_ADDRESS_AWARE |
|
||||||
|
| `heapdelayfree` | `PROTON_HEAP_DELAY_FREE` | Delay memory freeing |
|
||||||
|
| `enablenvapi` | `PROTON_ENABLE_NVAPI` | Enable NVIDIA NVAPI |
|
||||||
|
| `seccomp` | `PROTON_USE_SECCOMP` | Enable seccomp-bpf |
|
||||||
|
| `nowritewatch` | `PROTON_NO_WRITE_WATCH` | Disable write watches |
|
||||||
|
| `oldglstr` | `PROTON_OLD_GL_STRING` | Limit GL extension string |
|
||||||
|
| `xalia` | `PROTON_USE_XALIA` | Enable Xalia |
|
||||||
|
| `noxalia` | `PROTON_USE_XALIA=0` | Disable Xalia |
|
||||||
|
| `cmdlineappend:` | _(none)_ | Append as game command arg (repeatable) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Proton-GE
|
||||||
|
|
||||||
|
**Launch:** Same as Valve Proton, binary in `~/.steam/steam/compatibilitytools.d/GE-Proton-X.X/`
|
||||||
|
|
||||||
|
**Proton launch option env vars:**
|
||||||
|
|
||||||
|
| Compat config string | Env var | Description |
|
||||||
|
| -------------------- | ----------------------------------------------- | --------------------------------------------------- |
|
||||||
|
| | `PROTON_LOG` | Debug log |
|
||||||
|
| | `PROTON_DUMP_DEBUG_COMMANDS` | Debug scripts to `$PROTON_DEBUG_DIR/proton_$USER/` |
|
||||||
|
| | `PROTON_DEBUG_DIR` | Debug script root (default: `/tmp`) |
|
||||||
|
| `wined3d` | `PROTON_USE_WINED3D` | OpenGL wined3d for d3d11/d3d10 |
|
||||||
|
| `nod3d12` | `PROTON_NO_D3D12` | Disable DX12 |
|
||||||
|
| `nod3d11` | `PROTON_NO_D3D11` | Disable DX11 |
|
||||||
|
| `nod3d10` | `PROTON_NO_D3D10` | Disable DX10 |
|
||||||
|
| `nod3d9` | `PROTON_NO_D3D9` | Disable DX9 |
|
||||||
|
| `noesync` | `PROTON_NO_ESYNC` | Disable eventfd sync |
|
||||||
|
| `nofsync` | `PROTON_NO_FSYNC` | Disable futex sync |
|
||||||
|
| `nontsync` | `PROTON_NO_NTSYNC` | Disable ntsync module |
|
||||||
|
| `forcelgadd` | `PROTON_FORCE_LARGE_ADDRESS_AWARE` | Force LARGE_ADDRESS_AWARE |
|
||||||
|
| `heapdelayfree` | `PROTON_HEAP_DELAY_FREE` | Delay memory freeing |
|
||||||
|
| | `HOST_LC_ALL` | Override system locale |
|
||||||
|
| `enablenvapi` | `PROTON_ENABLE_NVAPI` | Enable NVIDIA NVAPI |
|
||||||
|
| `oldglstr` | `PROTON_OLD_GL_STRING` | Limit GL extension string |
|
||||||
|
| `cmdlineappend:` | _(none)_ | Append as game command arg |
|
||||||
|
| `xalia` | `PROTON_USE_XALIA` | Enable Xalia |
|
||||||
|
| `noxalia` | `PROTON_USE_XALIA=0` | Disable Xalia |
|
||||||
|
| `seccomp` | `PROTON_USE_SECCOMP` | Enable seccomp-bpf |
|
||||||
|
| `nowritewatch` | `PROTON_NO_WRITE_WATCH` | Disable write watches |
|
||||||
|
| | `WINE_FULLSCREEN_FSR` | Enable FSR (Vulkan only) |
|
||||||
|
| | `WINE_FULLSCREEN_FSR_STRENGTH` | FSR sharpening (0-5, default 2) |
|
||||||
|
| | `WINE_FULLSCREEN_FSR_CUSTOM_MODE` | Fake resolution `WIDTHxHEIGHT` |
|
||||||
|
| | `WINE_DO_NOT_CREATE_DXGI_DEVICE_MANAGER` | Fix miscolored video |
|
||||||
|
| | `COPYPREFIX` | Copy prefix/shader cache if `-steamdeck` |
|
||||||
|
| `fsr4` | `PROTON_FSR4_UPGRADE` | Auto-download FSR 4 DLL |
|
||||||
|
| `fsr4hud` | `PROTON_FSR4_INDICATOR` | FSR4 watermark |
|
||||||
|
| `fsr4rdna3` | `PROTON_FSR4_RDNA3_UPGRADE` | FSR4 for RDNA3 GPUs |
|
||||||
|
| `fsr3` | `PROTON_FSR3_UPGRADE` | Auto-download FSR 3 DLL |
|
||||||
|
| `dlss` | `PROTON_DLSS_UPGRADE` | Auto-download DLSS DLLs |
|
||||||
|
| `dlsshud` | `PROTON_DLSS_INDICATOR` | DLSS overlay |
|
||||||
|
| `xess` | `PROTON_XESS_UPGRADE` | Auto-download XESS |
|
||||||
|
| `sdlinput` | `PROTON_USE_SDL` or `PROTON_PREFER_SDL` | SDL input instead of HIDRAW/Steam Input |
|
||||||
|
| `wayland` | `PROTON_USE_WAYLAND` or `PROTON_ENABLE_WAYLAND` | Enable Wayland driver |
|
||||||
|
| `wow64` | `PROTON_USE_WOW64` | Enable WoW64 |
|
||||||
|
| | `WAYLANDDRV_PRIMARY_MONITOR` | Primary monitor (e.g. `eDP-1`) |
|
||||||
|
| | `PROTON_ENABLE_MEDIACONV` | Enable winegstreamer media converter |
|
||||||
|
| | `WAYLANDDRV_RAWINPUT` | Raw input sensitivity (0=off, positive=sensitivity) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Proton-CachyOS
|
||||||
|
|
||||||
|
**Launch:** Same as Valve Proton, binary in CachyOS tool directory
|
||||||
|
|
||||||
|
**Proton launch option env vars:**
|
||||||
|
|
||||||
|
| Compat config string | Env var | Description |
|
||||||
|
| -------------------- | ---------------------------------------- | ------------------------------------------------------------------- |
|
||||||
|
| | `PROTON_LOG` | Debug log (use `"+mfplat,+quartz,+wmvcore,+wmadec,+dmo"` for media) |
|
||||||
|
| | `PROTON_LOG_DIR` | Output log dir (default: `$HOME`) |
|
||||||
|
| | `PROTON_WAIT_ATTACH` | Wait for debugger |
|
||||||
|
| | `PROTON_CRASH_REPORT_DIR` | Crash log dir |
|
||||||
|
| `wined3d` | `PROTON_USE_WINED3D` | OpenGL wined3d for d3d11/d3d10/d3d9 |
|
||||||
|
| `nod3d11` | `PROTON_NO_D3D11` | Disable DX11 |
|
||||||
|
| `nod3d10` | `PROTON_NO_D3D10` | Disable DX10/DXGI |
|
||||||
|
| `dxvkd3d8` | `PROTON_DXVK_D3D8` | Use DXVK d3d8.dll |
|
||||||
|
| `nofsync` | `PROTON_NO_FSYNC` | Disable futex sync |
|
||||||
|
| | `HOST_LC_ALL` | Override system locale |
|
||||||
|
| `disablenvapi` | `PROTON_DISABLE_NVAPI` | Disable NVIDIA NVAPI |
|
||||||
|
| `nativevulkanloader` | _(none)_ | Use game's Vulkan loader (breaks VR) |
|
||||||
|
| `forcelgadd` | `PROTON_FORCE_LARGE_ADDRESS_AWARE` | Force LARGE_ADDRESS_AWARE |
|
||||||
|
| `heapdelayfree` | `PROTON_HEAP_DELAY_FREE` | Delay memory freeing |
|
||||||
|
| `gamedrive` | `PROTON_SET_GAME_DRIVE` | Create S: drive to Steam library |
|
||||||
|
| `noforcelgadd` | _(none)_ | Disable forcelgadd |
|
||||||
|
| `oldglstr` | `PROTON_OLD_GL_STRING` | Limit GL extension string |
|
||||||
|
| `vkd3dfl12` | _(none)_ | Force D3D12 feature level 12 |
|
||||||
|
| `vkd3dbindlesstb` | _(none)_ | Force bindless texel buffer |
|
||||||
|
| `nomfdxgiman` | `WINE_DO_NOT_CREATE_DXGI_DEVICE_MANAGER` | IMFDXGIDeviceManager workaround |
|
||||||
|
| `noopwr` | `WINE_DISABLE_VULKAN_OPWR` | Disable Vulkan OPWR (Wayland) |
|
||||||
|
| `hidenvgpu` | `PROTON_HIDE_NVIDIA_GPU` | Hide NVIDIA GPUs as AMD |
|
||||||
|
| | `WINE_FULLSCREEN_INTEGER_SCALING` | Integer scaling |
|
||||||
|
| | `WINE_USE_KWIN_HACKS` | KDE windowing hacks |
|
||||||
|
| `cmdlineappend:` | _(none)_ | Append as game command arg |
|
||||||
|
| `xalia` | `PROTON_USE_XALIA` | Enable Xalia |
|
||||||
|
| `fnad3d11` | `FNA3D_FORCE_DRIVER=D3D11` | Force FNA D3D11 |
|
||||||
|
| `seccomp` | `PROTON_USE_SECCOMP` | Enable seccomp-bpf |
|
||||||
|
| `d9vk` | `PROTON_USE_D9VK` | Use D9VK for d3d9 (obsolete Proton 5.0+) |
|
||||||
|
|
||||||
|
**Proton-CachyOS config env vars:**
|
||||||
|
|
||||||
|
| Compat config string | Env var | Description |
|
||||||
|
| -------------------- | --------------------------------------- | ------------------------------------------------- |
|
||||||
|
| | `PROTON_DXVK_SAREK` | Use dxvk-sarek for older GPUs |
|
||||||
|
| | `PROTON_DXVK_LOWLATENCY` | Enable dxvk-low-latency fork |
|
||||||
|
| | `PROTON_D7VK_DDRAW` | Use D7VK for DX7-or-lower |
|
||||||
|
| `fsr4` | `PROTON_FSR4_UPGRADE` | Auto-download FSR 4 DLL |
|
||||||
|
| `fsr4hud` | `PROTON_FSR4_INDICATOR` | FSR4 watermark |
|
||||||
|
| `mlfg` | `PROTON_MLFG_UPGRADE` | Enable MLFG with FSR4 >= 4.0.3 |
|
||||||
|
| `dlss` | `PROTON_DLSS_UPGRADE` | Auto-download DLSS DLLs |
|
||||||
|
| `dlsshud` | `PROTON_DLSS_INDICATOR` | DLSS overlay |
|
||||||
|
| `xess` | `PROTON_XESS_UPGRADE` | Auto-download XESS |
|
||||||
|
| `ffx3` | `PROTON_FFX3_UPGRADE` | Auto-download FFX III |
|
||||||
|
| `ffx4` | `PROTON_FFX4_UPGRADE` | Auto-download FFX IV |
|
||||||
|
| `nvidialibs` | `PROTON_NVIDIA_LIBS` | Enable nvidia-libs (nvcuda, nvenc, nvml, nvoptix) |
|
||||||
|
| `nvidialibsno32` | `PROTON_NVIDIA_LIBS_NO_32BIT` | 64-bit nvidia libs only |
|
||||||
|
| `nvcuda` | `PROTON_NVIDIA_NVCUDA` | Enable nvcuda.dll only |
|
||||||
|
| `nvenc` | `PROTON_NVIDIA_NVENC` | Enable nvencodeapi.dll only |
|
||||||
|
| `nvml` | `PROTON_NVIDIA_NVML` | Enable nvml.dll only |
|
||||||
|
| `nvoptix` | `PROTON_NVIDIA_NVOPTIX` | Enable nvoptix.dll only |
|
||||||
|
| `nowmdecoration` | `PROTON_NO_WM_DECORATION` | Disable WM window decorations |
|
||||||
|
| `wayland` | `PROTON_ENABLE_WAYLAND` | Enable Wayland (experimental winewayland) |
|
||||||
|
| `wayland` | `PROTON_USE_WAYLAND` | Alias of `PROTON_ENABLE_WAYLAND` |
|
||||||
|
| `pipewire` | `PROTON_USE_PIPEWIRE` | Enable winepipewire audio driver |
|
||||||
|
| | `DXVK_HDR` | Enable HDR (Nvidia < 595.x) |
|
||||||
|
| | `DXVK_NO_HDR` | Force disable HDR |
|
||||||
|
| `sdlinput` | `PROTON_PREFER_SDL` or `PROTON_USE_SDL` | Use SDL input |
|
||||||
|
| | `PROTON_NO_STEAMINPUT` | Disable Steam Input |
|
||||||
|
| `localshadercache` | `PROTON_LOCAL_SHADER_CACHE` | Per-game shader cache |
|
||||||
|
| | `PROTON_ENABLE_MEDIACONV` | Enable media converter (debug) |
|
||||||
|
| | `PROTON_MEDIA_FORCE_GST` | Fix video/audio playback |
|
||||||
|
| | `PROTON_GST_VIDEO_ORIENTATION` | Video orientation (gstreamer videoflip) |
|
||||||
|
| `vkreflex` | `DXVK_NVAPI_VKREFLEX` | Enable Vulkan Reflex via DXVK-NVAPI |
|
||||||
|
| `lowlatencylayer` | `LOW_LATENCY_LAYER` | Enable low_latency_layer |
|
||||||
|
| | `PROTON_USE_OPTISCALER` | Auto-inject OptiScaler |
|
||||||
|
| | `PROTON_DISCORD_BRIDGE` | Enable rpc-bridge for Discord Rich Presence |
|
||||||
|
|
||||||
|
**Other useful env vars:**
|
||||||
|
|
||||||
|
| Env var | Description |
|
||||||
|
| ------------------- | --------------------------------------------------------------------------- |
|
||||||
|
| `WINE_BLOCK_HOSTS` | Hosts Wine won't connect to (comma/semicolon, max 16 hosts, 256 chars each) |
|
||||||
|
| `WINEALSA_CHANNELS` | WineALSA speaker channels (2, 4, 6, 8) |
|
||||||
|
| `WINEALSA_SPATIAL` | Spatial audio downmix (`1`/`0`) |
|
||||||
|
| `WINE_AUDIO_DRIVER` | Audio drivers (default: `pipewire,pulse,alsa`) |
|
||||||
|
| `GST_GL_WINDOW` | GStreamer GL window mode |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## OBS Game Capture (obs-gamecapture)
|
||||||
|
|
||||||
|
**Launch:** `obs-gamecapture [options] -- %command%`
|
||||||
|
|
||||||
|
| Arg | Description |
|
||||||
|
| --------------- | --------------------- |
|
||||||
|
| `--width <w>` | Capture width |
|
||||||
|
| `--height <h>` | Capture height |
|
||||||
|
| `--rate <fps>` | Capture frame rate |
|
||||||
|
| `--no-sound` | Disable audio capture |
|
||||||
|
| `-h` / `--help` | Show help |
|
||||||
|
|
||||||
|
**Env vars:**
|
||||||
|
|
||||||
|
| Env var | Description |
|
||||||
|
| ----------------------- | ---------------------------------- |
|
||||||
|
| `OBS_NO_GAMECAPTURE` | Disable OBS game capture detection |
|
||||||
|
| `OBS_FORCE_GAMECAPTURE` | Force OBS game capture |
|
||||||
|
| `OBS_NO_XLIB` | Disable XLIB capture backend |
|
||||||
|
| `OBS_NO_XSHM` | Disable XSHM capture backend |
|
||||||
|
| `OBS_NO_VKCAPTURE` | Disable VK capture backend |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## gamemode / gamemoderun
|
||||||
|
|
||||||
|
**Launch:** `gamemoderun %command%`
|
||||||
|
|
||||||
|
**Env vars:**
|
||||||
|
|
||||||
|
| Env var | Description |
|
||||||
|
| ----------------- | ------------------------------ |
|
||||||
|
| `GAMEMODE_CONFIG` | Override gamemode.ini location |
|
||||||
|
|
||||||
|
**Steam compat env vars (set by Steam, visible to gamemode):**
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
| ---------------------------------- | ------------------------------- |
|
||||||
|
| `STEAM_COMPAT_APP_ID` | Game AppID |
|
||||||
|
| `STEAM_COMPAT_DATA_PATH` | Game compatdata path |
|
||||||
|
| `STEAM_COMPAT_CLIENT_INSTALL_PATH` | Steam install path |
|
||||||
|
| `STEAM_COMPAT_INSTALL_PATH` | Game install path |
|
||||||
|
| `STEAM_RUNTIME` | `1` if Steam Runtime active |
|
||||||
|
| `WINEPREFIX` | Wine prefix (if through Proton) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Sources
|
||||||
|
|
||||||
|
- [Gamescope README](https://github.com/ValveSoftware/gamescope/blob/main/README.md)
|
||||||
|
- [Steam for Linux README](https://github.com/ValveSoftware/steam-for-linux/blob/main/steam/README.md)
|
||||||
|
- [Proton-GE README](https://github.com/GloriousEggroll/proton-ge-custom/blob/main/README.md)
|
||||||
|
- [Proton-CachyOS README](https://github.com/CachyOS/proton-cachyos/blob/cachyos_main/README.md)
|
||||||
|
- [OBS Studio](https://github.com/obsproject/obs-studio)
|
||||||
|
- [OBS Game Capture](https://github.com/obsproject/obs-gamecapture)
|
||||||
|
- [gamemode](https://github.com/gamemodeorg/gamemode)
|
||||||
+410
@@ -0,0 +1,410 @@
|
|||||||
|
# Steam Launch Options — Full Reference
|
||||||
|
|
||||||
|
Compiled reference for every tool this project assembles into Steam launch
|
||||||
|
commands: gamescope, Proton (GE/CachyOS), MangoHud, obs-gamecapture, GameMode,
|
||||||
|
and Mesa Vulkan layers. Sources: ValveSoftware/gamescope (README + `main.cpp`
|
||||||
|
usage), flightlessmango/MangoHud (`data/MangoHud.conf`), nowrep/obs-vkcapture,
|
||||||
|
FeralInteractive/gamemode, Mesa docs, and the project's own
|
||||||
|
`launch_args_env_vars.md` / `steam-tinker-launcher.md`.
|
||||||
|
|
||||||
|
## The reference config this file started from
|
||||||
|
|
||||||
|
```
|
||||||
|
LD_PRELOAD="" PROTON_USE_NTSYNC=1 PROTON_ENABLE_WAYLAND=1 ENABLE_LAYER_MESA_ANTI_LAG=1
|
||||||
|
MANGOHUD=1 gamemoderun obs-gamecapture gamescope --fullscreen -w 1920 -W 1920 -h 1080
|
||||||
|
-H 1080 -r 165 --immediate-flips --nested-unfocused-refresh 30 --sharpness 20
|
||||||
|
--force-grab-cursor --backend wayland -- env LD_PRELOAD="$LD_PRELOAD" %command%
|
||||||
|
```
|
||||||
|
|
||||||
|
Annotated: envs → `gamemoderun` (outermost) → `obs-gamecapture` → `gamescope`
|
||||||
|
(inner wrapper, its own `--` separator) → `env LD_PRELOAD=... %command%`.
|
||||||
|
Everything before the first `--` applies to gamescope itself; `%command%` is the
|
||||||
|
game.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. gamescope
|
||||||
|
|
||||||
|
Usage: `gamescope [options...] -- [command...]`. Options before `--` configure
|
||||||
|
the compositor; everything after runs inside it.
|
||||||
|
|
||||||
|
### General
|
||||||
|
|
||||||
|
| Option | Meaning |
|
||||||
|
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `-W, --output-width`, `-H, --output-height` | Resolution gamescope outputs at (default 1280×720). Ignored in embedded mode. |
|
||||||
|
| `-w, --nested-width`, `-h, --nested-height` | Resolution the game renders at (defaults to `-W`/`-H`). |
|
||||||
|
| `-r, --nested-refresh` | Frame-rate limit for the game (e.g. `-r 165`). |
|
||||||
|
| `-m, --max-scale` | Maximum scale factor. |
|
||||||
|
| `-S, --scaler` | Upscaler type: `auto`, `integer`, `fit`, `fill`, `stretch`. |
|
||||||
|
| `-F, --filter` | Upscale filter: `linear`, `nearest`, `fsr` (FSR 1.0), `nis` (NIS 1.0.3), `pixel`. |
|
||||||
|
| `--sharpness, --fsr-sharpness` | Upscaler sharpness **0 (max) to 20 (min)**. Affects FSR/NIS. |
|
||||||
|
| `--expose-wayland` | Accept Wayland clients (xdg-shell). |
|
||||||
|
| `-s, --mouse-sensitivity` | Multiply mouse movement by a decimal (e.g. `-s 1.0`). |
|
||||||
|
| `--backend` | Rendering backend: `auto` (default), `drm` (standalone session), `sdl`, `openvr`, `headless`, `wayland`. |
|
||||||
|
| `--mangoapp` | Launch the MangoHud `mangoapp` overlay inside gamescope (prefer over mangohud on the game). |
|
||||||
|
| `--adaptive-sync` | Enable adaptive sync / VRR if available. |
|
||||||
|
|
||||||
|
### Nested mode
|
||||||
|
|
||||||
|
| Option | Meaning |
|
||||||
|
| -------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `-o, --nested-unfocused-refresh` | Game refresh rate when the window is unfocused (e.g. `30`). Note: does not work on the Wayland backend. |
|
||||||
|
| `-b, --borderless` | Borderless window. |
|
||||||
|
| `-f, --fullscreen` | Fullscreen window. |
|
||||||
|
| `-g, --grab` | Grab the keyboard. |
|
||||||
|
| `--force-grab-cursor` | Always use relative mouse mode regardless of cursor visibility. |
|
||||||
|
| `--display-index` | Force a specific display in nested mode. |
|
||||||
|
|
||||||
|
### Embedded mode
|
||||||
|
|
||||||
|
| Option | Meaning |
|
||||||
|
| ---------------------- | ------------------------------------------------------------------------ |
|
||||||
|
| `-O, --prefer-output` | Connectors in preference order (e.g. `DP-1,DP-2,HDMI-A-1`). |
|
||||||
|
| `--default-touch-mode` | Touch mode: `0` hover, `1` left, `2` right, `3` middle, `4` passthrough. |
|
||||||
|
| `--generate-drm-mode` | DRM mode generation algorithm: `cvt`, `fixed`. |
|
||||||
|
| `--immediate-flips` | Immediate flips (may tear). |
|
||||||
|
| `--framerate-limit` | Hard FPS limit for the embedded session (steamcompmgr-style). |
|
||||||
|
|
||||||
|
### HDR
|
||||||
|
|
||||||
|
| Option | Meaning |
|
||||||
|
| --------------------------------------------- | -------------------------------------------------- |
|
||||||
|
| `--hdr-enabled` | Enable HDR output. |
|
||||||
|
| `--hdr-wide-gammut-for-sdr` | Wide gamut for SDR content. |
|
||||||
|
| `--hdr-sdr-content-nits` | Assumed SDR content brightness (e.g. `400`). |
|
||||||
|
| `--hdr-itm-enable` | Inverse tone mapping for SDR content. |
|
||||||
|
| `--hdr-itm-sdr-nits`, `--hdr-itm-target-nits` | ITM input/output brightness (e.g. `100` / `1000`). |
|
||||||
|
|
||||||
|
### VR (OpenVR backend)
|
||||||
|
|
||||||
|
| Option | Meaning |
|
||||||
|
| ---------------------------------------------------------- | --------------------------------------- |
|
||||||
|
| `--openvr` | Run as an OpenVR session. |
|
||||||
|
| `--vr-overlay-show-immediately` | Show overlay immediately. |
|
||||||
|
| `--vr-overlay-enable-control-bar` / `-keyboard` / `-close` | Control bar + keyboard/close shortcuts. |
|
||||||
|
| `--vr-overlay-modal` | Modal overlay. |
|
||||||
|
| `--vr-scrolls-speed` | Scroll speed (e.g. `8.0`). |
|
||||||
|
| `--vr-overlay-key`, `--vr-app-overlay-key` | Overlay key / per-app key. |
|
||||||
|
| `--vr-overlay-explicit-name`, `--vr-overlay-default-name` | Overlay names. |
|
||||||
|
| `--vr-overlay-icon` | Overlay icon path. |
|
||||||
|
|
||||||
|
### Debug / misc
|
||||||
|
|
||||||
|
| Option | Meaning |
|
||||||
|
| ------------------------------------ | ------------------------------------------------------- |
|
||||||
|
| `--debug-hud` | Show gamescope's internal debug HUD. |
|
||||||
|
| `--force-composition` | Always composite (disable direct flips). |
|
||||||
|
| `--rt` | Realtime scheduling. |
|
||||||
|
| `--headless` | Headless backend. |
|
||||||
|
| `--prefer-vk-device` | Prefer a specific Vulkan device (e.g. `%{VK_DEVICE}%`). |
|
||||||
|
| `--disable-layers`, `--debug-layers` | Disable / debug Vulkan layers. |
|
||||||
|
| `--allow-deferred-backend` | Allow the backend to start deferred. |
|
||||||
|
| `--keep-alive` | Keep the session alive after the app exits. |
|
||||||
|
| `--expose-wayland` | (see General) |
|
||||||
|
|
||||||
|
Also: `GAMESCOPE_*` env vars exist for embedded-session behavior; the
|
||||||
|
STL doc `steam-tinker-launcher.md` §3.1–3.6 has the full catalog incl. legacy
|
||||||
|
flags (`-i`, `-n`, `-U`, `-Y` = older GameScope filter flags, deprecated).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Proton (GE / CachyOS)
|
||||||
|
|
||||||
|
Run with `binary=proton suffix=waitforexecandrun` — all toggles are env vars.
|
||||||
|
Full per-variant tables in `launch_args_env_vars.md`; highlights:
|
||||||
|
|
||||||
|
| Env var | Meaning |
|
||||||
|
| -------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
||||||
|
| `PROTON_LOG=1` | Write a debug log to `steam-<appid>.log`. |
|
||||||
|
| `PROTON_USE_NTSYNC=1` / `PROTON_NO_NTSYNC=1` | Force / disable ntsync. |
|
||||||
|
| `PROTON_USE_WINED3D=1` | OpenGL backend instead of DXVK. |
|
||||||
|
| `PROTON_NO_D3D12/11/10/9=1` | Disable a D3D version. |
|
||||||
|
| `PROTON_NO_ESYNC=1`, `PROTON_NO_FSYNC=1` | Disable esync / fsync. |
|
||||||
|
| `PROTON_ENABLE_WAYLAND=1` | Use the Wayland driver (no XWayland). |
|
||||||
|
| `PROTON_ENABLE_NVAPI=1` / `PROTON_DISABLE_NVAPI=1` | NVIDIA API support (GE / CachyOS). |
|
||||||
|
| `PROTON_FSR4_UPGRADE=1`, `PROTON_DLSS_UPGRADE=1`, `PROTON_XESS_UPGRADE=1` | FSR4 / DLSS / XESS frame-gen upgrades (FSR4 = AMD 7xxx+). |
|
||||||
|
| `PROTON_FSR3_UPGRADE=1`, `PROTON_MLFG_UPGRADE=1`, `PROTON_FFX3_UPGRADE=1`, `PROTON_FFX4_UPGRADE=1` | Other upscale upgrades (CachyOS). |
|
||||||
|
| `WINE_FULLSCREEN_FSR=1` (+ `WINE_FULLSCREEN_FSR_STRENGTH=2`) | Wine fullscreen FSR. |
|
||||||
|
| `WINE_DO_NOT_CREATE_DXGI_DEVICE_MANAGER=1` | Fix miscolored video. |
|
||||||
|
| `PROTON_USE_SECCOMP=1`, `PROTON_NO_WRITE_WATCH=1`, `PROTON_HEAP_DELAY_FREE=1` | Compatibility shims. |
|
||||||
|
| `PROTON_USE_WOW64=1` | New WoW64 prefix mode. |
|
||||||
|
| `PROTON_ENABLE_MEDIACONV=1`, `PROTON_MEDIA_FORCE_GST=1` | Media Foundation via GStreamer. |
|
||||||
|
| `PROTON_USE_XALIA=1/0` | Enable/disable the Xalia gamepad→keyboard bridge. |
|
||||||
|
| `PROTON_USE_SDL=1` / `PROTON_PREFER_SDL=1` | SDL input path. |
|
||||||
|
| `DXVK_HDR=1` / `DXVK_NO_HDR=1` | HDR on/off (CachyOS). |
|
||||||
|
| `DXVK_NVAPI_VKREFLEX=1`, `LOW_LATENCY_LAYER=1` | NVIDIA Reflex / low-latency layer (CachyOS). |
|
||||||
|
| `PROTON_NVIDIA_LIBS=1` (+ `_NO_32BIT`, `NVCUDA`, `NVENC`, `NVML`, `NVOPTIX`) | NVIDIA library set (CachyOS). |
|
||||||
|
| `PROTON_USE_D9VK=1`, `PROTON_DXVK_SAREK=1`, `PROTON_DXVK_LOWLATENCY=1`, `PROTON_D7VK_DDRAW=1` | Alternative D3D translation (CachyOS). |
|
||||||
|
| `PROTON_DISCORD_BRIDGE=1` | Discord Rich Presence bridge (CachyOS). |
|
||||||
|
|
||||||
|
The app exposes these as checkbox toggles under the Proton tabs (categories:
|
||||||
|
Debug / Performance / Graphics / Compatibility / NVIDIA / Upscaling / Input /
|
||||||
|
Display / Audio / HDR / Media / Integration).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. MangoHud
|
||||||
|
|
||||||
|
Enable with `MANGOHUD=1` (Vulkan/OpenGL) or by wrapping the command with
|
||||||
|
`mangohud <cmd>` (GL). Config lives in `~/.config/MangoHud/MangoHud.conf`;
|
||||||
|
everything below is also settable via `MANGOHUD_CONFIG` (comma-separated, e.g.
|
||||||
|
`MANGOHUD_CONFIG=fps_limit=60,fps,gpu_stats`).
|
||||||
|
|
||||||
|
| Config param | Meaning |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `fps_limit=N` | Limit FPS (comma list e.g. `0,30,60`; `0` = unlimited). |
|
||||||
|
| `fps_limit_method=` | `early` (wait before present) / `late` (wait after). |
|
||||||
|
| `vulkan_present_mode=` | Override present mode: `immediate`, `mailbox`, `fifo`, `fifo_relaxed`, `shared_demand_refresh`, `shared_continuous_refresh`, `fifo_latest_ready`. |
|
||||||
|
| `vsync=N` | Force vsync on/off. |
|
||||||
|
| `fps`, `gpu_stats`, `gpu_temp`, `gpu_core_clock`, `gpu_mem_clock`, `gpu_mem_temp`, `gpu_power`, `gpu_load_change`, `gpu_fan`, `gpu_voltage` | GPU readouts (misc info). |
|
||||||
|
| `cpu_stats`, `cpu_temp`, `cpu_power`, `ram`, `vram`, `io_stats`, `frametime` | CPU/memory/IO stats. |
|
||||||
|
| `frame_timing`, `frame_timing_detailed`, `dynamic_frame_timing`, `histogram` | Frametime graphs. |
|
||||||
|
| `gamemode` | Show GameMode active status. |
|
||||||
|
| `fsr` / `hide_fsr_sharpness` | Show FSR status (gamescope only). |
|
||||||
|
| `debug` | Gamescope app frametime/latency graph. |
|
||||||
|
| `show_fps_limit`, `resolution`, `display_server`, `engine_version`, `wine`, `winesync`, `arch` | Misc display toggles. |
|
||||||
|
| `custom_text=`, `exec=` | Custom text / shell-command output column. |
|
||||||
|
| `media_player` | Spotify/media metadata. |
|
||||||
|
| `toggle_hud=`, `toggle_hud_position=`, `toggle_preset=`, `toggle_fps_limit=`, `toggle_logging=`, `reload_cfg=`, `upload_log=` | Keybinds (e.g. `Shift_R+F12`). |
|
||||||
|
| `autostart_log=`, `log_duration=`, `log_interval=`, `log_upload=`, `log_sync=` | Benchmark logging. |
|
||||||
|
| `graphs=` | Which graphs to show (`gpu_load,cpu_load,gpu_core_clock,gpu_mem_clock,vram,ram,cpu_temp,gpu_temp`). |
|
||||||
|
|
||||||
|
Env vars: `MANGOHUD_CONFIG`, `MANGOHUD_CONFIGFILE`, `MANGOHUD_PRESETSFILE`.
|
||||||
|
`mangoapp` = standalone overlay for Steam/gamescope sessions.
|
||||||
|
|
||||||
|
The app exposes: `MANGOHUD=1` (Enable overlay), `fps_limit=60`, `fps`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. obs-gamecapture
|
||||||
|
|
||||||
|
Binary wrapper from obs-vkcapture. Enables OBS "Game Capture" sources to see
|
||||||
|
the game.
|
||||||
|
|
||||||
|
| Option / env | Meaning |
|
||||||
|
| ------------------------------------------------------ | ---------------------------------------------------------- |
|
||||||
|
| `--width W`, `--height H` | Capture resolution. |
|
||||||
|
| `--rate N` | Capture frame rate. |
|
||||||
|
| `--no-sound` | Disable audio capture. |
|
||||||
|
| `OBS_FORCE_GAMECAPTURE=1` | Force game-capture path. |
|
||||||
|
| `OBS_NO_GAMECAPTURE=1` | Disable game-capture detection. |
|
||||||
|
| `OBS_NO_XLIB=1`, `OBS_NO_XSHM=1`, `OBS_NO_VKCAPTURE=1` | Disable specific capture paths. |
|
||||||
|
| `OBS_VKCAPTURE=1` | Enable the Vulkan capture layer (native games). |
|
||||||
|
| `OBS_VKCAPTURE_NAME=` | Override the app name reported to OBS for window matching. |
|
||||||
|
|
||||||
|
OBS-side (Game Capture source): window matching (any / specific app / any
|
||||||
|
except), cursor capture (X11 + Wayland), transparency.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. GameMode
|
||||||
|
|
||||||
|
`gamemoderun %command%` (or `gamemoderun ./game`) requests the gamemoded daemon
|
||||||
|
switch to the performance profile for the process tree. Legacy pre-1.3 form:
|
||||||
|
`LD_PRELOAD="$LD_PRELOAD:/usr/$LIB/libgamemodeauto.so.0" %command%`.
|
||||||
|
|
||||||
|
| Env / config | Meaning |
|
||||||
|
| ------------------------------------ | ---------------------------------------------------------------------------------------------- |
|
||||||
|
| `GAMEMODERUNEXEC="cmd"` | Extra command gamemoderun executes. |
|
||||||
|
| `~/.config/gamemode.ini` `[general]` | `desired_gov` (governor override), `reaper_freq`, `defaultgov`. |
|
||||||
|
| `[gpu]` | `apply_gpu_optimisations`, `gpu_device`, `amd_performance_level=high`, `nv_powermizer_mode=1`. |
|
||||||
|
| `[cpufreq]` | `min_freq`, `max_freq`, `governor=performance`. |
|
||||||
|
| `[core]` | `park_cores=no`. |
|
||||||
|
| `[custom]` | `start=`, `end=` commands run on mode start/stop. |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Mesa Vulkan layers (AMD)
|
||||||
|
|
||||||
|
Layers shipped with Mesa (`-D vulkan-layers=...` build option); enable with
|
||||||
|
env vars. Some distros (e.g. CachyOS, mesa-git) ship extra ones as
|
||||||
|
`mesa-vulkan-layers`.
|
||||||
|
|
||||||
|
| Env var | Layer | Meaning |
|
||||||
|
| ----------------------------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `ENABLE_LAYER_MESA_ANTI_LAG=1` | anti-lag (`VK_AMD_anti_lag`, Mesa 25.3+) | AMD CPU-side latency pacing (Anti-Lag-style). Vulkan 1.3.281+. AMD GPUs only. |
|
||||||
|
| `VK_LOADER_LAYERS_ENABLE=VK_LAYER_MESA_overlay` (or `VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay`) | overlay | Built-in Vulkan HUD: fps, frametimes, GPU/CPU stats. |
|
||||||
|
| `VK_LAYER_MESA_OVERLAY_CONFIG=position=top-left,submit,draw,...` | overlay | Overlay content config: `fps`, `frametime`, `submit`, `draw`, `pipeline_graphics`, `pipeline_compute`, `queue_ops`, `position=...` (run with `help` for the list). |
|
||||||
|
| `MESA_VK_DEVICE_SELECT=list` / `vid:did` | device-select | Pick the Vulkan device (e.g. `MESA_VK_DEVICE_SELECT=1002:747e`); append `!` to force. |
|
||||||
|
| `ENABLE_LAYER_MESA_FPS_MONITOR=1` | fps-monitor | Vsync/FPS rate limiting layer (CachyOS mesa-git). |
|
||||||
|
|
||||||
|
Notes: anti-lag needs the layer present in the runtime (Flatpak Mesa misses it);
|
||||||
|
it only applies to AMD RADV and requires `VK_AMD_anti_lag` support in the game
|
||||||
|
or translation layer. `MESA_VK_DEVICE_SELECT` is the stable way to pin a GPU for
|
||||||
|
multi-GPU setups.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. DXVK (D3D9/10/11 → Vulkan)
|
||||||
|
|
||||||
|
Translation layer inside Proton. Env vars set per-launch; the config-file
|
||||||
|
options (`dxvk.conf` / `DXVK_CONFIG=...`) are its “args”. `dxvk.conf` is read
|
||||||
|
from the game's working directory; `DXVK_CONFIG_FILE` overrides the path.
|
||||||
|
|
||||||
|
### Env vars
|
||||||
|
|
||||||
|
| Env var | Meaning |
|
||||||
|
| ------------------------------------------------ | ----------------------------------------------------------------------------- |
|
||||||
|
| `DXVK_HUD=...` | HUD elements, comma-separated (see below). `1` = `devinfo,fps`; `full` = all. |
|
||||||
|
| `DXVK_LOG_LEVEL=none\|error\|warn\|info\|debug` | Log verbosity (stderr). |
|
||||||
|
| `DXVK_LOG_PATH=dir` | Write `app_d3d11.log` etc. to a directory; `none` disables files. |
|
||||||
|
| `DXVK_SHADER_CACHE=0` | Disable the internal shader cache. |
|
||||||
|
| `DXVK_SHADER_CACHE_PATH=dir` | Shader cache location (default `%LOCALAPPDATA%/dxvk` / `$XDG_CACHE_HOME`). |
|
||||||
|
| `DXVK_FILTER_DEVICE_NAME="Name"` | Pick GPU by Vulkan device name substring (e.g. `VEGA`). |
|
||||||
|
| `DXVK_FILTER_DEVICE_UUID=32-hex` | Pick GPU by device UUID (vulkaninfo). |
|
||||||
|
| `DXVK_CONFIG_FILE=path` | Point at an explicit `dxvk.conf`. |
|
||||||
|
| `DXVK_CONFIG="opt = val; opt2 = val"` | Set config options inline (`;` separates). |
|
||||||
|
| `DXVK_DEBUG=capture\|hang\|markers\|validation` | Debug modes (hang = GPU-hang detection, markers = debug utils, …). |
|
||||||
|
| `DXVK_WSI_DRIVER=SDL3\|SDL2\|GLFW` | Backend selector for DXVK Native builds. |
|
||||||
|
| `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` | Vulkan validation layers (debugging). |
|
||||||
|
|
||||||
|
`DXVK_HUD` elements: `devinfo`, `fps`, `frametimes`, `submissions`,
|
||||||
|
`drawcalls`, `pipelines`, `compiler`, `samplers` (D3D9), `swvp` (D3D9),
|
||||||
|
`scale=x` (e.g. `1.5`), `opacity=y` (e.g. `0.5`).
|
||||||
|
|
||||||
|
### Config options (the “args”)
|
||||||
|
|
||||||
|
| Option | Meaning |
|
||||||
|
| ------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||||
|
| `dxvk.hud = ...` | Same as `DXVK_HUD` (ignored when the env var is set). |
|
||||||
|
| `dxvk.numCompilerThreads = N` | Pipeline-compiler threads; `0` = use all CPU cores. |
|
||||||
|
| `dxvk.enableAsync = True` | Asynchronous pipeline compilation (reduces stutter in shader-heavy games). |
|
||||||
|
| `dxvk.useRawSsbo = True` | Raw SSBOs for buffer views (default on supported hardware). |
|
||||||
|
| `dxvk.enableGraphicsPipelineLibrary = True` | GPL shader pre-compilation (drivers with `VK_EXT_graphics_pipeline_library`). |
|
||||||
|
| `dxvk.enableMemoryDefrag = True` | Defragment VRAM. |
|
||||||
|
| `dxvk.enableDescriptorHeap = True` | Split descriptor heaps (newer path). |
|
||||||
|
| `dxvk.enableDebugUtils = True` | Debug-utils integration. |
|
||||||
|
| `dxgi.syncInterval = 0` | Disable vsync (D3D11 present). |
|
||||||
|
| `dxgi.hideAmdGpu = True` | Hide the AMD GPU from the app (multi-GPU). |
|
||||||
|
|
||||||
|
Full option list: <https://github.com/doitsujin/dxvk/wiki/Configuration>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. vkd3d-proton (D3D12 → Vulkan)
|
||||||
|
|
||||||
|
Env vars only (no CLI); debug-oriented, may change between versions.
|
||||||
|
|
||||||
|
| Env var | Meaning |
|
||||||
|
| ------------------------------------------------ | ---------------------------------------------------------------------------------------- |
|
||||||
|
| `VKD3D_CONFIG=...` | Comma/semicolon-separated behavior flags (see below). |
|
||||||
|
| `VKD3D_LOG_LEVEL=none\|error\|warn\|info\|trace` | Log verbosity. |
|
||||||
|
| `VKD3D_FRAME_RATE=N` | Frame-rate limit; `0` uncaps. |
|
||||||
|
| `VKD3D_SWAPCHAIN_PRESENT_MODE=MODE` | Force present mode: `IMMEDIATE`, `MAILBOX`, `FIFO`, `FIFO_RELAXED`, `FIFO_LATEST_READY`. |
|
||||||
|
| `VKD3D_SHADER_CACHE_PATH=dir` | DXBC/DXIL→SPIR-V shader cache location; `0` disables. |
|
||||||
|
| `VKD3D_PROFILE_PATH=path` | CPU profiling output (profiled builds only). |
|
||||||
|
|
||||||
|
`VKD3D_CONFIG` flags: `vk_debug` (validation layer), `nodxr` (disable DXR),
|
||||||
|
`dxr` (force DXR even when unsafe), `dxr12` (experimental DXR 1.2),
|
||||||
|
`force_static_cbv` (NVIDIA speed hack), `single_queue` (no async queues),
|
||||||
|
`no_upload_hvv` (block host-visible VRAM for uploads), `pipeline_library_app_cache`,
|
||||||
|
`skip_application_workarounds`, `breadcrumbs`, `descriptor_qa_checks` (debug).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. Wine core env vars (also work under Proton)
|
||||||
|
|
||||||
|
Proton ships Wine; these env vars apply to the whole prefix.
|
||||||
|
|
||||||
|
| Env var | Meaning |
|
||||||
|
| -------------------------------- | --------------------------------------------------------------------------------------------- |
|
||||||
|
| `WINEPREFIX=path` | Wine prefix directory (default `~/.wine`); all Wine processes of a prefix share `wineserver`. |
|
||||||
|
| `WINEDLLOVERRIDES="dll=n,b;..."` | DLL load order: `n` native, `b` builtin (e.g. `dxgi=n`, `dinput8=n,b`). |
|
||||||
|
| `WINEDEBUG=...` | Debug channel control (e.g. `-all`, `+d3d`). |
|
||||||
|
| `WINE_CPU_TOPOLOGY=N:list` | Expose N physical cores to the game (e.g. `8:0,1,2,3,4,5,6,7` — Steam Deck uses this). |
|
||||||
|
|
||||||
|
Note: esync/fsync are built into Proton (toggled via `PROTON_NO_ESYNC` /
|
||||||
|
`PROTON_NO_FSYNC`); upstream Wine also accepts `WINEESYNC=1` / `WINEFSYNC=1`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. NVIDIA PRIME render offload (hybrid laptops)
|
||||||
|
|
||||||
|
Forcing the discrete NVIDIA GPU. Env vars only — no args; the `prime-run`
|
||||||
|
wrapper command sets all three. Needs driver 435.17+.
|
||||||
|
|
||||||
|
| Env var | Meaning |
|
||||||
|
| ----------------------------------- | ------------------------------------ |
|
||||||
|
| `__NV_PRIME_RENDER_OFFLOAD=1` | Offload rendering to the PRIME GPU. |
|
||||||
|
| `__GLX_VENDOR_LIBRARY_NAME=nvidia` | OpenGL path (GLX). |
|
||||||
|
| `__VK_LAYER_NV_optimus=NVIDIA_only` | Vulkan path (via the Optimus layer). |
|
||||||
|
|
||||||
|
Usage: `prime-run %command%` or inline:
|
||||||
|
`__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only %command%`.
|
||||||
|
Combined with gamemode: `gamemoderun prime-run %command%`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 11. gamescope — SteamOS session env vars + extra CLI
|
||||||
|
|
||||||
|
### Env vars (Steam/SteamOS session integration)
|
||||||
|
|
||||||
|
From the Steam Deck `gamescope-session` script (HoloISO/SteamOS); these tell
|
||||||
|
Steam/gamescope which session capabilities exist or control the session:
|
||||||
|
|
||||||
|
| Env var | Meaning |
|
||||||
|
| ----------------------------------------------------- | ----------------------------------------------------------- |
|
||||||
|
| `STEAM_GAMESCOPE_VRR_SUPPORTED=1` | Advertise VRR controls in Steam. |
|
||||||
|
| `STEAM_GAMESCOPE_TEARING_SUPPORTED=1` | Enable tearing controls in Steam. |
|
||||||
|
| `STEAM_GAMESCOPE_HAS_TEARING_SUPPORT=1` | Gamescope tearing via `GAMESCOPE_ALLOW_TEARING`. |
|
||||||
|
| `STEAM_GAMESCOPE_DYNAMIC_FPSLIMITER=1` | Mesa fifo-based dynamic FPS limiter. |
|
||||||
|
| `STEAM_GAMESCOPE_COLOR_TOYS=1` | Gamma/degamma exponent support in Steam. |
|
||||||
|
| `STEAM_GAMESCOPE_NIS_SUPPORTED=1` | Advertise NIS upscaling. |
|
||||||
|
| `STEAM_GAMESCOPE_DYNAMIC_REFRESH_IN_STEAM_SUPPORTED` | Dynamic refresh toggle in the steamui. |
|
||||||
|
| `STEAM_DISPLAY_REFRESH_LIMITS=40,60` | Refresh-rate range + switching (e.g. Deck 40 Hz mode). |
|
||||||
|
| `STEAM_USE_DYNAMIC_VRS=1` | Dynamic VRS (with `RADV_FORCE_VRS_CONFIG_FILE`). |
|
||||||
|
| `STEAM_MULTIPLE_XWAYLANDS=1` | Per-game XWayland isolation. |
|
||||||
|
| `STEAM_USE_MANGOAPP=1` | mangoapp overlay in session. |
|
||||||
|
| `STEAM_MANGOAPP_HORIZONTAL_SUPPORTED=1` | Horizontal mangoapp bar. |
|
||||||
|
| `GAMESCOPE_MODE_SAVE_FILE=path` | Mode-save file (res/refresh modes). |
|
||||||
|
| `GAMESCOPE_NV12_COLORSPACE=...` | NV12 colorspace for RPT (e.g. `k_EStreamColorspace_BT601`). |
|
||||||
|
| `GAMESCOPE_LIMITER_FILE=path` | Callback-based FPS limiter file. |
|
||||||
|
| `GAMESCOPE_STATS=path` / `GAMESCOPE_WAYLAND_DISPLAY=` | Session stats pipe / Wayland display set by gamescope. |
|
||||||
|
|
||||||
|
### Extra CLI flags (beyond §1)
|
||||||
|
|
||||||
|
| Option | Meaning |
|
||||||
|
| ------------------------------------ | ---------------------------------------------------------------- |
|
||||||
|
| `--xwayland-count N` | Number of XWayland servers (e.g. `2` on Deck). |
|
||||||
|
| `--hide-cursor-delay ms` | Hide the cursor after N ms of inactivity (e.g. `3000`). |
|
||||||
|
| `--fade-out-duration ms` | Fade-to-black duration on startup (e.g. `200`). |
|
||||||
|
| `--force-orientation VALUE` | Panel orientation: `left`, `right`, `upside_down`. |
|
||||||
|
| `--cursor PATH --cursor-hotspot x,y` | Custom cursor image + hotspot (per-user path — skip in presets). |
|
||||||
|
| `-R socket` / `-T stats-pipe` | Session startup socket / stats pipe (used by SteamOS session). |
|
||||||
|
|
||||||
|
Keyboard shortcuts (nested session): `Super+F` fullscreen, `Super+N`
|
||||||
|
nearest-neighbour, `Super+U` FSR, `Super+Y` NIS, `Super+I`/`Super+O` FSR
|
||||||
|
sharpness ±1, `Super+S` screenshot, `Super+G` keyboard grab.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 12. Steam launch-option syntax
|
||||||
|
|
||||||
|
- Steam runs the launch options with `/bin/sh`; `%command%` is substituted
|
||||||
|
with the actual game command (must appear exactly once, at the end).
|
||||||
|
- Env assignments prefix the command: `VAR=1 VAR2=x gamescope ... -- %command%`.
|
||||||
|
- Wrappers chain left → right, outermost first: `gamemoderun prime-run
|
||||||
|
gamescope -r 60 -- %command%` (gamemode outermost, gamescope innermost).
|
||||||
|
- `--` separates the wrapper's own args from the wrapped command (gamescope,
|
||||||
|
obs-gamecapture). Without a wrapper, `%command%` alone is valid.
|
||||||
|
- Example: `gamescope -h 720 -H 1440 -S integer -- %command%` (720p→1440p
|
||||||
|
integer scale); `gamescope -r 30 -- %command%` (FPS limit).
|
||||||
|
- Linux-only env vars (DXVK/vkd3d/Proton) have no effect on Windows builds of
|
||||||
|
the same game.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Sources
|
||||||
|
|
||||||
|
- <https://github.com/ValveSoftware/gamescope> (`main.cpp` usage string, README)
|
||||||
|
- <https://github.com/flightlessmango/MangoHud> (`data/MangoHud.conf`)
|
||||||
|
- <https://deepwiki.com/nowrep/obs-vkcapture/4.1-configuration-options>
|
||||||
|
- <https://github.com/FeralInteractive/gamemode> (+ `gamemoderun(1)`)
|
||||||
|
- <https://docs.mesa3d.org/envvars> · Phoronix "Mesa 25.3 Merges Vulkan AMD Anti-Lag Support"
|
||||||
|
- <https://github.com/doitsujin/dxvk> (README + Configuration wiki)
|
||||||
|
- <https://github.com/HansKristian-Work/vkd3d-proton> (README)
|
||||||
|
- <https://wiki.archlinux.org/title/PRIME> · <https://download.nvidia.com/XFree86/Linux-x86_64/595.91.07/README/primerenderoffload.html>
|
||||||
|
- <https://wiki.archlinux.org/title/Launch_option> · <https://man.archlinux.org/man/wine.1.en>
|
||||||
|
- <https://github.com/HoloISO/gamescope-steamos-pkgbuild> (`gamescope-session` script)
|
||||||
|
- Project-internal: `launch_args_env_vars.md`, `steam-tinker-launcher.md`
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"name": "steam-linux-launch-args",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.1",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite dev",
|
||||||
|
"build": "vite build",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"prepare": "svelte-kit sync || echo ''",
|
||||||
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
|
"lint": "prettier --check . && eslint .",
|
||||||
|
"format": "prettier --write ."
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^10.0.1",
|
||||||
|
"@sveltejs/adapter-static": "^3.0.10",
|
||||||
|
"@sveltejs/kit": "^2.63.0",
|
||||||
|
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
||||||
|
"@types/node": "^24",
|
||||||
|
"eslint": "^10.4.1",
|
||||||
|
"eslint-config-prettier": "^10.1.8",
|
||||||
|
"eslint-plugin-svelte": "^3.19.0",
|
||||||
|
"globals": "^17.6.0",
|
||||||
|
"prettier": "^3.8.3",
|
||||||
|
"prettier-plugin-svelte": "^4.1.0",
|
||||||
|
"sass-embedded": "^1.100.0",
|
||||||
|
"svelte": "^5.56.1",
|
||||||
|
"svelte-check": "^4.6.0",
|
||||||
|
"typescript": "^6.0.3",
|
||||||
|
"typescript-eslint": "^8.60.1",
|
||||||
|
"vite": "^8.0.16"
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+2266
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
|||||||
|
allowBuilds:
|
||||||
|
esbuild: true
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
/** @type {import("prettier").Config} */
|
||||||
|
const config = {
|
||||||
|
useTabs: true,
|
||||||
|
singleQuote: true,
|
||||||
|
trailingComma: 'none',
|
||||||
|
printWidth: 100,
|
||||||
|
plugins: ['prettier-plugin-svelte'],
|
||||||
|
overrides: [{ files: '*.svelte', options: { parser: 'svelte' } }]
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
Vendored
+13
@@ -0,0 +1,13 @@
|
|||||||
|
// See https://svelte.dev/docs/kit/types#app.d.ts
|
||||||
|
// for information about these interfaces
|
||||||
|
declare global {
|
||||||
|
namespace App {
|
||||||
|
// interface Error {}
|
||||||
|
// interface Locals {}
|
||||||
|
// interface PageData {}
|
||||||
|
// interface PageState {}
|
||||||
|
// interface Platform {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="text-scale" content="scale" />
|
||||||
|
%sveltekit.head%
|
||||||
|
</head>
|
||||||
|
<body data-sveltekit-preload-data="hover">
|
||||||
|
<div style="display: contents">%sveltekit.body%</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,232 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import type { ProgramConfig, ProgramOption } from '$lib/programs';
|
||||||
|
import type { Arguments } from '$lib/meow';
|
||||||
|
|
||||||
|
let { config }: { config: ProgramConfig } = $props();
|
||||||
|
|
||||||
|
/** Category tab names in first-appearance order. */
|
||||||
|
let cats = $derived.by(() => {
|
||||||
|
const out: string[] = [];
|
||||||
|
for (const o of config.options ?? []) {
|
||||||
|
if (o.category && !out.includes(o.category)) out.push(o.category);
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
});
|
||||||
|
|
||||||
|
/** Selected category tab; null = first category, 'All' shows everything. */
|
||||||
|
let selCat = $state<string | null>(null);
|
||||||
|
$effect(() => {
|
||||||
|
// reset to the first category when the active program changes
|
||||||
|
void config;
|
||||||
|
selCat = null;
|
||||||
|
});
|
||||||
|
|
||||||
|
const shownCat = $derived(selCat ?? cats[0] ?? 'All');
|
||||||
|
const visibleOpts = $derived(
|
||||||
|
shownCat === 'All'
|
||||||
|
? (config.options ?? [])
|
||||||
|
: (config.options ?? []).filter((o) => o.category === shownCat)
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Args whose value input has been shown once — stays mounted when cleared. */
|
||||||
|
let latched: string[] = $state([]);
|
||||||
|
const argKey = (opt: ProgramOption, arg: Arguments) => `${opt.label}\u0000${arg.arg}`;
|
||||||
|
const latch = (opt: ProgramOption, arg: Arguments) => {
|
||||||
|
const k = argKey(opt, arg);
|
||||||
|
if (!latched.includes(k)) latched.push(k);
|
||||||
|
};
|
||||||
|
|
||||||
|
function addEnv() {
|
||||||
|
(config.envs ??= []).push({ var: '', val: '' });
|
||||||
|
}
|
||||||
|
|
||||||
|
function addArg() {
|
||||||
|
(config.args ??= []).push({ arg: '', val: '', prio: 0 });
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<label class="enable">
|
||||||
|
<input type="checkbox" bind:checked={config.enabled} />
|
||||||
|
Enabled
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class:disabled={!config.enabled}>
|
||||||
|
<section>
|
||||||
|
<h3>Options</h3>
|
||||||
|
{#if cats.length > 1}
|
||||||
|
<div class="cats">
|
||||||
|
<button class:active={shownCat === 'All'} onclick={() => (selCat = 'All')}>All</button>
|
||||||
|
{#each cats as c (c)}
|
||||||
|
<button class:active={shownCat === c} onclick={() => (selCat = c)}>{c}</button>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{#each visibleOpts as opt (opt.label)}
|
||||||
|
<div class="option" class:disabled={!opt.enabled}>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" bind:checked={opt.enabled} />
|
||||||
|
{opt.label}
|
||||||
|
</label>
|
||||||
|
{#if opt.desc}<span class="tip">{opt.desc}</span>{/if}
|
||||||
|
{#if opt.enabled}
|
||||||
|
{#each opt.args ?? [] as arg (arg.arg)}
|
||||||
|
{#if arg.values || arg.val || latched.includes(argKey(opt, arg))}
|
||||||
|
{#if arg.values}
|
||||||
|
<select class="optval" bind:value={arg.val}>
|
||||||
|
{#if !arg.values.includes(arg.val)}
|
||||||
|
<option value={arg.val}>{arg.val}</option>
|
||||||
|
{/if}
|
||||||
|
{#each arg.values as v (v)}
|
||||||
|
<option value={v}>{v}</option>
|
||||||
|
{/each}
|
||||||
|
</select>
|
||||||
|
{:else}
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="optval"
|
||||||
|
bind:value={arg.val}
|
||||||
|
placeholder={arg.arg}
|
||||||
|
pattern={arg.pattern}
|
||||||
|
oninput={() => latch(opt, arg)}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
{/each}
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Advanced: name, binary, env vars & raw args</summary>
|
||||||
|
|
||||||
|
<div class="fields">
|
||||||
|
<label>Name <input bind:value={config.name} /></label>
|
||||||
|
<label>Binary <input bind:value={config.binary} /></label>
|
||||||
|
<label>Prefix <input bind:value={config.prefix} /></label>
|
||||||
|
<label>Suffix <input bind:value={config.suffix} /></label>
|
||||||
|
<label>Priority <input type="number" bind:value={config.priority} /></label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h3>Env vars</h3>
|
||||||
|
{#each config.envs ?? [] as env, i (i)}
|
||||||
|
<div class="row">
|
||||||
|
<input bind:value={env.var} placeholder="VAR" />
|
||||||
|
<input bind:value={env.val} placeholder="value" />
|
||||||
|
<button onclick={() => config.envs?.splice(i, 1)}>✕</button>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
<button onclick={addEnv}>+ env</button>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h3>Env separators</h3>
|
||||||
|
{#each config.envSeparators ?? [] as s, i (i)}
|
||||||
|
<div class="row">
|
||||||
|
<input bind:value={s.var} placeholder="VAR" />
|
||||||
|
<input bind:value={s.sep} placeholder="," />
|
||||||
|
<button onclick={() => config.envSeparators?.splice(i, 1)}>✕</button>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
<button onclick={() => (config.envSeparators ??= []).push({ var: '', sep: ',' })}
|
||||||
|
>+ separator</button
|
||||||
|
>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h3>Args</h3>
|
||||||
|
{#each config.args ?? [] as a, i (i)}
|
||||||
|
<div class="row">
|
||||||
|
<input bind:value={a.arg} placeholder="arg" />
|
||||||
|
<input bind:value={a.val} placeholder="value" pattern={a.pattern} />
|
||||||
|
<input type="number" bind:value={a.prio} placeholder="prio" />
|
||||||
|
<button onclick={() => config.args?.splice(i, 1)}>✕</button>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
<button onclick={addArg}>+ arg</button>
|
||||||
|
</section>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.fields label {
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
.option {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5em;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.tip {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: calc(100% + 0.5em);
|
||||||
|
max-width: 24em;
|
||||||
|
padding: 0.35em 0.6em;
|
||||||
|
background: #222;
|
||||||
|
color: #eee;
|
||||||
|
border: 1px solid #444;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 0.85em;
|
||||||
|
line-height: 1.3;
|
||||||
|
z-index: 10;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
transition:
|
||||||
|
opacity 0s,
|
||||||
|
visibility 0s;
|
||||||
|
}
|
||||||
|
.option:hover .tip {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
transition:
|
||||||
|
opacity 0s 1s,
|
||||||
|
visibility 0s 1s;
|
||||||
|
}
|
||||||
|
.option label {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.35em;
|
||||||
|
}
|
||||||
|
.optval {
|
||||||
|
width: 8em;
|
||||||
|
}
|
||||||
|
.optval:invalid,
|
||||||
|
input[pattern]:invalid {
|
||||||
|
outline: 2px solid #f33;
|
||||||
|
}
|
||||||
|
.cats {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 0.25em;
|
||||||
|
margin: 0.5em 0;
|
||||||
|
}
|
||||||
|
.cats button.active {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
.option.disabled {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.option.disabled label {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
.enable {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
.row {
|
||||||
|
margin-bottom: 0.25em;
|
||||||
|
}
|
||||||
|
label,
|
||||||
|
h3,
|
||||||
|
summary,
|
||||||
|
.cats button {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="107" height="128" viewBox="0 0 107 128"><title>svelte-logo</title><path d="M94.157 22.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282 29.608A29.92 29.92 0 0 0 8.764 49.65a31.5 31.5 0 0 0 3.108 20.231 30 30 0 0 0-4.477 11.183 31.9 31.9 0 0 0 5.448 24.116c10.402 14.887 30.942 19.297 45.791 9.835l26.083-16.624A29.92 29.92 0 0 0 98.235 78.35a31.53 31.53 0 0 0-3.105-20.232 30 30 0 0 0 4.474-11.182 31.88 31.88 0 0 0-5.447-24.116" style="fill:#ff3e00"/><path d="M45.817 106.582a20.72 20.72 0 0 1-22.237-8.243 19.17 19.17 0 0 1-3.277-14.503 18 18 0 0 1 .624-2.435l.49-1.498 1.337.981a33.6 33.6 0 0 0 10.203 5.098l.97.294-.09.968a5.85 5.85 0 0 0 1.052 3.878 6.24 6.24 0 0 0 6.695 2.485 5.8 5.8 0 0 0 1.603-.704L69.27 76.28a5.43 5.43 0 0 0 2.45-3.631 5.8 5.8 0 0 0-.987-4.371 6.24 6.24 0 0 0-6.698-2.487 5.7 5.7 0 0 0-1.6.704l-9.953 6.345a19 19 0 0 1-5.296 2.326 20.72 20.72 0 0 1-22.237-8.243 19.17 19.17 0 0 1-3.277-14.502 17.99 17.99 0 0 1 8.13-12.052l26.081-16.623a19 19 0 0 1 5.3-2.329 20.72 20.72 0 0 1 22.237 8.243 19.17 19.17 0 0 1 3.277 14.503 18 18 0 0 1-.624 2.435l-.49 1.498-1.337-.98a33.6 33.6 0 0 0-10.203-5.1l-.97-.294.09-.968a5.86 5.86 0 0 0-1.052-3.878 6.24 6.24 0 0 0-6.696-2.485 5.8 5.8 0 0 0-1.602.704L37.73 51.72a5.42 5.42 0 0 0-2.449 3.63 5.79 5.79 0 0 0 .986 4.372 6.24 6.24 0 0 0 6.698 2.486 5.8 5.8 0 0 0 1.602-.704l9.952-6.342a19 19 0 0 1 5.295-2.328 20.72 20.72 0 0 1 22.237 8.242 19.17 19.17 0 0 1 3.277 14.503 18 18 0 0 1-8.13 12.053l-26.081 16.622a19 19 0 0 1-5.3 2.328" style="fill:#fff"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,157 @@
|
|||||||
|
import type { ProgramConfig } from './programs';
|
||||||
|
|
||||||
|
/** Tokens that carry no option meaning. */
|
||||||
|
const IGNORED = new Set(['%command%', 'env', '--']);
|
||||||
|
|
||||||
|
/** gamescope long aliases our presets store as shorts. */
|
||||||
|
const ALIASES: Record<string, string> = {
|
||||||
|
'--fullscreen': '-f',
|
||||||
|
'--borderless': '-b',
|
||||||
|
'--nested-unfocused-refresh': '-o'
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Split a shell-ish command, keeping quoted tokens together. */
|
||||||
|
export function tokenize(cmd: string): string[] {
|
||||||
|
const out: string[] = [];
|
||||||
|
let cur = '';
|
||||||
|
let quote: '"' | "'" | null = null;
|
||||||
|
for (let i = 0; i < cmd.length; i++) {
|
||||||
|
const ch = cmd[i];
|
||||||
|
if (quote) {
|
||||||
|
if (ch === quote) quote = null;
|
||||||
|
else cur += ch;
|
||||||
|
} else if (ch === '"' || ch === "'") {
|
||||||
|
quote = ch;
|
||||||
|
} else if (ch === '\\') {
|
||||||
|
cur += cmd[++i] ?? '';
|
||||||
|
} else if (/\s/.test(ch)) {
|
||||||
|
if (cur) {
|
||||||
|
out.push(cur);
|
||||||
|
cur = '';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cur += ch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (cur) out.push(cur);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable the options (and their programs) that a pasted launch command
|
||||||
|
* references. Only ever ENABLES — nothing is disabled or reverted. Returns
|
||||||
|
* the tokens that matched nothing.
|
||||||
|
*/
|
||||||
|
export function applyCommand(cmd: string, programs: ProgramConfig[]): string[] {
|
||||||
|
const tokens = tokenize(cmd).map((t) => ALIASES[t] ?? t);
|
||||||
|
const used = new Set<number>();
|
||||||
|
const unmatched: string[] = [];
|
||||||
|
|
||||||
|
const enable = (p: ProgramConfig, o: { enabled: boolean }): void => {
|
||||||
|
p.enabled = true;
|
||||||
|
o.enabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Pass 1: VAR=VAL env tokens
|
||||||
|
for (let i = 0; i < tokens.length; i++) {
|
||||||
|
const t = tokens[i];
|
||||||
|
const eq = t.indexOf('=');
|
||||||
|
if (eq <= 0) continue;
|
||||||
|
const varName = t.slice(0, eq);
|
||||||
|
const raw = t.slice(eq + 1);
|
||||||
|
const vals = raw.split(',');
|
||||||
|
let hit = false;
|
||||||
|
for (const p of programs) {
|
||||||
|
for (const o of p.options ?? []) {
|
||||||
|
for (const e of o.envs ?? []) {
|
||||||
|
if (e.var === varName && (e.val === raw || vals.includes(e.val))) {
|
||||||
|
enable(p, o);
|
||||||
|
hit = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hit) used.add(i);
|
||||||
|
else unmatched.push(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pass 2: program prefixes/binaries, then option args
|
||||||
|
const matched = (i: number): void => {
|
||||||
|
used.add(i);
|
||||||
|
const idx = unmatched.indexOf(tokens[i]);
|
||||||
|
if (idx !== -1) unmatched.splice(idx, 1);
|
||||||
|
};
|
||||||
|
for (let i = 0; i < tokens.length; i++) {
|
||||||
|
const t = tokens[i];
|
||||||
|
if (used.has(i) || IGNORED.has(t)) continue;
|
||||||
|
let hit = false;
|
||||||
|
for (const p of programs) {
|
||||||
|
if (p.prefix === t || p.binary === t) {
|
||||||
|
p.enabled = true;
|
||||||
|
hit = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!hit) {
|
||||||
|
// option-contributed prefix/suffix (e.g. FPS BOMB fix); compare quote-stripped
|
||||||
|
for (const p of programs) {
|
||||||
|
for (const o of p.options ?? []) {
|
||||||
|
if (
|
||||||
|
(o.prefix ?? '').replaceAll('"', '') === t ||
|
||||||
|
(o.suffix ?? '').replaceAll('"', '') === t
|
||||||
|
) {
|
||||||
|
enable(p, o);
|
||||||
|
hit = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hit) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hit) {
|
||||||
|
matched(i);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// exact arg+value pair (e.g. '-F fsr' → the fsr filter option)
|
||||||
|
for (const p of programs) {
|
||||||
|
for (const o of p.options ?? []) {
|
||||||
|
for (const a of o.args ?? []) {
|
||||||
|
if (a.arg === t && a.val && tokens[i + 1] === a.val) {
|
||||||
|
enable(p, o);
|
||||||
|
used.add(i + 1);
|
||||||
|
hit = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hit) break;
|
||||||
|
}
|
||||||
|
if (hit) break;
|
||||||
|
}
|
||||||
|
if (hit) {
|
||||||
|
matched(i);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// bare flag, or value arg consuming the next token
|
||||||
|
for (const p of programs) {
|
||||||
|
for (const o of p.options ?? []) {
|
||||||
|
for (const a of o.args ?? []) {
|
||||||
|
if (a.arg === t) {
|
||||||
|
enable(p, o);
|
||||||
|
if (a.val && i + 1 < tokens.length && !used.has(i + 1) && !IGNORED.has(tokens[i + 1])) {
|
||||||
|
a.val = tokens[i + 1];
|
||||||
|
used.add(i + 1);
|
||||||
|
}
|
||||||
|
hit = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hit) break;
|
||||||
|
}
|
||||||
|
if (hit) break;
|
||||||
|
}
|
||||||
|
if (hit) matched(i);
|
||||||
|
else unmatched.push(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
return unmatched;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
// place files you want to import through the `$lib` alias in this folder.
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
export interface ArgEvaluatable {
|
||||||
|
enabled(): boolean;
|
||||||
|
envs(): EnvVar[];
|
||||||
|
binary(): string;
|
||||||
|
prefix(): string;
|
||||||
|
suffix(): string;
|
||||||
|
priority(): number;
|
||||||
|
arguments(): Arguments[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnvVar = {
|
||||||
|
var: string;
|
||||||
|
val: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Arguments = {
|
||||||
|
arg: string;
|
||||||
|
val: string;
|
||||||
|
prio: number;
|
||||||
|
/** Fixed value set — renders a dropdown in the UI instead of a text input. */
|
||||||
|
values?: string[];
|
||||||
|
/** JS regex source the value input must match (HTML pattern attr); empty/cleared always valid. */
|
||||||
|
pattern?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
function compareArgPrio(a: Arguments, b: Arguments) {
|
||||||
|
return a.prio - b.prio;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ArgEval {
|
||||||
|
Components: ArgEvaluatable[];
|
||||||
|
|
||||||
|
constructor(components: ArgEvaluatable[]) {
|
||||||
|
this.Components = components;
|
||||||
|
}
|
||||||
|
|
||||||
|
public eval(): string {
|
||||||
|
const active = this.Components.filter((c) => c.enabled());
|
||||||
|
|
||||||
|
const env = active.flatMap((c) => c.envs().map((e) => e.var + '=' + e.val)).join(' ');
|
||||||
|
|
||||||
|
const progs = [...active]
|
||||||
|
.sort((a, b) => a.priority() - b.priority())
|
||||||
|
.map((c) =>
|
||||||
|
[
|
||||||
|
c.prefix(),
|
||||||
|
c.binary(),
|
||||||
|
...c
|
||||||
|
.arguments()
|
||||||
|
.sort(compareArgPrio)
|
||||||
|
.flatMap((a) => (a.val ? `${a.arg} ${a.val}` : a.arg)),
|
||||||
|
c.suffix()
|
||||||
|
]
|
||||||
|
.filter((s) => s !== '')
|
||||||
|
.join(' ')
|
||||||
|
)
|
||||||
|
.filter((s) => s !== '')
|
||||||
|
.join(' ');
|
||||||
|
|
||||||
|
return [env, progs, '%command%'].filter((s) => s !== '').join(' ');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import type { ProgramConfig } from '../programs';
|
||||||
|
export function gameMode(): ProgramConfig {
|
||||||
|
return {
|
||||||
|
name: 'gamemode',
|
||||||
|
enabled: false,
|
||||||
|
binary: '',
|
||||||
|
prefix: 'gamemoderun',
|
||||||
|
suffix: '',
|
||||||
|
priority: 5,
|
||||||
|
envs: [],
|
||||||
|
args: [],
|
||||||
|
options: []
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,358 @@
|
|||||||
|
import type { ProgramConfig } from '../programs';
|
||||||
|
import { NUM, NUM_DEC } from './helpers';
|
||||||
|
export function gamescope(): ProgramConfig {
|
||||||
|
return {
|
||||||
|
name: 'gamescope',
|
||||||
|
enabled: true,
|
||||||
|
binary: 'gamescope',
|
||||||
|
prefix: '',
|
||||||
|
suffix: '--',
|
||||||
|
priority: 10,
|
||||||
|
envs: [],
|
||||||
|
args: [],
|
||||||
|
options: [
|
||||||
|
// Window
|
||||||
|
{
|
||||||
|
label: 'Fullscreen',
|
||||||
|
enabled: true,
|
||||||
|
args: [{ arg: '-f', val: '', prio: 0 }],
|
||||||
|
category: 'Window',
|
||||||
|
desc: 'Run the game fullscreen instead of embedded in a window.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Borderless',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-b', val: '', prio: 0 }],
|
||||||
|
category: 'Window',
|
||||||
|
desc: 'Borderless fullscreen window (native resolution, no decorations).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Steam integration',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-e', val: '', prio: 0 }],
|
||||||
|
category: 'Window',
|
||||||
|
desc: 'Enable Steam integration (gamepad navigation in the overlay).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Force windows fullscreen',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--force-windows-fullscreen', val: '', prio: 0 }],
|
||||||
|
category: 'Window',
|
||||||
|
desc: 'Use the old Windows-style fullscreen path for the game.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Force grab cursor',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--force-grab-cursor', val: '', prio: 0 }],
|
||||||
|
category: 'Window',
|
||||||
|
desc: 'Force-grab the cursor inside the window (for games that do not request it).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Force grab keyboard',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-g', val: '', prio: 0 }],
|
||||||
|
category: 'Window',
|
||||||
|
desc: 'Force-grab keyboard input; the escape key toggles the grab.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Mouse sensitivity',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-s', val: '1.0', prio: 0, pattern: NUM_DEC }],
|
||||||
|
category: 'Window',
|
||||||
|
desc: 'Mouse sensitivity multiplier for the game (1.0 = unchanged).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Backend',
|
||||||
|
enabled: false,
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
arg: '--backend',
|
||||||
|
val: 'wayland',
|
||||||
|
prio: 0,
|
||||||
|
values: ['auto', 'drm', 'sdl', 'openvr', 'headless', 'wayland']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
category: 'Window',
|
||||||
|
desc: 'Output backend: drm = fullscreen on the display, sdl = window, wayland = nested Wayland compositor, headless = no output.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Force orientation',
|
||||||
|
enabled: false,
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
arg: '--force-orientation',
|
||||||
|
val: 'left',
|
||||||
|
prio: 0,
|
||||||
|
values: ['left', 'right', 'upside_down']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
category: 'Window',
|
||||||
|
desc: 'Force a specific screen orientation for the session.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Generate DRM mode',
|
||||||
|
enabled: false,
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
arg: '--generate-drm-mode',
|
||||||
|
val: 'cvt',
|
||||||
|
prio: 0,
|
||||||
|
values: ['cvt', 'fixed']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
category: 'Advanced',
|
||||||
|
desc: 'Generate a custom DRM mode (cvt) instead of using the native one.'
|
||||||
|
},
|
||||||
|
// Resolution
|
||||||
|
{
|
||||||
|
label: 'Output width',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-W', val: '1920', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Resolution',
|
||||||
|
desc: 'Output (display) resolution width in pixels.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Output height',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-H', val: '1080', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Resolution',
|
||||||
|
desc: 'Output (display) resolution height in pixels.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Game width',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-w', val: '1920', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Resolution',
|
||||||
|
desc: 'Internal game resolution width; scaled to the output.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Game height',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-h', val: '1080', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Resolution',
|
||||||
|
desc: 'Internal game resolution height; scaled to the output.'
|
||||||
|
},
|
||||||
|
// Framerate
|
||||||
|
{
|
||||||
|
label: 'Limit to 60 fps',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-r', val: '60', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Framerate',
|
||||||
|
desc: 'Cap the game frame rate to the given FPS (nested refresh rate).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Unfocused FPS limit',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-o', val: '30', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Framerate',
|
||||||
|
desc: 'Frame rate limit while the window is unfocused (does not work on the Wayland backend).'
|
||||||
|
},
|
||||||
|
// Filter
|
||||||
|
{
|
||||||
|
label: 'Filter',
|
||||||
|
enabled: false,
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
arg: '-F',
|
||||||
|
val: 'fsr',
|
||||||
|
prio: 0,
|
||||||
|
values: ['none', 'linear', 'nearest', 'fsr', 'nis', 'pixel']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
category: 'Filter',
|
||||||
|
desc: 'Filter/upscaling algorithm applied to the game frame.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Sharpness',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--sharpness', val: '20', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Filter',
|
||||||
|
desc: 'FSR sharpness: 0 = sharpest, 20 = softest.'
|
||||||
|
},
|
||||||
|
// Scale
|
||||||
|
{
|
||||||
|
label: 'Scale',
|
||||||
|
enabled: false,
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
arg: '-S',
|
||||||
|
val: 'integer',
|
||||||
|
prio: 0,
|
||||||
|
values: ['none', 'auto', 'integer', 'fit', 'fill', 'stretch']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
category: 'Scale',
|
||||||
|
desc: 'Scaling mode used to fit the game to the output.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Max scale factor',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '-m', val: '2', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Scale',
|
||||||
|
desc: 'Maximum scale factor (1 = disable scaling up).'
|
||||||
|
},
|
||||||
|
// HDR
|
||||||
|
{
|
||||||
|
label: 'HDR',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--hdr-enabled', val: '', prio: 0 }],
|
||||||
|
category: 'HDR',
|
||||||
|
desc: 'Enable HDR output (requires an HDR-capable display and game).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'HDR wide gamut for SDR',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--hdr-wide-gammut-for-sdr', val: '', prio: 0 }],
|
||||||
|
category: 'HDR',
|
||||||
|
desc: 'Widen the gamut of SDR content under HDR output.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'HDR SDR content nits',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--hdr-sdr-content-nits', val: '400', prio: 0, pattern: NUM }],
|
||||||
|
category: 'HDR',
|
||||||
|
desc: 'Brightness assumed for SDR content under HDR output (nits).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'HDR inverse tone mapping',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--hdr-itm-enable', val: '', prio: 0 }],
|
||||||
|
category: 'HDR',
|
||||||
|
desc: 'Apply inverse tone mapping to SDR content (SDR → HDR).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'HDR ITM SDR nits',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--hdr-itm-sdr-nits', val: '100', prio: 0, pattern: NUM }],
|
||||||
|
category: 'HDR',
|
||||||
|
desc: 'Assumed SDR brightness (nits) used by inverse tone mapping.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'HDR ITM target nits',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--hdr-itm-target-nits', val: '1000', prio: 0, pattern: NUM }],
|
||||||
|
category: 'HDR',
|
||||||
|
desc: 'Target HDR brightness (nits) for inverse tone mapping.'
|
||||||
|
},
|
||||||
|
// VR
|
||||||
|
{
|
||||||
|
label: 'OpenVR',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--openvr', val: '', prio: 0 }],
|
||||||
|
category: 'VR',
|
||||||
|
desc: 'Run as the VR compositor (headset output).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'VR overlay show immediately',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--vr-overlay-show-immediately', val: '', prio: 0 }],
|
||||||
|
category: 'VR',
|
||||||
|
desc: 'Show the VR overlay immediately instead of waiting for the game.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'VR overlay control bar',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--vr-overlay-enable-control-bar', val: '', prio: 0 }],
|
||||||
|
category: 'VR',
|
||||||
|
desc: 'Add a control bar to the VR overlay.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'VR overlay control bar keyboard',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--vr-overlay-enable-control-bar-keyboard', val: '', prio: 0 }],
|
||||||
|
category: 'VR',
|
||||||
|
desc: 'Add a keyboard button to the VR overlay control bar.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'VR overlay control bar close',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--vr-overlay-enable-control-bar-close', val: '', prio: 0 }],
|
||||||
|
category: 'VR',
|
||||||
|
desc: 'Add a close button to the VR overlay control bar.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'VR overlay modal',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--vr-overlay-modal', val: '', prio: 0 }],
|
||||||
|
category: 'VR',
|
||||||
|
desc: 'Make the VR overlay modal (blocks input to the game).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'VR scroll speed',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--vr-scrolls-speed', val: '8.0', prio: 0, pattern: NUM_DEC }],
|
||||||
|
category: 'VR',
|
||||||
|
desc: 'Scroll speed for scrolling views in the VR overlay.'
|
||||||
|
},
|
||||||
|
// Compositor
|
||||||
|
{
|
||||||
|
label: 'Immediate flips',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--immediate-flips', val: '', prio: 0 }],
|
||||||
|
category: 'Compositor',
|
||||||
|
desc: 'Present frames immediately without waiting for vblank (can cause tearing).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Adaptive sync',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--adaptive-sync', val: '', prio: 0 }],
|
||||||
|
category: 'Compositor',
|
||||||
|
desc: 'Enable adaptive sync (VRR) when the display supports it.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Force composition',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--force-composition', val: '', prio: 0 }],
|
||||||
|
category: 'Compositor',
|
||||||
|
desc: 'Force the compositor to always recomposite frames.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Expose Wayland',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--expose-wayland', val: '', prio: 0 }],
|
||||||
|
category: 'Compositor',
|
||||||
|
desc: 'Expose the game as a Wayland surface (e.g. for screen capture).'
|
||||||
|
},
|
||||||
|
// Advanced
|
||||||
|
{
|
||||||
|
label: 'Debug HUD',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--debug-hud', val: '', prio: 0 }],
|
||||||
|
category: 'Advanced',
|
||||||
|
desc: "Show gamescope's internal debug HUD (frametime, latency)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Realtime scheduling',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--rt', val: '', prio: 0 }],
|
||||||
|
category: 'Advanced',
|
||||||
|
desc: 'Give gamescope realtime scheduling priority.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Headless',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--headless', val: '', prio: 0 }],
|
||||||
|
category: 'Advanced',
|
||||||
|
desc: 'Run without creating an output (no window).'
|
||||||
|
},
|
||||||
|
// Overlay
|
||||||
|
{
|
||||||
|
label: 'MangoHud overlay',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--mangoapp', val: '', prio: 0 }],
|
||||||
|
conflicts: ['mangohud'],
|
||||||
|
category: 'Overlay',
|
||||||
|
desc: "Start MangoHud's app (--mangoapp) inside the game — conflicts with the MangoHud program."
|
||||||
|
},
|
||||||
|
// Command
|
||||||
|
{
|
||||||
|
label: 'FPS BOMB fix',
|
||||||
|
enabled: false,
|
||||||
|
prefix: 'LD_PRELOAD=',
|
||||||
|
suffix: 'LD_PRELOAD="$LD_PRELOAD"',
|
||||||
|
category: 'Command',
|
||||||
|
desc: 'Clear Steam preloaded libs for gamescope, restore them for the game (fixes the Steam FPS-bomb stutter).'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import type { ProgramOption } from '../programs';
|
||||||
|
|
||||||
|
/** Positive integer, e.g. resolutions, FPS limits. */
|
||||||
|
export const NUM = '^\\d+$';
|
||||||
|
/** Signed decimal, e.g. sensitivities, scales. */
|
||||||
|
export const NUM_DEC = '^-?\\d+(\\.\\d+)?$';
|
||||||
|
|
||||||
|
/** Human-readable descriptions for the exported patterns (shown in banner errors). */
|
||||||
|
export const PATTERN_HINTS: Record<string, string> = {
|
||||||
|
[NUM]: 'a whole number (e.g. 1920, 60)',
|
||||||
|
[NUM_DEC]: 'a number (e.g. 1.0, 8.5, -2.5)'
|
||||||
|
};
|
||||||
|
|
||||||
|
export function envToggle(
|
||||||
|
label: string,
|
||||||
|
env: string,
|
||||||
|
val = '1',
|
||||||
|
category?: string,
|
||||||
|
desc?: string
|
||||||
|
): ProgramOption {
|
||||||
|
return {
|
||||||
|
label,
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: env, val }],
|
||||||
|
...(category && { category }),
|
||||||
|
...(desc && { desc })
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Pairwise 'program:label' conflict keys for a mutually-exclusive option group. */
|
||||||
|
export function group(program: string, labels: string[]): Record<string, string[]> {
|
||||||
|
const out: Record<string, string[]> = {};
|
||||||
|
for (const l of labels) {
|
||||||
|
out[l] = labels.filter((x) => x !== l).map((x) => `${program}:${x}`);
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import type { ProgramConfig } from '../programs';
|
||||||
|
export function mangoHud(): ProgramConfig {
|
||||||
|
return {
|
||||||
|
name: 'mangohud',
|
||||||
|
enabled: true,
|
||||||
|
binary: '',
|
||||||
|
prefix: '',
|
||||||
|
suffix: '',
|
||||||
|
priority: 30,
|
||||||
|
envs: [],
|
||||||
|
args: [],
|
||||||
|
envSeparators: [{ var: 'MANGOHUD_CONFIG', sep: ',' }],
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: 'Enable overlay',
|
||||||
|
enabled: true,
|
||||||
|
envs: [{ var: 'MANGOHUD', val: '1' }],
|
||||||
|
category: 'Overlay',
|
||||||
|
desc: 'Enable the MangoHud overlay (MANGOHUD=1).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Limit to 60 fps',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'MANGOHUD_CONFIG', val: 'fps_limit=60' }],
|
||||||
|
category: 'Overlay',
|
||||||
|
desc: 'Cap the frame rate to 60 FPS via MangoHud (fps_limit).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Show FPS',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'MANGOHUD_CONFIG', val: 'fps' }],
|
||||||
|
category: 'Overlay',
|
||||||
|
desc: 'Show the FPS counter in the overlay.'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import type { ProgramConfig } from '../programs';
|
||||||
|
import { envToggle } from './helpers';
|
||||||
|
export function mesaLayers(): ProgramConfig {
|
||||||
|
return {
|
||||||
|
name: 'mesa-layers',
|
||||||
|
enabled: false,
|
||||||
|
binary: '',
|
||||||
|
prefix: '',
|
||||||
|
suffix: '',
|
||||||
|
priority: 40,
|
||||||
|
envs: [],
|
||||||
|
args: [],
|
||||||
|
options: [
|
||||||
|
// Layers
|
||||||
|
envToggle(
|
||||||
|
'Anti-lag layer',
|
||||||
|
'ENABLE_LAYER_MESA_ANTI_LAG',
|
||||||
|
'1',
|
||||||
|
'Layers',
|
||||||
|
'AMD Anti-Lag via the Mesa layer (RADV, Mesa 25.3+, needs distro mesa-git).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Vulkan overlay layer',
|
||||||
|
'VK_LOADER_LAYERS_ENABLE',
|
||||||
|
'VK_LAYER_MESA_overlay',
|
||||||
|
'Layers',
|
||||||
|
"Enable Mesa's Vulkan overlay layer (FPS/frametime HUD)."
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'FPS monitor layer',
|
||||||
|
'ENABLE_LAYER_MESA_FPS_MONITOR',
|
||||||
|
'1',
|
||||||
|
'Layers',
|
||||||
|
"Enable Mesa's FPS monitor layer (CachyOS mesa-git)."
|
||||||
|
)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
import type { ProgramConfig } from '../programs';
|
||||||
|
import { envToggle, NUM } from './helpers';
|
||||||
|
export function obsGameCapture(): ProgramConfig {
|
||||||
|
return {
|
||||||
|
name: 'obs-gamecapture',
|
||||||
|
enabled: false,
|
||||||
|
binary: 'obs-gamecapture',
|
||||||
|
prefix: '',
|
||||||
|
suffix: '--',
|
||||||
|
priority: 10,
|
||||||
|
envs: [],
|
||||||
|
args: [],
|
||||||
|
options: [
|
||||||
|
// Video
|
||||||
|
{
|
||||||
|
label: 'Capture width',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--width', val: '1920', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Video',
|
||||||
|
desc: 'Captured frame width (0 = follow the game window).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Capture height',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--height', val: '1080', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Video',
|
||||||
|
desc: 'Captured frame height (0 = follow the game window).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Capture frame rate',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--rate', val: '60', prio: 0, pattern: NUM }],
|
||||||
|
category: 'Video',
|
||||||
|
desc: 'Capture frame rate.'
|
||||||
|
},
|
||||||
|
// Audio
|
||||||
|
{
|
||||||
|
label: 'No sound',
|
||||||
|
enabled: false,
|
||||||
|
args: [{ arg: '--no-sound', val: '', prio: 0 }],
|
||||||
|
category: 'Audio',
|
||||||
|
desc: "Do not capture the game's audio."
|
||||||
|
},
|
||||||
|
// Capture
|
||||||
|
{
|
||||||
|
label: 'Force game capture',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'OBS_FORCE_GAMECAPTURE', val: '1' }],
|
||||||
|
conflicts: ['obs-gamecapture:Disable game capture detection'],
|
||||||
|
category: 'Capture',
|
||||||
|
desc: 'Force game-capture mode (instead of desktop capture).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Disable game capture detection',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'OBS_NO_GAMECAPTURE', val: '1' }],
|
||||||
|
conflicts: ['obs-gamecapture:Force game capture'],
|
||||||
|
category: 'Capture',
|
||||||
|
desc: 'Disable automatic game-capture detection.'
|
||||||
|
},
|
||||||
|
envToggle(
|
||||||
|
'Disable XLIB capture',
|
||||||
|
'OBS_NO_XLIB',
|
||||||
|
'1',
|
||||||
|
'Capture',
|
||||||
|
'Disable the X11 XLIB capture path.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable XSHM capture',
|
||||||
|
'OBS_NO_XSHM',
|
||||||
|
'1',
|
||||||
|
'Capture',
|
||||||
|
'Disable the X11 shared-memory capture path.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable VK capture',
|
||||||
|
'OBS_NO_VKCAPTURE',
|
||||||
|
'1',
|
||||||
|
'Capture',
|
||||||
|
'Disable the Vulkan capture path.'
|
||||||
|
)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import type { ProgramConfig } from '../programs';
|
||||||
|
export function prime(): ProgramConfig {
|
||||||
|
return {
|
||||||
|
name: 'prime',
|
||||||
|
enabled: false,
|
||||||
|
binary: '',
|
||||||
|
prefix: 'prime-run',
|
||||||
|
suffix: '',
|
||||||
|
priority: 6,
|
||||||
|
envs: [],
|
||||||
|
args: [],
|
||||||
|
options: []
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,411 @@
|
|||||||
|
import type { ProgramConfig } from '../programs';
|
||||||
|
import { envToggle, group } from './helpers';
|
||||||
|
|
||||||
|
const cachyNv = group('proton-cachyos', [
|
||||||
|
'NVIDIA libs',
|
||||||
|
'NVIDIA libs (64-bit only)',
|
||||||
|
'nvcuda.dll only',
|
||||||
|
'nvencodeapi.dll only',
|
||||||
|
'nvml.dll only',
|
||||||
|
'nvoptix.dll only'
|
||||||
|
]);
|
||||||
|
|
||||||
|
export function protonCachyOS(): ProgramConfig {
|
||||||
|
return {
|
||||||
|
name: 'proton-cachyos',
|
||||||
|
enabled: false,
|
||||||
|
binary: '',
|
||||||
|
prefix: '',
|
||||||
|
suffix: '',
|
||||||
|
priority: 20,
|
||||||
|
envs: [],
|
||||||
|
args: [],
|
||||||
|
options: [
|
||||||
|
// Debug
|
||||||
|
envToggle(
|
||||||
|
'Debug log',
|
||||||
|
'PROTON_LOG',
|
||||||
|
'1',
|
||||||
|
'Debug',
|
||||||
|
"Write the Proton/dxvk/wine debug log to the game's prefix directory."
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Wait for debugger',
|
||||||
|
'PROTON_WAIT_ATTACH',
|
||||||
|
'1',
|
||||||
|
'Debug',
|
||||||
|
'Pause the game and wait for a debugger to attach.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'DXVK HUD (fps)',
|
||||||
|
'DXVK_HUD',
|
||||||
|
'fps',
|
||||||
|
'Debug',
|
||||||
|
"Show DXVK's HUD with FPS and frame timing (values: fps, full, devinfo, …)."
|
||||||
|
),
|
||||||
|
// Performance
|
||||||
|
envToggle(
|
||||||
|
'Disable fsync',
|
||||||
|
'PROTON_NO_FSYNC',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Disable fsync (fast sync via futexes).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Force large address aware',
|
||||||
|
'PROTON_FORCE_LARGE_ADDRESS_AWARE',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Force 32-bit games to see a large address space.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Delay memory freeing',
|
||||||
|
'PROTON_HEAP_DELAY_FREE',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Delay freeing memory to improve performance in some games.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Enable seccomp-bpf',
|
||||||
|
'PROTON_USE_SECCOMP',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Enable seccomp-bpf sandboxing inside the wine process.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'dxvk-low-latency',
|
||||||
|
'PROTON_DXVK_LOWLATENCY',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Enable DXVK low-latency mode (NVIDIA Reflex integration).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Vulkan Reflex',
|
||||||
|
'DXVK_NVAPI_VKREFLEX',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Enable Vulkan Reflex (NVIDIA).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Low latency layer',
|
||||||
|
'LOW_LATENCY_LAYER',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Enable the low-latency layer (driver-level latency reduction).'
|
||||||
|
),
|
||||||
|
// Graphics
|
||||||
|
envToggle(
|
||||||
|
'wined3d (OpenGL)',
|
||||||
|
'PROTON_USE_WINED3D',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Use wined3d (OpenGL) instead of DXVK for D3D9/11.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable D3D11',
|
||||||
|
'PROTON_NO_D3D11',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Disable DXVK for D3D11 (fall back to wined3d).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable D3D10/DXGI',
|
||||||
|
'PROTON_NO_D3D10',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Disable DXVK for D3D10 (fall back to wined3d).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'DXVK d3d8',
|
||||||
|
'PROTON_DXVK_D3D8',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
"Use DXVK's d3d8 implementation for DirectX 8 games."
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable NVAPI',
|
||||||
|
'PROTON_DISABLE_NVAPI',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Disable NVIDIA NVAPI support.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Fix miscolored video',
|
||||||
|
'WINE_DO_NOT_CREATE_DXGI_DEVICE_MANAGER',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Fix wrong colors in videos (disable the DXGI device manager).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable Vulkan OPWR',
|
||||||
|
'WINE_DISABLE_VULKAN_OPWR',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Disable Vulkan one-present-wait renderer workarounds.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Hide NVIDIA GPUs as AMD',
|
||||||
|
'PROTON_HIDE_NVIDIA_GPU',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Hide NVIDIA GPUs from the game (reports AMD instead).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Integer scaling',
|
||||||
|
'WINE_FULLSCREEN_INTEGER_SCALING',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Integer scaling for fullscreen games.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Force FNA D3D11',
|
||||||
|
'FNA3D_FORCE_DRIVER',
|
||||||
|
'D3D11',
|
||||||
|
'Graphics',
|
||||||
|
'Force FNA games (FNA3D) to use the D3D11 backend.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'D9VK for d3d9',
|
||||||
|
'PROTON_USE_D9VK',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Use D9VK (DX9→Vulkan) instead of wined3d for D3D9.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'dxvk-sarek',
|
||||||
|
'PROTON_DXVK_SAREK',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Use the dxvk-sarek fork (custom shader workarounds).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'D7VK for DX7 and lower',
|
||||||
|
'PROTON_D7VK_DDRAW',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Use D7VK for DirectX 7 and older games.'
|
||||||
|
),
|
||||||
|
// Compatibility
|
||||||
|
envToggle(
|
||||||
|
'Create S: drive',
|
||||||
|
'PROTON_SET_GAME_DRIVE',
|
||||||
|
'1',
|
||||||
|
'Compatibility',
|
||||||
|
"Create an S: drive in the prefix (maps to the game's install dir)."
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Limit GL extension string',
|
||||||
|
'PROTON_OLD_GL_STRING',
|
||||||
|
'1',
|
||||||
|
'Compatibility',
|
||||||
|
'Hide GL extensions newer than the game expects.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'KDE windowing hacks',
|
||||||
|
'WINE_USE_KWIN_HACKS',
|
||||||
|
'1',
|
||||||
|
'Compatibility',
|
||||||
|
'Enable KDE-specific windowing fixes.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Per-game shader cache',
|
||||||
|
'PROTON_LOCAL_SHADER_CACHE',
|
||||||
|
'1',
|
||||||
|
'Compatibility',
|
||||||
|
'Use a per-game shader cache directory.'
|
||||||
|
),
|
||||||
|
// NVIDIA
|
||||||
|
{
|
||||||
|
label: 'NVIDIA libs',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'PROTON_NVIDIA_LIBS', val: '1' }],
|
||||||
|
conflicts: cachyNv['NVIDIA libs'],
|
||||||
|
category: 'NVIDIA',
|
||||||
|
desc: 'Include NVIDIA proprietary libs in the prefix (for DLSS/Reflex).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'NVIDIA libs (64-bit only)',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'PROTON_NVIDIA_LIBS_NO_32BIT', val: '1' }],
|
||||||
|
conflicts: cachyNv['NVIDIA libs (64-bit only)'],
|
||||||
|
category: 'NVIDIA',
|
||||||
|
desc: 'Include only 64-bit NVIDIA libs (smaller prefix).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'nvcuda.dll only',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'PROTON_NVIDIA_NVCUDA', val: '1' }],
|
||||||
|
conflicts: cachyNv['nvcuda.dll only'],
|
||||||
|
category: 'NVIDIA',
|
||||||
|
desc: 'Include only nvcuda.dll from the NVIDIA libs.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'nvencodeapi.dll only',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'PROTON_NVIDIA_NVENC', val: '1' }],
|
||||||
|
conflicts: cachyNv['nvencodeapi.dll only'],
|
||||||
|
category: 'NVIDIA',
|
||||||
|
desc: 'Include only nvencodeapi.dll (NVENC encoding).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'nvml.dll only',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'PROTON_NVIDIA_NVML', val: '1' }],
|
||||||
|
conflicts: cachyNv['nvml.dll only'],
|
||||||
|
category: 'NVIDIA',
|
||||||
|
desc: 'Include only nvml.dll (GPU monitoring).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'nvoptix.dll only',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'PROTON_NVIDIA_NVOPTIX', val: '1' }],
|
||||||
|
conflicts: cachyNv['nvoptix.dll only'],
|
||||||
|
category: 'NVIDIA',
|
||||||
|
desc: 'Include only nvoptix.dll (ray tracing / OptiX).'
|
||||||
|
},
|
||||||
|
// Upscaling
|
||||||
|
envToggle(
|
||||||
|
'FSR4 upscaling',
|
||||||
|
'PROTON_FSR4_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade FSR3 games to FSR4 (RDNA4).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'FSR4 indicator',
|
||||||
|
'PROTON_FSR4_INDICATOR',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Show an FSR4 upscaling indicator in-game.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'MLFG upgrade',
|
||||||
|
'PROTON_MLFG_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade to MLFG (multi-frame generation).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'DLSS upscaling',
|
||||||
|
'PROTON_DLSS_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade DLSS2 games to the latest DLSS.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'DLSS indicator',
|
||||||
|
'PROTON_DLSS_INDICATOR',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Show a DLSS upscaling indicator in-game.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'XESS upscaling',
|
||||||
|
'PROTON_XESS_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade games to XESS (Intel XeSS).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'FFX III upscaling',
|
||||||
|
'PROTON_FFX3_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade to AMD FidelityFX 3 (upscaling).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'FFX IV upscaling',
|
||||||
|
'PROTON_FFX4_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade to AMD FidelityFX 4.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'OptiScaler',
|
||||||
|
'PROTON_USE_OPTISCALER',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Enable OptiScaler (adds FSR/XeSS/RT to non-supported games).'
|
||||||
|
),
|
||||||
|
// Input
|
||||||
|
envToggle(
|
||||||
|
'Enable Xalia',
|
||||||
|
'PROTON_USE_XALIA',
|
||||||
|
'1',
|
||||||
|
'Input',
|
||||||
|
'Enable Xalia for gamepad/keyboard input from the desktop.'
|
||||||
|
),
|
||||||
|
envToggle('SDL input', 'PROTON_PREFER_SDL', '1', 'Input', 'Prefer SDL for input.'),
|
||||||
|
envToggle(
|
||||||
|
'Disable Steam Input',
|
||||||
|
'PROTON_NO_STEAMINPUT',
|
||||||
|
'1',
|
||||||
|
'Input',
|
||||||
|
'Disable Steam Input translation.'
|
||||||
|
),
|
||||||
|
// Display
|
||||||
|
envToggle(
|
||||||
|
'Disable WM decorations',
|
||||||
|
'PROTON_NO_WM_DECORATION',
|
||||||
|
'1',
|
||||||
|
'Display',
|
||||||
|
'Disable window manager decorations on game windows.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Wayland driver',
|
||||||
|
'PROTON_ENABLE_WAYLAND',
|
||||||
|
'1',
|
||||||
|
'Display',
|
||||||
|
'Use the native Wayland wine driver (experimental).'
|
||||||
|
),
|
||||||
|
// Audio
|
||||||
|
envToggle(
|
||||||
|
'PipeWire audio',
|
||||||
|
'PROTON_USE_PIPEWIRE',
|
||||||
|
'1',
|
||||||
|
'Audio',
|
||||||
|
'Use PipeWire instead of PulseAudio for audio.'
|
||||||
|
),
|
||||||
|
// HDR
|
||||||
|
{
|
||||||
|
label: 'HDR',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'DXVK_HDR', val: '1' }],
|
||||||
|
conflicts: ['proton-cachyos:Disable HDR'],
|
||||||
|
category: 'HDR',
|
||||||
|
desc: 'Enable HDR support in DXVK (requires an HDR display).'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Disable HDR',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'DXVK_NO_HDR', val: '1' }],
|
||||||
|
conflicts: ['proton-cachyos:HDR'],
|
||||||
|
category: 'HDR',
|
||||||
|
desc: 'Disable HDR support in DXVK.'
|
||||||
|
},
|
||||||
|
// Media
|
||||||
|
envToggle(
|
||||||
|
'Media converter',
|
||||||
|
'PROTON_ENABLE_MEDIACONV',
|
||||||
|
'1',
|
||||||
|
'Media',
|
||||||
|
'Enable the media converter for game videos (mfplat).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Force GST media',
|
||||||
|
'PROTON_MEDIA_FORCE_GST',
|
||||||
|
'1',
|
||||||
|
'Media',
|
||||||
|
'Force the GStreamer media backend for videos.'
|
||||||
|
),
|
||||||
|
// Integration
|
||||||
|
envToggle(
|
||||||
|
'Discord Rich Presence bridge',
|
||||||
|
'PROTON_DISCORD_BRIDGE',
|
||||||
|
'1',
|
||||||
|
'Integration',
|
||||||
|
"Bridge the game's Discord Rich Presence to the desktop client."
|
||||||
|
)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,258 @@
|
|||||||
|
import type { ProgramConfig } from '../programs';
|
||||||
|
import { envToggle } from './helpers';
|
||||||
|
export function protonGE(): ProgramConfig {
|
||||||
|
return {
|
||||||
|
name: 'proton-ge',
|
||||||
|
enabled: false,
|
||||||
|
binary: '',
|
||||||
|
prefix: '',
|
||||||
|
suffix: '',
|
||||||
|
priority: 20,
|
||||||
|
envs: [],
|
||||||
|
args: [],
|
||||||
|
options: [
|
||||||
|
// Debug
|
||||||
|
envToggle(
|
||||||
|
'Debug log',
|
||||||
|
'PROTON_LOG',
|
||||||
|
'1',
|
||||||
|
'Debug',
|
||||||
|
"Write the Proton/dxvk/wine debug log to the game's prefix directory."
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Dump debug commands',
|
||||||
|
'PROTON_DUMP_DEBUG_COMMANDS',
|
||||||
|
'1',
|
||||||
|
'Debug',
|
||||||
|
'Dump debug commands to stderr for debugging.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'DXVK HUD (fps)',
|
||||||
|
'DXVK_HUD',
|
||||||
|
'fps',
|
||||||
|
'Debug',
|
||||||
|
"Show DXVK's HUD with FPS and frame timing (values: fps, full, devinfo, …)."
|
||||||
|
),
|
||||||
|
// Performance
|
||||||
|
envToggle(
|
||||||
|
'Disable esync',
|
||||||
|
'PROTON_NO_ESYNC',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Disable esync (eventfd-based synchronization).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable fsync',
|
||||||
|
'PROTON_NO_FSYNC',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Disable fsync (fast sync via futexes).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable ntsync',
|
||||||
|
'PROTON_NO_NTSYNC',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Disable ntsync (new NT synchronization).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Force large address aware',
|
||||||
|
'PROTON_FORCE_LARGE_ADDRESS_AWARE',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Force 32-bit games to see a large address space.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Delay memory freeing',
|
||||||
|
'PROTON_HEAP_DELAY_FREE',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Delay freeing memory to improve performance in some games.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Enable seccomp-bpf',
|
||||||
|
'PROTON_USE_SECCOMP',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Enable seccomp-bpf sandboxing inside the wine process.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable write watches',
|
||||||
|
'PROTON_NO_WRITE_WATCH',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Disable write-watch-based memory tracking.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'WoW64',
|
||||||
|
'PROTON_USE_WOW64',
|
||||||
|
'1',
|
||||||
|
'Performance',
|
||||||
|
'Run 32-bit Windows apps under WoW64 (new 64-bit-only prefix layout).'
|
||||||
|
),
|
||||||
|
// Graphics
|
||||||
|
envToggle(
|
||||||
|
'wined3d (OpenGL)',
|
||||||
|
'PROTON_USE_WINED3D',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Use wined3d (OpenGL) instead of DXVK for D3D9/11.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable D3D12',
|
||||||
|
'PROTON_NO_D3D12',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Disable the D3D12→Vulkan layer (vkd3d-proton).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable D3D11',
|
||||||
|
'PROTON_NO_D3D11',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Disable DXVK for D3D11 (fall back to wined3d).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable D3D10',
|
||||||
|
'PROTON_NO_D3D10',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Disable DXVK for D3D10 (fall back to wined3d).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Disable D3D9',
|
||||||
|
'PROTON_NO_D3D9',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Disable DXVK for D3D9 (fall back to wined3d).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Enable NVAPI',
|
||||||
|
'PROTON_ENABLE_NVAPI',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Enable NVIDIA NVAPI support (DLSS, Reflex, ray tracing) — NVIDIA GPUs.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'FSR in fullscreen',
|
||||||
|
'WINE_FULLSCREEN_FSR',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Enable FSR upscaling for fullscreen exclusive games (wine).'
|
||||||
|
),
|
||||||
|
{
|
||||||
|
label: 'FSR sharpening',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'WINE_FULLSCREEN_FSR_STRENGTH', val: '2' }],
|
||||||
|
category: 'Graphics',
|
||||||
|
desc: 'FSR sharpening strength (2 = default).'
|
||||||
|
},
|
||||||
|
envToggle(
|
||||||
|
'Fix miscolored video',
|
||||||
|
'WINE_DO_NOT_CREATE_DXGI_DEVICE_MANAGER',
|
||||||
|
'1',
|
||||||
|
'Graphics',
|
||||||
|
'Fix wrong colors in videos (disable the DXGI device manager).'
|
||||||
|
),
|
||||||
|
// Compatibility
|
||||||
|
envToggle(
|
||||||
|
'Limit GL extension string',
|
||||||
|
'PROTON_OLD_GL_STRING',
|
||||||
|
'1',
|
||||||
|
'Compatibility',
|
||||||
|
'Hide GL extensions newer than the game expects.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'Copy prefix for -steamdeck',
|
||||||
|
'COPYPREFIX',
|
||||||
|
'1',
|
||||||
|
'Compatibility',
|
||||||
|
'Copy the prefix instead of hardlinking (for -steamdeck).'
|
||||||
|
),
|
||||||
|
// Input
|
||||||
|
{
|
||||||
|
label: 'Enable Xalia',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'PROTON_USE_XALIA', val: '1' }],
|
||||||
|
conflicts: ['proton-ge:Disable Xalia'],
|
||||||
|
category: 'Input',
|
||||||
|
desc: 'Enable Xalia for gamepad/keyboard input from the desktop.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Disable Xalia',
|
||||||
|
enabled: false,
|
||||||
|
envs: [{ var: 'PROTON_USE_XALIA', val: '0' }],
|
||||||
|
conflicts: ['proton-ge:Enable Xalia'],
|
||||||
|
category: 'Input',
|
||||||
|
desc: 'Disable Xalia input handling.'
|
||||||
|
},
|
||||||
|
envToggle('SDL input', 'PROTON_USE_SDL', '1', 'Input', 'Use SDL for input instead of X11.'),
|
||||||
|
// Display
|
||||||
|
envToggle(
|
||||||
|
'Wayland driver',
|
||||||
|
'PROTON_USE_WAYLAND',
|
||||||
|
'1',
|
||||||
|
'Display',
|
||||||
|
'Use the native Wayland wine driver (experimental).'
|
||||||
|
),
|
||||||
|
// Upscaling
|
||||||
|
envToggle(
|
||||||
|
'FSR4 upscaling',
|
||||||
|
'PROTON_FSR4_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade FSR3 games to FSR4 (RDNA4; use "FSR4 for RDNA3" on RDNA3 GPUs).'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'FSR4 indicator',
|
||||||
|
'PROTON_FSR4_INDICATOR',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Show an FSR4 upscaling indicator in-game.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'FSR4 for RDNA3',
|
||||||
|
'PROTON_FSR4_RDNA3_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Enable FSR4 on RDNA3 GPUs.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'FSR3 upscaling',
|
||||||
|
'PROTON_FSR3_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade FSR2 games to FSR3.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'DLSS upscaling',
|
||||||
|
'PROTON_DLSS_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade DLSS2 games to the latest DLSS.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'DLSS indicator',
|
||||||
|
'PROTON_DLSS_INDICATOR',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Show a DLSS upscaling indicator in-game.'
|
||||||
|
),
|
||||||
|
envToggle(
|
||||||
|
'XESS upscaling',
|
||||||
|
'PROTON_XESS_UPGRADE',
|
||||||
|
'1',
|
||||||
|
'Upscaling',
|
||||||
|
'Upgrade games to XESS (Intel XeSS).'
|
||||||
|
),
|
||||||
|
// Media
|
||||||
|
envToggle(
|
||||||
|
'Media converter',
|
||||||
|
'PROTON_ENABLE_MEDIACONV',
|
||||||
|
'1',
|
||||||
|
'Media',
|
||||||
|
'Enable the media converter for game videos (mfplat).'
|
||||||
|
)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
export { gamescope } from './preset/gamescope';
|
||||||
|
export { protonGE } from './preset/proton-ge';
|
||||||
|
export { protonCachyOS } from './preset/proton-cachyos';
|
||||||
|
export { obsGameCapture } from './preset/obs';
|
||||||
|
export { gameMode } from './preset/gamemode';
|
||||||
|
export { mangoHud } from './preset/mangohud';
|
||||||
|
export { mesaLayers } from './preset/mesa';
|
||||||
|
export { prime } from './preset/prime';
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
import type { ArgEvaluatable, Arguments, EnvVar } from './meow';
|
||||||
|
import { PATTERN_HINTS } from './preset/helpers';
|
||||||
|
|
||||||
|
export type ProgramOption = {
|
||||||
|
label: string;
|
||||||
|
enabled: boolean;
|
||||||
|
prefix?: string;
|
||||||
|
suffix?: string;
|
||||||
|
envs?: EnvVar[];
|
||||||
|
args?: Arguments[];
|
||||||
|
/** UI grouping heading for the options list. */
|
||||||
|
category?: string;
|
||||||
|
/** Hover tooltip text (1s delay). */
|
||||||
|
desc?: string;
|
||||||
|
/** Keys this option conflicts with: a program name, or 'program:option label'. */
|
||||||
|
conflicts?: string[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ProgramConfig = {
|
||||||
|
name: string;
|
||||||
|
enabled: boolean;
|
||||||
|
binary: string;
|
||||||
|
prefix?: string;
|
||||||
|
suffix?: string;
|
||||||
|
priority?: number;
|
||||||
|
envs?: EnvVar[];
|
||||||
|
args?: Arguments[];
|
||||||
|
options?: ProgramOption[];
|
||||||
|
/** Per-env-var join separator for duplicate values; default ','. */
|
||||||
|
envSeparators?: { var: string; sep: string }[];
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Config-driven program — the base class every Steam launch program
|
||||||
|
* (gamescope, proton, gamemoderun, ...) builds on. Configure one through the UI.
|
||||||
|
*/
|
||||||
|
export class Program implements ArgEvaluatable {
|
||||||
|
constructor(private cfg: ProgramConfig) {}
|
||||||
|
|
||||||
|
enabled(): boolean {
|
||||||
|
return this.cfg.enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
private opts(): ProgramOption[] {
|
||||||
|
return (this.cfg.options ?? []).filter((o) => o.enabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
binary(): string {
|
||||||
|
return this.cfg.binary;
|
||||||
|
}
|
||||||
|
prefix(): string {
|
||||||
|
return [this.cfg.prefix, ...this.opts().flatMap((o) => (o.prefix ? [o.prefix] : []))]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join(' ');
|
||||||
|
}
|
||||||
|
suffix(): string {
|
||||||
|
return [this.cfg.suffix, ...this.opts().flatMap((o) => (o.suffix ? [o.suffix] : []))]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join(' ');
|
||||||
|
}
|
||||||
|
priority(): number {
|
||||||
|
return this.cfg.priority ?? 0;
|
||||||
|
}
|
||||||
|
envs(): EnvVar[] {
|
||||||
|
const all = [...(this.cfg.envs ?? []), ...this.opts().flatMap((o) => o.envs ?? [])];
|
||||||
|
const seps = new Map((this.cfg.envSeparators ?? []).map((s) => [s.var, s.sep]));
|
||||||
|
const byVar = new Map<string, Set<string>>();
|
||||||
|
for (const e of all) {
|
||||||
|
byVar.set(e.var, (byVar.get(e.var) ?? new Set()).add(e.val));
|
||||||
|
}
|
||||||
|
return [...byVar].map(([varName, vals]) => ({
|
||||||
|
var: varName,
|
||||||
|
val: [...vals].join(seps.get(varName) ?? ',')
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
arguments(): Arguments[] {
|
||||||
|
return [...(this.cfg.args ?? []), ...this.opts().flatMap((o) => o.args ?? [])];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Conflict = {
|
||||||
|
from: string;
|
||||||
|
with: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Enabled-vs-enabled conflicts: option `conflicts` keys matched against enabled programs and options. */
|
||||||
|
export function findConflicts(programs: ProgramConfig[]): Conflict[] {
|
||||||
|
const enabled: { key: string; desc: string }[] = [];
|
||||||
|
for (const p of programs) {
|
||||||
|
if (!p.enabled) continue;
|
||||||
|
enabled.push({ key: p.name, desc: `${p.name} (program)` });
|
||||||
|
for (const o of p.options ?? []) {
|
||||||
|
if (o.enabled)
|
||||||
|
enabled.push({ key: `${p.name}:${o.label}`, desc: `${p.name}: ${o.label} (arg)` });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const descByKey = new Map(enabled.map((e) => [e.key, e.desc]));
|
||||||
|
const seen = new Set<string>();
|
||||||
|
const conflicts: Conflict[] = [];
|
||||||
|
|
||||||
|
for (const p of programs) {
|
||||||
|
if (!p.enabled) continue;
|
||||||
|
for (const o of p.options ?? []) {
|
||||||
|
if (!o.enabled) continue;
|
||||||
|
for (const c of o.conflicts ?? []) {
|
||||||
|
const withDesc = descByKey.get(c);
|
||||||
|
if (!withDesc) continue;
|
||||||
|
const from = `${p.name}: ${o.label}`;
|
||||||
|
const pair = [from, withDesc].sort().join('\u0000');
|
||||||
|
if (seen.has(pair)) continue;
|
||||||
|
seen.add(pair);
|
||||||
|
conflicts.push({ from, with: withDesc });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return conflicts;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Values of enabled options (and program args) that violate their arg `pattern`, as banner messages. */
|
||||||
|
export function findInvalidArgs(programs: ProgramConfig[]): string[] {
|
||||||
|
const out: string[] = [];
|
||||||
|
const hint = (p: string) => PATTERN_HINTS[p] ?? `something matching ${p}`;
|
||||||
|
for (const p of programs) {
|
||||||
|
if (!p.enabled) continue;
|
||||||
|
for (const a of p.args ?? []) {
|
||||||
|
if (a.pattern && a.val && !new RegExp(a.pattern).test(a.val))
|
||||||
|
out.push(`${p.name}: ${a.arg} value must be ${hint(a.pattern)}`);
|
||||||
|
}
|
||||||
|
for (const o of p.options ?? []) {
|
||||||
|
if (!o.enabled) continue;
|
||||||
|
for (const a of o.args ?? []) {
|
||||||
|
if (a.pattern && a.val && !new RegExp(a.pattern).test(a.val))
|
||||||
|
out.push(`${p.name}: ${o.label} value must be ${hint(a.pattern)}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import favicon from '$lib/assets/favicon.svg';
|
||||||
|
|
||||||
|
let { children } = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<link rel="icon" href={favicon} />
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
|
{@render children()}
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { ArgEval } from '$lib/meow';
|
||||||
|
import { Program, type ProgramConfig, findConflicts, findInvalidArgs } from '$lib/programs';
|
||||||
|
import {
|
||||||
|
gamescope,
|
||||||
|
mangoHud,
|
||||||
|
protonGE,
|
||||||
|
protonCachyOS,
|
||||||
|
obsGameCapture,
|
||||||
|
gameMode,
|
||||||
|
mesaLayers,
|
||||||
|
prime
|
||||||
|
} from '$lib/presets';
|
||||||
|
import ProgramForm from '$lib/ProgramForm.svelte';
|
||||||
|
import { applyCommand } from '$lib/decode';
|
||||||
|
|
||||||
|
const STORAGE_KEY = 'steam-launch-args.v1';
|
||||||
|
|
||||||
|
function defaultPrograms(): ProgramConfig[] {
|
||||||
|
return [
|
||||||
|
gamescope(),
|
||||||
|
mangoHud(),
|
||||||
|
protonGE(),
|
||||||
|
protonCachyOS(),
|
||||||
|
obsGameCapture(),
|
||||||
|
gameMode(),
|
||||||
|
mesaLayers(),
|
||||||
|
prime()
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Align a stored snapshot onto the current preset shapes: stored values win
|
||||||
|
* where they exist, preset additions (new programs/options/args) fill gaps.
|
||||||
|
*/
|
||||||
|
function mergeStored(stored: ProgramConfig[], defaults: ProgramConfig[]): ProgramConfig[] {
|
||||||
|
return defaults.map((d) => {
|
||||||
|
const s = stored.find((x) => x.name === d.name);
|
||||||
|
if (!s) return d;
|
||||||
|
const out = structuredClone(d);
|
||||||
|
out.enabled = s.enabled ?? d.enabled;
|
||||||
|
out.name = s.name ?? d.name;
|
||||||
|
out.binary = s.binary ?? d.binary;
|
||||||
|
out.prefix = s.prefix ?? d.prefix;
|
||||||
|
out.suffix = s.suffix ?? d.suffix;
|
||||||
|
out.priority = s.priority ?? d.priority;
|
||||||
|
for (const o of out.options ?? []) {
|
||||||
|
let so = s.options?.find((x) => x.label === o.label);
|
||||||
|
if (!so) {
|
||||||
|
// legacy flag-group options ('Filter: fsr' → 'Filter' dropdown)
|
||||||
|
const legacy = s.options?.find((x) => x.enabled && x.label.startsWith(o.label + ': '));
|
||||||
|
if (legacy) {
|
||||||
|
const v = legacy.args?.[0]?.val;
|
||||||
|
if (v && o.args?.[0]?.values?.includes(v)) o.args[0].val = v;
|
||||||
|
so = legacy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!so) continue; // new preset option → keep default (disabled)
|
||||||
|
o.enabled = so.enabled ?? o.enabled;
|
||||||
|
for (const a of o.args ?? []) {
|
||||||
|
const sa = so.args?.find((x) => x.arg === a.arg);
|
||||||
|
if (sa && sa.val !== undefined) a.val = sa.val;
|
||||||
|
}
|
||||||
|
for (const e of o.envs ?? []) {
|
||||||
|
const se = so.envs?.find((x) => x.var === e.var);
|
||||||
|
if (se && se.val !== undefined) e.val = se.val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadPrograms(): ProgramConfig[] {
|
||||||
|
if (typeof localStorage === 'undefined') return defaultPrograms();
|
||||||
|
try {
|
||||||
|
const raw = localStorage.getItem(STORAGE_KEY);
|
||||||
|
if (raw) {
|
||||||
|
const parsed = JSON.parse(raw);
|
||||||
|
if (Array.isArray(parsed) && parsed.length > 0)
|
||||||
|
return mergeStored(parsed, defaultPrograms());
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// corrupted storage → defaults
|
||||||
|
}
|
||||||
|
return defaultPrograms();
|
||||||
|
}
|
||||||
|
|
||||||
|
let programs = $state<ProgramConfig[]>(loadPrograms());
|
||||||
|
$effect(() => {
|
||||||
|
// persist every change; guarded for SSR/prerender
|
||||||
|
if (typeof localStorage !== 'undefined') {
|
||||||
|
localStorage.setItem(STORAGE_KEY, JSON.stringify(programs));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let active = $state(0);
|
||||||
|
|
||||||
|
const result = $derived(new ArgEval(programs.map((p) => new Program(p))).eval());
|
||||||
|
const conflicts = $derived(findConflicts(programs));
|
||||||
|
const invalid = $derived(findInvalidArgs(programs));
|
||||||
|
|
||||||
|
let copied = $state(false);
|
||||||
|
async function copyCmd() {
|
||||||
|
await navigator.clipboard.writeText(result);
|
||||||
|
copied = true;
|
||||||
|
setTimeout(() => (copied = false), 1500);
|
||||||
|
}
|
||||||
|
|
||||||
|
let decodeText = $state('');
|
||||||
|
let decodeUnmatched = $state<string[]>([]);
|
||||||
|
function applyDecode() {
|
||||||
|
decodeUnmatched = applyCommand(decodeText, programs);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<h1>Steam Launch Args</h1>
|
||||||
|
|
||||||
|
<div class="resultrow">
|
||||||
|
<pre class="result">{result}</pre>
|
||||||
|
<button onclick={copyCmd}>{copied ? 'Copied!' : 'Copy'}</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tabs">
|
||||||
|
{#each programs as p, i (i)}
|
||||||
|
<button class:active={active === i} class:disabled={!p.enabled} onclick={() => (active = i)}>
|
||||||
|
{p.name}
|
||||||
|
</button>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#if programs[active]}
|
||||||
|
<ProgramForm config={programs[active]} />
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{#if conflicts.length > 0 || invalid.length > 0}
|
||||||
|
<ul class="conflicts">
|
||||||
|
{#each conflicts as c (c.from + c.with)}
|
||||||
|
<li>⚠ {c.from} conflicts with {c.with}</li>
|
||||||
|
{/each}
|
||||||
|
{#each invalid as m (m)}
|
||||||
|
<li>⚠ {m}</li>
|
||||||
|
{/each}
|
||||||
|
</ul>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Decode a command into options</summary>
|
||||||
|
<textarea
|
||||||
|
bind:value={decodeText}
|
||||||
|
rows="3"
|
||||||
|
placeholder="Paste a Steam launch command, e.g. MANGOHUD=1 gamescope -f -r 165 -- %command%"
|
||||||
|
></textarea>
|
||||||
|
<div class="decrow">
|
||||||
|
<button onclick={applyDecode}>Apply</button>
|
||||||
|
{#if decodeUnmatched.length > 0}
|
||||||
|
<span class="unmatched">Unrecognized: {decodeUnmatched.join(' ')}</span>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
:root {
|
||||||
|
background-color: gray;
|
||||||
|
}
|
||||||
|
.tabs {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.25em;
|
||||||
|
align-items: center;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
.tabs button.disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
.tabs button {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
button.active {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.conflicts {
|
||||||
|
color: #ff8a80;
|
||||||
|
font-weight: bold;
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.resultrow {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 0.5em;
|
||||||
|
}
|
||||||
|
.resultrow button {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
textarea {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
.decrow {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5em;
|
||||||
|
}
|
||||||
|
.unmatched {
|
||||||
|
color: #ff8a80;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.resultrow pre {
|
||||||
|
margin: 0;
|
||||||
|
min-width: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
.result {
|
||||||
|
font-size: 1.2em;
|
||||||
|
background: #222;
|
||||||
|
color: #7f7;
|
||||||
|
padding: 0.5em;
|
||||||
|
border-radius: 4px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-word;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export const prerender = true;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# allow crawling everything by default
|
||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
@@ -0,0 +1,658 @@
|
|||||||
|
# Steam Tinker Launch — Env Vars & Program Arguments Reference
|
||||||
|
|
||||||
|
Source: `sonic2kk/steamtinkerlaunch` (single bash script, ~27,000 lines, v14.0.20250602).
|
||||||
|
|
||||||
|
## 1. Environment Variables Set by STL
|
||||||
|
|
||||||
|
### 1.1 Game Launch Time (most important)
|
||||||
|
|
||||||
|
| Variable | Set When | Value |
|
||||||
|
| ---------------------------------- | ------------------------------------------------- | ----------------------------------------- |
|
||||||
|
| `MANGOHUD` | `USEMANGOHUD=1` + `MAHUVAR=1` | `1` |
|
||||||
|
| `MANGOHUD_CONFIG` | `USEMANGOHUD=1` + `MAHUARGS` non-empty | `$MAHUARGS` |
|
||||||
|
| `MANGOHUD_CONFIGFILE` | `USEMANGOHUD=1` + `MHIC` set | `$MHIC` |
|
||||||
|
| `LD_PRELOAD` | `USEMANGOHUD=1` + `LDPMAHU=1` | `$LD_PRELOAD $MAHUBIN` |
|
||||||
|
| `DXVK_FRAME_RATE` | `USEDXVKFRL=1` | `$DXVK_FPSLIMIT` |
|
||||||
|
| `DXVK_HDR` | `DXVKHDR=1` | `1` |
|
||||||
|
| `DXVK_CONFIG_FILE` | `DXVKCFG`/`DXDLSSCFG` set | `$STLDXVKCFG` or `$DXDLSSCFG` |
|
||||||
|
| `PROTON_ENABLE_NVAPI` | `USENVAPI=1` | `1` |
|
||||||
|
| `PROTON_HIDE_NVIDIA_GPU` | `USENVAPI=1` | `0` |
|
||||||
|
| `WINEDEBUG` | `USEWINEDEBUG` set | `$STLWINEDEBUG` |
|
||||||
|
| `WINEDLLOVERRIDES` | `USEWINEDLLOVERRIDES` set | `$WINEDLLOVERRIDES;$STLWINEDLLOVERRIDES` |
|
||||||
|
| `WINEESYNC` | `ENABLE_WINESYNC=1` | `0` |
|
||||||
|
| `WINEFSYNC` | `ENABLE_WINESYNC=1` | `0` |
|
||||||
|
| `WINEFSYNC_FUTEX2` | `ENABLE_WINESYNC=1` | `0` |
|
||||||
|
| `__NV_PRIME_RENDER_OFFLOAD` | `USEPRIMERUN=1` | `1` |
|
||||||
|
| `__VK_LAYER_NV_optimus` | `USEPRIMERUN=1` | `NVIDIA_only` |
|
||||||
|
| `__GLX_VENDOR_LIBRARY_NAME` | `USEPRIMERUN=1` → `nvidia` / `USEZINK=1` → `mesa` | `nvidia` or `mesa` |
|
||||||
|
| `VK_ICD_FILENAMES` | `USEPRIMERUN=1` | `/usr/share/vulkan/icd.d/nvidia_icd.json` |
|
||||||
|
| `MESA_LOADER_DRIVER_OVERRIDE` | `USEZINK=1` | `zink` |
|
||||||
|
| `GALLIUM_DRIVER` | `USEZINK=1` | `zink` |
|
||||||
|
| `SDL_VIDEODRIVER` | `SDLUSEWAYLAND=1` | `wayland` |
|
||||||
|
| `ENABLE_GAMESCOPE_WSI` | `USEGAMESCOPE=1` + `USEGAMESCOPEWSI=1` | `1` |
|
||||||
|
| `RADV_PERFTEST` | `STLRAD_PFTST` set | `$STLRAD_PFTST` |
|
||||||
|
| `ENABLE_<PP>` | `VULKANPOSTPROCESSOR` set (e.g. `ENABLE_FSR=1`) | `1` |
|
||||||
|
| `LC_ALL` | Always | `$LANG` |
|
||||||
|
| `PULSE_LATENCY_MSEC` | `STL_PULSE_LATENCY_MSEC` set | `$STL_PULSE_LATENCY_MSEC` |
|
||||||
|
| `DOTNET_ROOT` | Vortex mod manager | `$VTX_DOTNET_ROOT` |
|
||||||
|
| `DOTNET_BUNDLE_EXTRACT_BASE_DIR` | Vortex mod manager | `$VTX_DOTNET_ROOT` |
|
||||||
|
| `ONSTEAMDECK` | Detected Steam Deck | `1` |
|
||||||
|
| `STEAM_COMPAT_CLIENT_INSTALL_PATH` | `$SROOT` set | `$SROOT` |
|
||||||
|
| `STEAM_COMPAT_INSTALL_PATH` | `$MEGAMEDIR` / `$EFD` / `$STLDLDIR` | depending on game path |
|
||||||
|
| `STEAM_COMPAT_DATA_PATH` | `$STL_COMPAT_DATA_PATH` / `$DESTCODA` | wine prefix |
|
||||||
|
| `STEAM_COMPAT_APP_ID` | `$DPRS` / `$EUNID` | app id |
|
||||||
|
| `SteamAppId` | Same as above | `$STEAM_COMPAT_APP_ID` |
|
||||||
|
| `STEAM_COMPAT_TOOL_PATHS` | Custom SLR / tool paths | colon-joined paths |
|
||||||
|
| `STEAM_COMPAT_LIBRARY_PATHS` | Set before game launch | |
|
||||||
|
| `STEAM_COMPAT_MOUNTS` | Set before game launch | |
|
||||||
|
| `VRPGWINXIS` | Game window XID | `$GAMEWINXID` |
|
||||||
|
|
||||||
|
### 1.2 VKD3D Configuration
|
||||||
|
|
||||||
|
| Variable | Set When | Value |
|
||||||
|
| -------------------------- | ---------------------------------------- | ------------------------------- |
|
||||||
|
| `VKD3D_CONFIG` | `USERAYTRACING=1` or `$STL_VKD3D_CONFIG` | `dxr11` or `$STL_VKD3D_CONFIG` |
|
||||||
|
| `VKD3D_DEBUG` | `$STL_VKD3D_DEBUG` set | `$STL_VKD3D_DEBUG` |
|
||||||
|
| `VKD3D_SHADER_DEBUG` | `$STL_VKD3D_SHADER_DEBUG` set | `$STL_VKD3D_SHADER_DEBUG` |
|
||||||
|
| `VKD3D_LOG_FILE` | `$STL_VKD3D_LOG_FILE` set | `$STL_VKD3D_LOG_FILE` |
|
||||||
|
| `VKD3D_VULKAN_DEVICE` | `$STL_VKD3D_VULKAN_DEVICE` set | `$STL_VKD3D_VULKAN_DEVICE` |
|
||||||
|
| `VKD3D_FILTER_DEVICE_NAME` | `$STL_VKD3D_FILTER_DEVICE_NAME` set | `$STL_VKD3D_FILTER_DEVICE_NAME` |
|
||||||
|
| `VKD3D_DISABLE_EXTENSIONS` | `$STL_VKD3D_DISABLE_EXTENSIONS` set | `$STL_VKD3D_DISABLE_EXTENSIONS` |
|
||||||
|
| `VKD3D_TEST_DEBUG` | `$STL_VKD3D_TEST_DEBUG` set | `$STL_VKD3D_TEST_DEBUG` |
|
||||||
|
| `VKD3D_TEST_FILTER` | `$STL_VKD3D_TEST_FILTER` set | `$STL_VKD3D_TEST_FILTER` |
|
||||||
|
| `VKD3D_TEST_EXCLUDE` | `$STL_VKD3D_TEST_EXCLUDE` set | `$STL_VKD3D_TEST_EXCLUDE` |
|
||||||
|
| `VKD3D_TEST_PLATFORM` | `$STL_VKD3D_TEST_PLATFORM` set | `$STL_VKD3D_TEST_PLATFORM` |
|
||||||
|
| `VKD3D_TEST_BUG` | `$STL_VKD3D_TEST_BUG` set | `$STL_VKD3D_TEST_BUG` |
|
||||||
|
| `VKD3D_PROFILE_PATH` | `$STL_VKD3D_PROFILE_PATH` set | `$STL_VKD3D_PROFILE_PATH` |
|
||||||
|
|
||||||
|
### 1.3 Wine Configuration
|
||||||
|
|
||||||
|
| Variable | Set When | Value |
|
||||||
|
| ------------ | -------------- | ------------------------- |
|
||||||
|
| `WINE` | `extWine64Run` | `$RUNWINE` |
|
||||||
|
| `WINEARCH` | `extWine64Run` | `win64` or `$RUNWINEARCH` |
|
||||||
|
| `WINEPREFIX` | `extWine64Run` | `$GPFX` or `$GWFX` |
|
||||||
|
|
||||||
|
## 2. Program Arguments Built
|
||||||
|
|
||||||
|
### 2.1 Command Chain (FINALSTARTCMD)
|
||||||
|
|
||||||
|
The final launch command is built by `buildCustomCmdLaunch`:
|
||||||
|
|
||||||
|
```
|
||||||
|
FINALSTARTCMD = [ GMR?, GSC?, GAMESCOPEARGSARR?, OBSC?, MAHUBIN?, --dlsym? ] + [SLRCMD?] + [EXTSTARTCMD] + [PROTSTARTCMD] + [GAMESTARTCMD] + [GAMEARGSARR]
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2.2 Components
|
||||||
|
|
||||||
|
| Component | Set By | Value |
|
||||||
|
| ------------------------------ | ---------------------------------------------------------------- | --------------------------------- |
|
||||||
|
| `GMR` (GameMode) | `USEGAMEMODERUN=1` | `$(command -v gamemoderun)` |
|
||||||
|
| `GSC` (GameScope) | `USEGAMESCOPE=1` | `$(command -v gamescope)` |
|
||||||
|
| `GAMESCOPEARGSARR` | `gameScopeArgs "$GAMESCOPE_ARGS"` | parsed args from `GAMESCOPE_ARGS` |
|
||||||
|
| `OBSC` (OBS capture) | `USEOBSCAP=1` | `$(command -v obs-gamecapture)` |
|
||||||
|
| `MAHUBIN` (MangoHud) | `USEMANGOHUD=1` + `LDPMAHU=0` | `$(command -v mangohud)` |
|
||||||
|
| `--dlsym` | `MAHUDLSYM=1` | literal flag appended to MangoHud |
|
||||||
|
| `SLRCMD` (Steam Linux Runtime) | `setSLRReap` | SLR command array |
|
||||||
|
| `EXTSTARTCMD` | `setBoxtronCmd`/`setRobertaCmd`/`setLuxtorpedaCmd`/`setLinuxCmd` | game-specific command |
|
||||||
|
|
||||||
|
### 2.3 Proton Command (`PROTSTARTCMD`)
|
||||||
|
|
||||||
|
Built by `setProtonCmd`:
|
||||||
|
|
||||||
|
```
|
||||||
|
PROTSTARTCMD = ( "$RUNPROTON" "$WFEAR" ) + GAMESTARTCMD
|
||||||
|
```
|
||||||
|
|
||||||
|
Where:
|
||||||
|
|
||||||
|
- `$RUNPROTON` = path to proton binary
|
||||||
|
- `$WFEAR` = `waitforexitandrun`
|
||||||
|
|
||||||
|
### 2.4 Wine Command
|
||||||
|
|
||||||
|
Built by `setWineCmd`:
|
||||||
|
|
||||||
|
```
|
||||||
|
WINE=<proton-path>/bin/wine WINEARCH=win64 WINEDEBUG=<debug> WINEPREFIX=<prefix> <wine> <game-cmd>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2.5 Game Command (`GAMESTARTCMD`)
|
||||||
|
|
||||||
|
- Windows games: `$EFD/$GAMEEXE` (game exe path)
|
||||||
|
- Native games: `$GAMERUN` or user-specified binary
|
||||||
|
- Custom program: `$CUSTOMCMD` (with optional `$WICO` for Windows binaries)
|
||||||
|
- Luxtorpeda: `"$LUXTORPEDACMD" "$LUXTORPEDAARGS" "$LUXEXE"`
|
||||||
|
- Boxtron: `"$BOXTRONCMD" "$BOXTRONARGS" "$BOXTRONEXE"`
|
||||||
|
- Roberta: `"$ROBERTACMD" "$ROBERTAARGS" "$ROBERTAEXE"`
|
||||||
|
|
||||||
|
### 2.6 Game Arguments (`GAMEARGSARR`)
|
||||||
|
|
||||||
|
- `GAMEARGS` from user config
|
||||||
|
- `HARDARGS` from user config (hardcoded overrides)
|
||||||
|
- `SORTGARGS=1` → prepend Steam-provided args (`SLOARGS`)
|
||||||
|
- `GAMEARGS` can be set to `"none"` (disabled)
|
||||||
|
- `-dx12` appended when `USERAYTRACING=1`
|
||||||
|
|
||||||
|
## 3. GameScope Arguments
|
||||||
|
|
||||||
|
Parsed from `GAMESCOPE_ARGS` config. Examples:
|
||||||
|
|
||||||
|
- `--width 1280 --height 720`
|
||||||
|
- `--fs` (fullscreen)
|
||||||
|
- `--expose-wayland`
|
||||||
|
- `--immersive`
|
||||||
|
|
||||||
|
Always ends with `--` (required by GameScope).
|
||||||
|
|
||||||
|
## 4. MangoHud
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------------- | --------------- | ------------------------------- |
|
||||||
|
| Enable | `USEMANGOHUD=1` | |
|
||||||
|
| Config string | `MAHUARGS` | Passed to `MANGOHUD_CONFIG` |
|
||||||
|
| Config file | `MHIC` | Passed to `MANGOHUD_CONFIGFILE` |
|
||||||
|
| Var mode | `MAHUVAR=1` | Sets `MANGOHUD=1` only |
|
||||||
|
| Binary preload | `LDPMAHU=1` | Sets `LD_PRELOAD=$MAHUBIN` |
|
||||||
|
| Dlsym mode | `MAHUDLSYM=1` | Appends `--dlsym` to MangoHud |
|
||||||
|
|
||||||
|
## 5. DXVK
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ----------- | --------------------- | -------------------------------------------------------- |
|
||||||
|
| HDR | `DXVKHDR=1` | Sets `DXVK_HDR=1` |
|
||||||
|
| Frame limit | `USEDXVKFRL=1` | Sets `DXVK_FRAME_RATE=$DXVK_FPSLIMIT` |
|
||||||
|
| Config file | `DXVKCFG`/`DXDLSSCFG` | Sets `DXVK_CONFIG_FILE` |
|
||||||
|
| NVAPI | `USENVAPI=1` | Sets `PROTON_ENABLE_NVAPI=1`, `PROTON_HIDE_NVIDIA_GPU=0` |
|
||||||
|
|
||||||
|
## 6. Vulkan Post-Processors
|
||||||
|
|
||||||
|
| Processor | Env Var |
|
||||||
|
| --------- | ------------------- |
|
||||||
|
| FSR | `ENABLE_FSR=1` |
|
||||||
|
| DLSS | `USEDLSS=1` |
|
||||||
|
| VKBasalt | `ENABLE_VKBASALT=1` |
|
||||||
|
|
||||||
|
## 7. GameMode
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------- | ------------------ | -------------------------------- |
|
||||||
|
| Enable | `USEGAMEMODERUN=1` | Prepends `gamemoderun` to launch |
|
||||||
|
|
||||||
|
## 8. Custom Program (CustomCMD)
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------------- | ---------------------- | ------------------------------------------- |
|
||||||
|
| Enable | `CUSTOMCMD` set | User-specified executable |
|
||||||
|
| Force Wine | `CUSTOMCMDFORCEWIN=1` | Force Wine/Proton wrapper |
|
||||||
|
| External progs | `EXTPROGS_CUSTOMCMD=1` | Apply MangoHud/GameScope to custom program |
|
||||||
|
| Fork | `FORK_CUSTOMCMD=1` | Fork process in background |
|
||||||
|
| Only custom | `ONLY_CUSTOMCMD=1` | Skip game, run only custom command |
|
||||||
|
| Wait | `WAITFORCUSTOMCMD=N` | Wait N seconds for custom command to start |
|
||||||
|
| Use SLR | `CUSTOMCMD_USESLR=1` | Use Steam Linux Runtime with custom command |
|
||||||
|
|
||||||
|
## 9. Conty (Containerized Wine)
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------------ | ------------ | --------------------------- |
|
||||||
|
| Enable | `USECONTY=1` | |
|
||||||
|
| Binary | `RUNCONTY` | `$CONTYDLDIR/$CONTY` |
|
||||||
|
| Pick Conty | `PICKCONT` | user-specified Conty binary |
|
||||||
|
| Custom Conty | `CUSTCONTY` | user-specified Conty binary |
|
||||||
|
|
||||||
|
Launches as: `"$RUNCONTY" "${RUNCMD[@]}"`
|
||||||
|
|
||||||
|
## 10. Mod Organizer 2 (MO2)
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------- | --------- | ------------------------------- |
|
||||||
|
| Mode | `MO2MODE` | `disabled` / `enabled` / `auto` |
|
||||||
|
| MO2 exe | `GMO2EXE` | Path to MO2 executable |
|
||||||
|
| MO2 path | `MO2PATH` | Path to MO2 installation |
|
||||||
|
|
||||||
|
Launches MO2 with: `STEAM_COMPAT_CLIENT_INSTALL_PATH=... STEAM_COMPAT_DATA_PATH=... $RUNPROTON run ${MO}.exe -i $MYINST $1`
|
||||||
|
|
||||||
|
## 11. Vortex Mod Manager
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------------ | ----------------- | ------------------------------------------------------- |
|
||||||
|
| Enable | `USEVORTEX=1` | |
|
||||||
|
| Setup | `VORTEXSETUP` | |
|
||||||
|
| Download dir | `VORTEXDLDIR` | |
|
||||||
|
| .NET root | `VTX_DOTNET_ROOT` | Sets `DOTNET_ROOT` and `DOTNET_BUNDLE_EXTRACT_BASE_DIR` |
|
||||||
|
| VPath | `VSPATH` | `$VORTEXDLDIR/$VORTEXSETUP` |
|
||||||
|
|
||||||
|
## 12. Shader Management
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ---------- | -------------- | ------------------------------ |
|
||||||
|
| Shader dir | `SHADDESTDIR` | Default shader destination |
|
||||||
|
| Repos | `SHADERREPOS` | Shader repository URLs |
|
||||||
|
| Update | `SHADERUPDATE` | `1` = update shaders on launch |
|
||||||
|
|
||||||
|
## 13. Network/Internet Blocking
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------------- | ----------------- | --------------------------------- |
|
||||||
|
| Block internet | `BLOCKINTERNET=1` | Uses `unshare -n -r` to namespace |
|
||||||
|
| `BLOCKCMD` | `unshare` | |
|
||||||
|
| `BLOCKARGS` | `-n -r` | Network + user namespace |
|
||||||
|
|
||||||
|
## 14. Wine Debug
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------------- | --------------------- | ------------------------ |
|
||||||
|
| Debug channels | `STLWINEDEBUG` | e.g. `+relay,+timestamp` |
|
||||||
|
| DLL overrides | `STLWINEDLLOVERRIDES` | e.g. `dxvk=n:d3d11` |
|
||||||
|
|
||||||
|
## 15. Game Window Management
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------------ | ------------- | ------------------------- |
|
||||||
|
| Window name | `GAMEWINDOW` | X11 window name to target |
|
||||||
|
| Window XID | `GAMEWINXID` | X11 window XID |
|
||||||
|
| `VRPGWINXIS` | `$GAMEWINXID` | Used for VR games |
|
||||||
|
|
||||||
|
## 16. Steam Deck Specific
|
||||||
|
|
||||||
|
| Setting | Variable | Value |
|
||||||
|
| ----------- | --------------------- | ----- |
|
||||||
|
| Detected | `ONSTEAMDECK` | `1` |
|
||||||
|
| Was update | `STEAMDECKWASUPDATE` | `0` |
|
||||||
|
| Did install | `STEAMDECKDIDINSTALL` | `1` |
|
||||||
|
| Steam Run | `STEAMDECKSTEAMRUN` | `0` |
|
||||||
|
|
||||||
|
## 17. Game Files
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| --------- | ------------ | ------------------------- |
|
||||||
|
| Game dir | `$EFD` | Executable file directory |
|
||||||
|
| Game exe | `$GAMEEXE` | Game executable name |
|
||||||
|
| Game path | `$GP` | Absolute game path |
|
||||||
|
| Mega dir | `$MEGAMEDIR` | Game install directory |
|
||||||
|
|
||||||
|
## 18. Proton
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| --------------- | ----------------------- | --------------------------- |
|
||||||
|
| Use proton | `USEPROTON` | Proton version string |
|
||||||
|
| Proton bin | `$PROTBIN` | Path to proton binary |
|
||||||
|
| Compat data | `$STL_COMPAT_DATA_PATH` | Wine prefix path |
|
||||||
|
| PFX | `$GPFX` | `$STL_COMPAT_DATA_PATH/pfx` |
|
||||||
|
| Run proton | `RUNPROTON` | Full proton command |
|
||||||
|
| Run wine server | `RUNWINESERVER` | `run_wine_server` path |
|
||||||
|
| Proton version | `PROTONVERSION` | Version string |
|
||||||
|
|
||||||
|
## 19. Winetricks
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------------- | ---------------- | -------------------------- |
|
||||||
|
| Run winetricks | `RUNWINETRICKS` | Winetricks commands to run |
|
||||||
|
| Winetricks bin | `$SYSWINETRICKS` | `winetricks` path |
|
||||||
|
|
||||||
|
## 20. GDB Debugging
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ---------- | ------------ | --------------- |
|
||||||
|
| GDB run | `GDBGAMERUN` | GDB script path |
|
||||||
|
| GDB script | `GDBRUN` | GDB script |
|
||||||
|
| Run GDB | `RUN_GDB=1` | Enable GDB |
|
||||||
|
|
||||||
|
## 21. VR
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------------- | -------------- | --------------------------- |
|
||||||
|
| VR init | `VRINITLOCK` | VR initialization lock file |
|
||||||
|
| VR init result | `VRINITRESULT` | VR init result file |
|
||||||
|
|
||||||
|
## 22. One-Time Run
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------------ | ------------ | ------------------- |
|
||||||
|
| One-time run | `USEONERT=1` | |
|
||||||
|
| Custom path | `OPCUSTPATH` | Custom program path |
|
||||||
|
|
||||||
|
## 23. Standalone Proton
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ----------------- | ----------------------- | ---------------------- |
|
||||||
|
| Use standalone | `USESTANDALONEPROTON=1` | |
|
||||||
|
| Standalone proton | `$STLPROTDIR` | STL-managed proton dir |
|
||||||
|
|
||||||
|
## 24. GameScope Args
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------------- | ---------------- | ------------------------------ |
|
||||||
|
| GameScope args | `GAMESCOPE_ARGS` | Space-separated args |
|
||||||
|
| MangoApp | `USEMANGOAPP=1` | Uses MangoHud App (Steam Deck) |
|
||||||
|
|
||||||
|
## 25. DXVK HUD
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------- | ---------- | -------------------- |
|
||||||
|
| DXVK HUD | `DXVK_HUD` | HUD elements to show |
|
||||||
|
|
||||||
|
## 26. Game Scope
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------------- | ------------------- | --------------------------- |
|
||||||
|
| GameScope | `USEGAMESCOPE=1` | Enable GameScope |
|
||||||
|
| GameScope WSI | `USEGAMESCOPEWSI=1` | Enable GameScope WSI |
|
||||||
|
| GameScope fix | `FIXGAMESCOPE=1` | Fix GameScope on Steam Deck |
|
||||||
|
|
||||||
|
## 27. OBS Capture
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ----------- | ------------- | ----------------------- |
|
||||||
|
| OBS capture | `USEOBSCAP=1` | Enable OBS game capture |
|
||||||
|
|
||||||
|
## 28. Vulkan Post Processor
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| --------- | --------------------- | ------------------- |
|
||||||
|
| Vulkan PP | `VULKANPOSTPROCESSOR` | Post-processor name |
|
||||||
|
|
||||||
|
## 29. SDL Wayland
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ----------- | ----------------- | ------------------------ |
|
||||||
|
| SDL Wayland | `SDLUSEWAYLAND=1` | Force SDL to use Wayland |
|
||||||
|
|
||||||
|
## 30. Wine DPI Scaling
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------- | --------- | ----------------- |
|
||||||
|
| Wine DPI | `WINEDPI` | DPI scaling value |
|
||||||
|
|
||||||
|
## 3. GameScope CLI Arguments
|
||||||
|
|
||||||
|
Parsed from `GAMESCOPE_ARGS` config string. Always ends with `--`.
|
||||||
|
|
||||||
|
### 3.1 General Options
|
||||||
|
|
||||||
|
| Flag | Description | Type |
|
||||||
|
| ---------------------------- | ---------------------------------------------- | ---------------------- |
|
||||||
|
| `-W <width>` | Show resolution width | number |
|
||||||
|
| `-H <height>` | Show resolution height | number |
|
||||||
|
| `-w <width>` | Internal resolution width (what games see) | number |
|
||||||
|
| `-h <height>` | Internal resolution height | number |
|
||||||
|
| `-r <fps>` | Focused frame rate limit | 30/60/90/120/unlimited |
|
||||||
|
| `-o <fps>` | Unfocused frame rate limit | 30/60/90/120/unlimited |
|
||||||
|
| `-f` | Fullscreen | bool |
|
||||||
|
| `-b` | Borderless window | bool |
|
||||||
|
| `-e` | Steam integration (fixes peripheral bugs) | bool |
|
||||||
|
| `--force-windows-fullscreen` | Force windows fullscreen inside nested display | bool |
|
||||||
|
| `--force-grab-cursor` | Keep cursor inside GameScope nested display | bool |
|
||||||
|
| `-g` | Force grab keyboard | bool |
|
||||||
|
| `--force-orientation <dir>` | Orientation (left/right/normal/upsidedown) | dropdown |
|
||||||
|
| `--cursor <path>` | Custom cursor image | file picker |
|
||||||
|
| `-s <float>` | Mouse sensitivity | number (default 1.0) |
|
||||||
|
|
||||||
|
### 3.2 Filtering & Scaling Options
|
||||||
|
|
||||||
|
**New filter mode (GameScope ≥3.11):**
|
||||||
|
|
||||||
|
| Flag | Description | Type |
|
||||||
|
| ------------- | ----------------------------------------------- | -------- |
|
||||||
|
| `-F <filter>` | Filter (none/linear/nearest/fsr/nis/pixel) | dropdown |
|
||||||
|
| `-S <scale>` | Scale mode (none/auto/integer/fit/fill/stretch) | dropdown |
|
||||||
|
|
||||||
|
**Legacy filter mode (older GameScope):**
|
||||||
|
|
||||||
|
| Flag | Description | Type |
|
||||||
|
| ----------------------- | ------------------------------------------- | ------ |
|
||||||
|
| `-i` | Integer scaling | bool |
|
||||||
|
| `-n` | Nearest neighbor filtering | bool |
|
||||||
|
| `-U <fsr>` | FSR 1.0 upscaling | bool |
|
||||||
|
| `-Y` | NVIDIA Image Scaling v1.0.3 | bool |
|
||||||
|
| `--fsr-sharpness <int>` | FSR sharpness (0-20, default 2) | number |
|
||||||
|
| `-m <int>` | Max scale factor (Steam Deck defaults to 2) | number |
|
||||||
|
|
||||||
|
### 3.3 HDR Options
|
||||||
|
|
||||||
|
| Flag | Description | Type |
|
||||||
|
| --------------------------- | --------------------------------------- | ------ |
|
||||||
|
| `--hdr-enabled` | Enable HDR | bool |
|
||||||
|
| `--hdr-wide-gammut-for-sdr` | Wide gammut for SDR | bool |
|
||||||
|
| `--hdr-sdr-content-nits` | SDR content nits (default 400) | number |
|
||||||
|
| `--hdr-itm-enable` | Inverse tone mapping enabled | bool |
|
||||||
|
| `--hdr-itm-sdr-nits` | ITM SDR nits (0-1000, default 100) | number |
|
||||||
|
| `--hdr-itm-target-nits` | ITM target nits (0-10000, default 1000) | number |
|
||||||
|
|
||||||
|
### 3.4 VR Options
|
||||||
|
|
||||||
|
| Flag | Description | Type |
|
||||||
|
| ------------------------------------------ | -------------------------------------- | ----------- |
|
||||||
|
| `--openvr` | Enable OpenVR | bool |
|
||||||
|
| `--vr-overlay-explicit-name <str>` | SteamVR explicit name | text |
|
||||||
|
| `--vr-overlay-default-name <str>` | SteamVR default name | text |
|
||||||
|
| `--vr-overlay-key <str>` | SteamVR overlay key string | text |
|
||||||
|
| `--vr-overlay-icon <path>` | SteamVR overlay icon | file picker |
|
||||||
|
| `--vr-overlay-show-immediately` | Show VR overlay immediately | bool |
|
||||||
|
| `--vr-overlay-enable-control-bar` | Enable SteamVR control bar | bool |
|
||||||
|
| `--vr-overlay-enable-control-bar-keyboard` | Enable keyboard button on control bar | bool |
|
||||||
|
| `--vr-overlay-enable-control-bar-close` | Enable close button on control bar | bool |
|
||||||
|
| `--vr-scrolls-speed <float>` | VR trackpad scroll speed (default 8.0) | number |
|
||||||
|
| `--vr-overlay-modal` | Show SteamVR overlay as modal | bool |
|
||||||
|
|
||||||
|
### 3.5 Embedded & Display Options
|
||||||
|
|
||||||
|
| Flag | Description | Type |
|
||||||
|
| ----------------------------- | ------------------------------------------------------------------------- | -------- |
|
||||||
|
| `--default-touch-mode <mode>` | Default touch action (hover/leftclick/rightclick/middleclick/passthrough) | dropdown |
|
||||||
|
| `--immediate-flips` | Enable immediate flips (tearing allowed) | bool |
|
||||||
|
| `--adaptive-sync` | Enable adaptive sync / VRR | bool |
|
||||||
|
| `-O <outputs>` | Preferred GameScope output(s) | text |
|
||||||
|
| `--generate-drm-mode <mode>` | DRM mode generation (default/cvt/fixed) | dropdown |
|
||||||
|
|
||||||
|
### 3.6 Advanced Options
|
||||||
|
|
||||||
|
| Flag | Description | Type |
|
||||||
|
| --------------------------- | ---------------------------------------------- | ----------- |
|
||||||
|
| `--stats-path <path>` | Path to write GameScope statistics | file picker |
|
||||||
|
| `--backend <backend>` | Backend (auto/sdl/wayland/drm/headless/openvr) | dropdown |
|
||||||
|
| `-C <ms>` | Cursor hide delay in milliseconds | number |
|
||||||
|
| `--force-composition` | Disable direct scan-out | bool |
|
||||||
|
| `--debug-hud` | Draw debug HUD | bool |
|
||||||
|
| `--hdr-debug-force-support` | Force HDR support flag | bool |
|
||||||
|
| `--hdr-debug-force-output` | Force HDR output on display | bool |
|
||||||
|
| `--prefer-vk-device` | Prefer Vulkan device for compositing | bool |
|
||||||
|
| `--expose-wayland` | Expose Wayland | bool |
|
||||||
|
| `--rt` | Realtime scheduling | bool |
|
||||||
|
| `--headless` | Headless mode | bool |
|
||||||
|
|
||||||
|
## 4. MangoHud CLI Arguments
|
||||||
|
|
||||||
|
### 4.1 Launch Command
|
||||||
|
|
||||||
|
```
|
||||||
|
$mangohud [--dlsym] <game_command>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4.2 Configuration
|
||||||
|
|
||||||
|
| Setting | Variable | Description |
|
||||||
|
| ----------- | -------- | ----------------------------------------------------------- |
|
||||||
|
| `MAHUARGS` | Config | MangoHud config string (passed as `MANGOHUD_CONFIG`) |
|
||||||
|
| `MHIC` | Config | MangoHud config file path (passed as `MANGOHUD_CONFIGFILE`) |
|
||||||
|
| `MAHUVAR` | Config | If 1, sets `MANGOHUD=1` instead of binary |
|
||||||
|
| `LDPMAHU` | Config | If 1, uses `LD_PRELOAD` instead of binary wrapper |
|
||||||
|
| `MAHUDLSYM` | Config | If 1, appends `--dlsym` to mangohud |
|
||||||
|
|
||||||
|
## 5. Proton/Wine CLI Arguments
|
||||||
|
|
||||||
|
### 5.1 Proton Command
|
||||||
|
|
||||||
|
```
|
||||||
|
$RUNPROTON run [--verb] <game_exe> <game_args...>
|
||||||
|
```
|
||||||
|
|
||||||
|
Where `--verb` is the Steam runtime flag, `run` is the Proton subcommand.
|
||||||
|
|
||||||
|
### 5.2 Wine Command
|
||||||
|
|
||||||
|
```
|
||||||
|
WINE=<proton>/bin/wine WINEARCH=win64 WINEDEBUG=<debug> WINEPREFIX=<prefix> <wine> <game_cmd>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5.3 Proton Environment Variables
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
| ---------------------------------- | ------------------------- |
|
||||||
|
| `PROTON_LOG` | Enable Proton logging |
|
||||||
|
| `PROTON_LOG_DIR` | Proton log directory |
|
||||||
|
| `PROTON_DEBUG_DIR` | Proton debug directory |
|
||||||
|
| `PROTON_DUMP_DEBUG_COMMANDS` | Dump debug commands |
|
||||||
|
| `PROTON_FORCE_LARGE_ADDRESS_AWARE` | Force large address aware |
|
||||||
|
| `PROTON_NO_D3D10` | Disable D3D10 |
|
||||||
|
| `PROTON_NO_D3D11` | Disable D3D11 |
|
||||||
|
| `PROTON_NO_ESYNC` | Disable esync |
|
||||||
|
| `PROTON_NO_FSYNC` | Disable fsync |
|
||||||
|
| `PROTON_ENABLE_NVAPI` | Enable NVAPI |
|
||||||
|
| `PROTON_HIDE_NVIDIA_GPU` | Hide NVIDIA GPU |
|
||||||
|
| `PROTON_USE_WINED3D` | Use wined3d |
|
||||||
|
| `NETOPTS` | Network options |
|
||||||
|
|
||||||
|
## 6. DXVK CLI Arguments
|
||||||
|
|
||||||
|
### 6.1 DXVK HUD Options (comma-separated)
|
||||||
|
|
||||||
|
```
|
||||||
|
DXVK_HUD=<options>
|
||||||
|
```
|
||||||
|
|
||||||
|
| Option | Description |
|
||||||
|
| ------------- | ----------------- |
|
||||||
|
| `1` | Frame count |
|
||||||
|
| `devinfo` | Device info |
|
||||||
|
| `fps` | Frames per second |
|
||||||
|
| `frametimes` | Frame times |
|
||||||
|
| `submissions` | Submission count |
|
||||||
|
| `drawcalls` | Draw call count |
|
||||||
|
| `pipelines` | Pipeline count |
|
||||||
|
| `memory` | Memory usage |
|
||||||
|
| `gpuload` | GPU load |
|
||||||
|
| `version` | DXVK version |
|
||||||
|
| `api` | API version |
|
||||||
|
| `compiler` | Shader compiler |
|
||||||
|
| `samplers` | Sampler count |
|
||||||
|
| `full` | Full HUD |
|
||||||
|
|
||||||
|
Additional DXVK HUD options:
|
||||||
|
|
||||||
|
- `scale=<float>` — HUD scale factor
|
||||||
|
|
||||||
|
### 6.2 DXVK Configuration
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
| ------------------ | ----------------------------------------- |
|
||||||
|
| `DXVK_HUD` | HUD options (see above) |
|
||||||
|
| `DXVK_LOG_LEVEL` | Log level (info/error/perf/debug/verbose) |
|
||||||
|
| `DXVK_CONFIG_FILE` | Path to DXVK config file |
|
||||||
|
| `DXVK_FRAME_RATE` | FPS limit |
|
||||||
|
| `DXVK_HDR` | HDR enable |
|
||||||
|
|
||||||
|
## 7. VKD3D CLI Arguments
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
| -------------------------- | ------------------------------------------- |
|
||||||
|
| `VKD3D_CONFIG` | Config string (e.g. `dxr11` for raytracing) |
|
||||||
|
| `VKD3D_DEBUG` | Debug level |
|
||||||
|
| `VKD3D_SHADER_DEBUG` | Shader debug level |
|
||||||
|
| `VKD3D_LOG_FILE` | Log file path |
|
||||||
|
| `VKD3D_VULKAN_DEVICE` | Vulkan device to use |
|
||||||
|
| `VKD3D_FILTER_DEVICE_NAME` | Filter devices by name |
|
||||||
|
| `VKD3D_DISABLE_EXTENSIONS` | Disable Vulkan extensions |
|
||||||
|
| `VKD3D_TEST_DEBUG` | Test debug level |
|
||||||
|
| `VKD3D_TEST_FILTER` | Test filter |
|
||||||
|
| `VKD3D_TEST_EXCLUDE` | Test exclude |
|
||||||
|
| `VKD3D_TEST_PLATFORM` | Test platform |
|
||||||
|
| `VKD3D_TEST_BUG` | Test bug |
|
||||||
|
| `VKD3D_PROFILE_PATH` | Profile path |
|
||||||
|
|
||||||
|
## 8. Wine Environment Variables
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
| --------------------------------- | --------------------------- |
|
||||||
|
| `WINE_FULLSCREEN_FSR` | FSR in Wine (1=enabled) |
|
||||||
|
| `USEFWS` | FSR in Wine (1=enabled) |
|
||||||
|
| `WINE_FULLSCREEN_FSR_STRENGTH` | FSR strength |
|
||||||
|
| `WINE_FULLSCREEN_FSR_MODE` | FSR mode |
|
||||||
|
| `WINE_FULLSCREEN_FSR_CUSTOM_MODE` | Custom FSR mode |
|
||||||
|
| `WINE_FULLSCREEN_INTEGER_SCALING` | Integer scaling (1=enabled) |
|
||||||
|
| `WINEDLLOVERRIDES` | DLL overrides |
|
||||||
|
| `WINEDEBUG` | Debug channels |
|
||||||
|
| `WINEESYNC` | Esync (0=disabled) |
|
||||||
|
| `WINEFSYNC` | Fsync (0=disabled) |
|
||||||
|
| `WINEFSYNC_FUTEX2` | Fsync futex2 (0=disabled) |
|
||||||
|
|
||||||
|
## 31. Raytracing
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ---------- | ----------------- | ------------------------------------------------------- |
|
||||||
|
| Raytracing | `USERAYTRACING=1` | Sets `VKD3D_CONFIG=dxr11`, appends `-dx12` to game args |
|
||||||
|
|
||||||
|
## 32. PrimeRun (NVIDIA Prime Render Offload)
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| Enable | `USEPRIMERUN=1` | Sets `__NV_PRIME_RENDER_OFFLOAD=1`, `__VK_LAYER_NV_optimus=NVIDIA_only`, `__GLX_VENDOR_LIBRARY_NAME=nvidia`, `VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json` |
|
||||||
|
|
||||||
|
## 33. Zink (Vulkan-to-Gallium)
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------- | ----------- | ------------------------------------------------------------------------------------------------ |
|
||||||
|
| Enable | `USEZINK=1` | Sets `__GLX_VENDOR_LIBRARY_NAME=mesa`, `MESA_LOADER_DRIVER_OVERRIDE=zink`, `GALLIUM_DRIVER=zink` |
|
||||||
|
|
||||||
|
## 34. WineSync
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------- | ------------------- | ------------------------------------------------------- |
|
||||||
|
| Enable | `ENABLE_WINESYNC=1` | Sets `WINEESYNC=0`, `WINEFSYNC=0`, `WINEFSYNC_FUTEX2=0` |
|
||||||
|
|
||||||
|
## 35. X64dbg
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| --------------- | -------------------------- | --------------------------- |
|
||||||
|
| Run X64dbg | `RUN_X64DBG=1` | Enable x64dbg |
|
||||||
|
| Attach on start | `X64DBG_ATTACHONSTARTUP=1` | Attach x64dbg on game start |
|
||||||
|
|
||||||
|
## 36. Dependencies
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| -------- | ------------ | --------------------- |
|
||||||
|
| Run deps | `RUN_DEPS=1` | Install dependencies |
|
||||||
|
| Dep exe | `DEPSEXE` | Dependency executable |
|
||||||
|
|
||||||
|
## 37. Boxtron
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------- | -------------- | ------------------------------ |
|
||||||
|
| Enable | `USEBOXTRON=1` | |
|
||||||
|
| Args | `BOXTRONARGS` | `--wait-before-run` by default |
|
||||||
|
| Binary | `BOXTRONCMD` | Boxtron path |
|
||||||
|
| Exe | `BOXTRONEXE` | Boxtron exe |
|
||||||
|
|
||||||
|
## 38. Roberta
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------- | -------------- | ------------------------------ |
|
||||||
|
| Enable | `USEROBERTA=1` | |
|
||||||
|
| Args | `ROBERTAARGS` | `--wait-before-run` by default |
|
||||||
|
| Binary | `ROBERTACMD` | Roberta path |
|
||||||
|
| Exe | `ROBERTAEXE` | Roberta exe |
|
||||||
|
|
||||||
|
## 39. Luxtorpeda
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| ------- | ----------------- | --------------- |
|
||||||
|
| Enable | `USELUXTORPEDA=1` | |
|
||||||
|
| Args | `LUXTORPEDAARGS` | Luxtorpeda args |
|
||||||
|
| Binary | `LUXTORPEDACMD` | Luxtorpeda path |
|
||||||
|
| Exe | `LUXEXE` | Luxtorpeda exe |
|
||||||
|
|
||||||
|
## 40. Game Mode
|
||||||
|
|
||||||
|
| Setting | Variable | Notes |
|
||||||
|
| --------- | ------------------ | --------------- |
|
||||||
|
| Game Mode | `USEGAMEMODERUN=1` | Enable GameMode |
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"extends": "./.svelte-kit/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"rewriteRelativeImportExtensions": true,
|
||||||
|
"allowJs": true,
|
||||||
|
"checkJs": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"strict": true,
|
||||||
|
"moduleResolution": "bundler"
|
||||||
|
}
|
||||||
|
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
||||||
|
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|
||||||
|
//
|
||||||
|
// To make changes to top-level options such as include and exclude, we recommend extending
|
||||||
|
// the generated config; see https://svelte.dev/docs/kit/configuration#typescript
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import adapter from '@sveltejs/adapter-static';
|
||||||
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
sveltekit({
|
||||||
|
compilerOptions: {
|
||||||
|
// Force runes mode for the project, except for libraries. Can be removed in svelte 6.
|
||||||
|
runes: ({ filename }) =>
|
||||||
|
filename.split(/[/\\]/).includes('node_modules') ? undefined : true
|
||||||
|
},
|
||||||
|
adapter: adapter()
|
||||||
|
})
|
||||||
|
]
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user