From e0063f81676f4c9d545da413eae2d41f217017e0 Mon Sep 17 00:00:00 2001 From: Dunestorm Date: Tue, 31 Dec 2024 23:36:54 +0000 Subject: [PATCH] HDR-Helper v1.1.0.0 WIP -Adjusted language in Readme. -Added a fixed config file path. --- README.md | 4 ++-- hdr-helper | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 77e2b6e..8c44ada 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ please take this into consideration :) # The Problem At this moment in time, pretty much all games require HDR to be manually enabled for it to properly function. Normally -this isn't a problem when using Gamescope as your native compositor. Most normal people however run a fully fledged -desktop environment on their PCs unless they're using SteamOS or Bazzite. +this isn't a problem when using Gamescope as your native compositor. Most people however run a fully fledged desktop +environment on their PCs unless they're using SteamOS or Bazzite. This can be annoying because running Gamescope from within KDE Plasma with the HDR flag enabled still won't magically make HDR work, unless it's also enabled from your compositor's side too; in this case, KWin. Although KWin has a way diff --git a/hdr-helper b/hdr-helper index 460afbf..7265f4b 100755 --- a/hdr-helper +++ b/hdr-helper @@ -1,6 +1,7 @@ #!/bin/bash -_VERSION=1.0.1.0 +_VERSION=1.1.0.0 +CONFIG_FILE="$HOME/.config/hdr-helper/monitor.conf" MONITOR= # MODIFY THESE VALUES INSIDE MONITOR.CONF # NATIVE_RES= ########################################### TEMP_RES= ########################################### @@ -71,8 +72,7 @@ if [[ $(whereis kscreen-doctor) != *"kscreen-doctor" ]]; then fi # Import monitor.conf values -if [ -f monitor.conf ]; then - source monitor.conf +if source "$CONFIG_FILE"; then if [[ $MONITOR == "" ]] || [[ $NATIVE_RES == "" ]] || [[ $TEMP_RES == "" ]]; then echo "Error: monitor.conf has not been configured." exit -2 @@ -83,15 +83,15 @@ else fi # Handle Args -if [[ $1 == "-e" ]] || [ $1 == "--enable" ]; then +if [[ $1 == "-e" ]] || [[ $1 == "--enable" ]]; then enable_hdr -elif [[ $1 == "-d" ]] || [ $1 == "--disable" ]; then +elif [[ $1 == "-d" ]] || [[ $1 == "--disable" ]]; then disable_hdr -elif [[ $1 == "-s" ]] || [ $1 == "--status" ]; then +elif [[ $1 == "-s" ]] || [[ $1 == "--status" ]]; then show_hdr_status -elif [[ $1 == "-v" ]] || [ $1 == "--version" ]; then +elif [[ $1 == "-v" ]] || [[ $1 == "--version" ]]; then show_version -elif [[ $1 == "-h" ]] || [ $1 == "--help" ]; then +elif [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then show_help elif [[ $# -eq 0 ]]; then # Automatically Toggle HDR | Default Behaviour auto_hdr