HDR-Helper v1.0.1.0
- Made configuration portable by seperating variables into seperate monitor.conf file.
This commit is contained in:
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
# Ignore all .conf files from changing
|
||||
*.conf
|
||||
@@ -30,7 +30,9 @@ this script manually and force HDR to be on or off if you so desire.
|
||||
|
||||
# Setup
|
||||
|
||||
Simply copy the script to a location within your $PATH for ease of access, such as ~/.local/usr/bin.
|
||||
1. Copy the script to a location within your $PATH for ease of access, such as ~/.local/usr/bin.
|
||||
2. Modify the monitor.conf file.
|
||||
3. You should now be able to call `hdr-helper -v` from your terminal
|
||||
|
||||
-OR-
|
||||
|
||||
@@ -42,7 +44,7 @@ ln -s hdr-helper ~/.local/usr/bin/
|
||||
chmod +x ~/.local/usr/bin/hdr-helper
|
||||
```
|
||||
|
||||
You will then need to modify the following three values within the script specific to your system configuration:
|
||||
You will then need to modify the following three values within monitor.conf specific to your system configuration:
|
||||
```
|
||||
# MONITOR=<DP-1 | Enter your monitor ID from xrandr>
|
||||
# NATIVE_RES=<3440x1440@165 | Enter your native monitor resolution followed by the refresh rate>
|
||||
@@ -71,7 +73,7 @@ Currently only KDE Plasma is supported running Wayland. Ensure that kscreen-doct
|
||||
is present on your system for HDR Helper to function.
|
||||
|
||||
--- Config ---
|
||||
Please modify the MONITOR, NATIVE_RES and TEMP_RES values in this script.
|
||||
Please modify the MONITOR, NATIVE_RES and TEMP_RES values in monitor.conf.
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Regular → Executable
+17
-8
@@ -1,12 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
_VERSION=1.0.0.0
|
||||
# MONITOR=<DP-1 | Enter your monitor ID from xrandr>
|
||||
# NATIVE_RES=<3440x1440@165 | Enter your native monitor resolution followed by the refresh rate>
|
||||
# TEMP_RES=<2560x1440@144 | Enter a different resolution or refresh rate from your native>
|
||||
MONITOR=DP-3
|
||||
NATIVE_RES=3440x1440@165
|
||||
TEMP_RES=2560x1440@144
|
||||
_VERSION=1.0.1.0
|
||||
MONITOR= # MODIFY THESE VALUES INSIDE MONITOR.CONF #
|
||||
NATIVE_RES= ###########################################
|
||||
TEMP_RES= ###########################################
|
||||
|
||||
show_hdr_status() {
|
||||
ICON="/usr/share/icons/breeze-dark/devices/64/monitor.svg"
|
||||
@@ -60,7 +57,7 @@ show_help () {
|
||||
echo "is present on your system for HDR Helper to function."
|
||||
echo ""
|
||||
echo "--- Config ---"
|
||||
echo "Please modify the MONITOR, NATIVE_RES and TEMP_RES values in this script."
|
||||
echo "Please modify the MONITOR, NATIVE_RES and TEMP_RES values in monitor.conf."
|
||||
}
|
||||
|
||||
# Check Dependencies
|
||||
@@ -73,6 +70,18 @@ if [[ $(whereis kscreen-doctor) != *"kscreen-doctor" ]]; then
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Import monitor.conf values
|
||||
if [ -f monitor.conf ]; then
|
||||
source monitor.conf
|
||||
if [[ $MONITOR == "" ]] || [[ $NATIVE_RES == "" ]] || [[ $TEMP_RES == "" ]]; then
|
||||
echo "Error: monitor.conf has not been configured."
|
||||
exit -2
|
||||
fi
|
||||
else
|
||||
echo "Error: monitor.conf file not found. Please ensure it's been properly setup."
|
||||
exit -3
|
||||
fi
|
||||
|
||||
# Handle Args
|
||||
if [[ $1 == "-e" ]] || [ $1 == "--enable" ]; then
|
||||
enable_hdr
|
||||
|
||||
Reference in New Issue
Block a user