wem.cfg
The $HOME/.config/wem/wem.cfg file is the global configuration file for WEM.
→ CacheDir
Full path to the directory where archives should be cached to.
CLI flag: --cache-dir
Default: $HOME/.local/share/wem/cache
→ EnvRepoURL
URL of a repo containing data for use with the wem get subcommand
CLI flag: --env-repo-url
Default: https://wem.hristos.co/get
→ WineEnvDir
Full path to the directory where wem envs will be created by default.
CLI flag: --wine-env-dir
Default: $HOME/.local/share/wem/envs
→ Custom Runners
WEM allows you to configure custom runners via wem.cfg.
WARNING! When you configure a custom runner you give WEM the ability to download and extract archives. Use this feature at your own risk! Only use sources that you trust!
→ Example: Dosbox Staging
As an example, here's how you would configure DOSBox Staging as a runner. Add this to wem.cfg:
[[Runners]]
BinPathFmt = "dosbox-staging-%[1]s/dosbox"
Compression = "xz"
DirFmt = "dosbox-staging-%[1]s"
ExtractedDirGlob = "dosbox-staging-linux-x86_64-*"
Name = "dosbox"
ReleaseURL = "https://api.github.com/repos/dosbox-staging/dosbox-staging/releases"
TarballFmt = "dosbox-staging-linux-x86_64-%[1]s.tar.xz"
TarballURL = "https://github.com/dosbox-staging/dosbox-staging/releases/download/%[1]s/dosbox-staging-linux-x86_64-%[1]s.tar.xz"
→ Fields Explained
-
BinPathFmt: When this is set, WEM will autoconfigureWineExeusing this value. -
Compression: May be one of:gz,xz,zst,tar, or left unset for no compression. -
DirFmt: The format WEM should expect the extracted directory to be in. If used withExtractedDirGlob, this is what the directory will be renamed to post-extraction. -
ExtractedDirGlob: A glob pattern that will match the extracted directory. Intended to be used withDirFmtas described above.- Please note that if multiple glob matches are found, the first will be used and the rest ignored. Avoid this by having as specific of a glob pattern as possible.
-
Name: Human-readable name for this runner. -
ReleaseURL: API URL for releases (only GitHub is supported at this time). -
TarballFmt: The format WEM should expect the downloaded tarball to be in. -
TarballURL: Formatted URL that the tarball can be downloaded from.
Also available is Variants, an array of strings that denote possible variants for a runner (e.g., Kron4ek's different variants as described in wem tutorial).
→ Format specifiers
The example above makes use of a format specifier: %[1]s
Custom runners can make use of two different format specifiers:
-
%[1]s: Will render a version -
%[2]s: Will render a variant (if applicable)
You can use these as needed in your custom runner's fields.