Digital Vibrance for Rebirth Script
* Have you ever noticed X Rebirth colors look shallow and a bit "dead"?
* Do you prefer a more colorful looking game?
* Do you know what Digital Vibrance is?
Description:
Well NVIDIA panel settings has an option to make colors more lively, but if you activate a digital vibrance in the desktop just for Rebirth your desktop may look "too" colourful to have that value set by default. And having to set vibrance manually every time you start the game and reset it when you have finished with the game is a total PITA.
I made this small Linux script to launch the game, set vibrance to my liking and re-set vibrance once I exit the game. I thought it may come in handy for some other Linux player who is in the same boat as I.
Under Windows I ending up using SweetFX but under Linux SweetFX does not work since it is based on directx, I noticed that under Linux setting up Vibrance and overriding Anisotropic Filtering to 16x I get equal results to "my" SweetFX settings under Windows.
Installation for dummies:
* Download script in ~/Downloads directory
* mkdir -p ~/.local/bin/
* cp ~/Downloads/rebirth-vibrance.sh ~/.local/bin/
* chmod u+x ~/.local/bin/rebirth-vibrance.sh
Now it is ready to be executed and you can modify the script for Vibrance Values to your hearts content if necessary.
Icon creation:
* Additionally you can go to steam.
* Right-click on Rebirth in your games Libbrary - Properties - "Create Desktop ShortCut".
* And then in your desktop you will see an Steam Icon for Rebirth. Right click on the icon and set the Command to "/home/yourusernamehere/.local/bin/rebirth-vibrance.sh" as you can see in the Screenshot of Panel & Desktop icon.
Script File: https://drive.google.com/open?id=0B7Mv- ... HgwYnlWUDA
Screenshot of Panel & Desktop Icons: https://drive.google.com/open?id=0B7Mv- ... jVSMHBRZ28
Now on Gitlab: https://gitlab.com/ezra-s/X-Rebirth-Lin ... ibrance.sh
Code: Select all
#!/bin/bash
###
# Script to check if XRebirth is launched
# and set digital vibrance accordingly
# This script is intended:
# ***ONLY*** for NVIDIA propietary drivers
# check your ideal digital vibrance values
# in the game before using this script.
# Author: ezra-r
# Version: 29-08-2016
set -e
###
# Set vibrance values
desktopvib=100
xrebirthvib=900
############################
# no need to modify bellow #
############################
###
# binaries and checks
rebirth="XRebirth"
if [ "$(ps auxw | grep $USER | grep -v grep| grep "./${rebirth}")" != "" ]; then
echo "This game is already running!"
echo "Use this script to launch the game"
echo "If it is already launched, stop the other instance first."
echo ""
exit 1
fi
nvset="/usr/bin/nvidia-settings"
valvesteam="/usr/games/steam"
###
# Main functionality
# run steam
$valvesteam steam://rungameid/2870
# wait for game to run
sleep 20s
# check game is running and set vibrance
if [ $(ps auxw | grep "./${rebirth}" | grep -v grep | awk '{print $2}') ]; then
$nvset -a "DigitalVibrance=${xrebirthvib}"
else
echo "Game is not launched!"
echo "Just in case we print the process list matching ${rebirth}:"
echo "$(ps aux | grep "./${rebirth}" | grep -v grep | awk '{print $2}')"
echo ""
exit 1
fi
# while in game we check game still running
# when game is shutdown we reset desktop vibrance
while [ $(ps aux | grep "./${rebirth}" | grep -v grep | awk '{print $2}') ]; do
sleep 10s
done
$nvset -a "DigitalVibrance=${desktopvib}"
exit 0