Easily Copy Game Config File Profiles via UI or CLI
MIT License
⚠️⚠️⚠️ NOTE: As of version 1.3 the UI has been removed, it can still be used as apart of v1.2.1.1 & under I have left references to it on the README for now, but they will be removed soon.⚠️⚠️⚠️
Easily Copy Game Config File Profiles via UI or CLI
GCS is a tool designed to alleviate the hassle of manually adjusting in-game resolutions when switching between multiple monitors (e.g., TV, PC Monitor, Moonlight Streaming). Some games fail to automatically adjust the resolution to the correct monitor, forcing you to change settings manually. GCS solves this problem by allowing you to easily swap out game config files using either a graphical interface or the command line. You can further automate this process with tools like AutoHotkey (AHK).
Both the CLI and UI share the same JSON file for storing game data, so you can switch between them seamlessly. The UI is primarily designed for adding and managing games, while the CLI is ideal for quickly applying profiles.
A game profile consists of the following:
use
command is run.You can execute commands by running the binary in a terminal, using:
.\gcs
To list out the commands, and see their usage, run:
.\gcs --help
Add Game
Description: Adds a new game.
Syntax
.\gcs add game "Game Title"
Usage Example:
.\gcs add game "Skyrim"
Explanation: This command adds a game titled "Skyrim".
Add Profile
Description: Adds a new profile to a game, with source and destination configuration paths. You must have at least 1 pair of source & destination paths, but can have as many pairs as you need.
Syntax
.\gcs add profile "Profile Title" "Game Title" -s "<Path To Be Copied To Config File Destination>" -d "<Config File Destination>"
Usage Example:
.\gcs add profile "tv" "Skyrim" -s "C:\Path\To\Profile1.ini" -d "\users\username\My Documents\My Games\Skyrim\skyrimprefs.ini"
Explanation: This command adds a profile titled "tv" to the game "Skyrim", with 1 source and destination pair. "Profile1" will be copied to the destination when the use
command is run.
Delete Game
.\gcs delete game "Game Title"
.\gcs delete game "Skyrim"
Delete Profile
.\gcs delete profile "Profile Title" "Game Title"
.\gcs delete "tv" "Skyrim"
Edit Game
.\gcs edit "Old Game Title" "New Title"
.\gcs edit "Skyrim" "Skyrim SE"
Edit Profile
.\gcs edit "Profile Title" "Game Title" -t "New Profile Title" -s "New Source Path" -d "New Destination Path"
.\gcs edit "tv" "Skyrim SE" -t "pc" -s "C:\Path\To\NewProfile1.ini" -d "\users\username\My Documents\My Games\Skyrim Special Edition\skyrimprefs.ini"
List
.\gcs list
.\gcs list
Use
.\gcs use "Game Title" "Profile Title" -v "variable:value"
.\gcs use "Skyrim" "Profile1" -v "x:3840" -v "y:2160"
x
and y
with 3840
and 2160
respectively.UseAll
.\gcs useall "Profile Title" -v "variable:value"
.\gcs useall "Profile1" -v "x:3840" -v "y:2160"
x
and y
with 3840
and 2160
respectively.Currently only available in CLI
When using the use
or useall
command, you can optionally pass in the --variable -v
option to use the variables function.
It works by finding a variable within the source file, and replacing it with whatever value is defined at runtime.
Variables are defined in the source file using the following format: ${variable}
When the --variable -v
option is used, you can define the name of the variable and the value in the following format: variable:value
Example: You want to dynamically set the resolution of the game to your TVs resolution.
In your profile, for this example let's call it "tv", the way the game defines the resolution is with an x & y value, it may look something like this:
x: 1920
y: 1080
You would replace the values with a variable like so:
x: ${x}
y: ${y}
Then using the following command, you can set the games resolution at runtime:
.\gcs use myGame tv -v x:3840 -v y:2160
This will set the x & y value to 3840 & 2160 respectively.
Running the file: GCS.UI.exe
opens a basic UI that allows you to use game profiles, add new games, or edit the profile paths of games.
GCS is portable and stores no appdata files. It only creates a gameData.json file in the directory the binary is executed.
gcs
binary executable, by running:
chmod +x gcs
gcs
executable, use the --help
option to see all available commands.GCS.UI.exe
executable.git clone https://github.com/VeryFunnyMonkey/GamesConfigSwitcher.git
cd GamesConfigSwitcher
Navigate to the root directory of your project and run:
dotnet restore
To build the solution, use the following command:
dotnet build --configuration Release
To create a single-file executable for the CLI, run:
dotnet publish GCS.CLI -r <runtime> -c Release /p:PublishSingleFile=true --output ./output/cli
See here for the available runtimes
To create a single-file executable for the CLI, run:
dotnet publish GCS.UI -r <runtime> -c Release /p:PublishSingleFile=true --output ./output/ui
See here for the available runtimes
After publishing, the executables will be located in the ./output/cli
and ./output/ui
directories for the CLI and UI respectively.
- CLI: Navigate to the ./output/cli
directory and run:
./gcs --help
- UI: Navigate to the ./publish/ui directory and double-click the GCS.UI.exe file to launch the UI.
GCS relies on several libraries and packages to function. Below are the key libraries used:
All necessary dependencies are restored automatically when you run dotnet restore
. If you wish to explore or modify the dependencies, you can find them listed in the .csproj
files of the respective projects.