Skip to content

Latest commit

 

History

History
120 lines (90 loc) · 3.29 KB

README.md

File metadata and controls

120 lines (90 loc) · 3.29 KB

Coverage CI Build

Important

This is the Protontweaks CLI repository, you can find its sister repositories at the following links!

Protontweaks

Automatically apply necessary protontricks to your games!

Requirements

Installation

This will automatically install protontweaks with your systems package manager if its available

$ bash -c "$(curl -fsSL https://protontweaks.com/install.sh)"

NixOS

NixOS Flake Example
{
  description = "NixOS Example";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    protontweaks.url = "github:rain-cafe/protontweaks/main";
    protontweaks.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = { self, nixpkgs, ... } @ inputs: {
    nixosConfigurations =
      let
        inherit (self) outputs;
        inherit (nixpkgs.lib) nixosSystem;
      in
      {
        your-hostname = nixosSystem {
          specialArgs = { inherit inputs outputs; };

          modules = [
            # This is just an example, you can obviously format this however you want!
            ({ pkgs, ... }: {
              imports = [
                inputs.protontweaks.nixosModules.protontweaks
              ];

              nixpkgs = {
                overlays = [
                  inputs.protontweaks.overlay
                ];
              };

              # This will install protontweaks and enable the watch service that automatically updates the launch options
              services.protontweaks.enable = true;
            })
            # Your NixOS Modules here...
            ../defaults/configuration.nix
          ];
        };
      };
  };
}

Usage

Automatic

This installs a systemd service that automatically updates your launch options when you install a game.

$ protontweaks service --install

Manual

Add the following to the launch options for a steam game!

protontweaks %command%

Configuration

We attempt to load a configuration file from the following locations, from highest to lowest priority:

  1. $XDG_CONFIG_HOME/protontweaks.json
  2. $HOME/.config/protontweaks.json
  3. /etc/protontweaks.json
{
  // Whether to automatically run games with gamemoderun (if installed and supported)
  // Default: true
  "gamemode": true,
  // Whether to automatically run games with mangohud (if installed and supported)
  // Default: false
  "mangohud": true
}