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
|
# 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-
|
-OR-
|
||||||
|
|
||||||
@@ -42,7 +44,7 @@ ln -s hdr-helper ~/.local/usr/bin/
|
|||||||
chmod +x ~/.local/usr/bin/hdr-helper
|
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>
|
# MONITOR=<DP-1 | Enter your monitor ID from xrandr>
|
||||||
# NATIVE_RES=<3440x1440@165 | Enter your native monitor resolution followed by the refresh rate>
|
# 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.
|
is present on your system for HDR Helper to function.
|
||||||
|
|
||||||
--- Config ---
|
--- 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
|
# Usage
|
||||||
|
|||||||
Regular → Executable
+17
-8
@@ -1,12 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
_VERSION=1.0.0.0
|
_VERSION=1.0.1.0
|
||||||
# MONITOR=<DP-1 | Enter your monitor ID from xrandr>
|
MONITOR= # MODIFY THESE VALUES INSIDE MONITOR.CONF #
|
||||||
# NATIVE_RES=<3440x1440@165 | Enter your native monitor resolution followed by the refresh rate>
|
NATIVE_RES= ###########################################
|
||||||
# TEMP_RES=<2560x1440@144 | Enter a different resolution or refresh rate from your native>
|
TEMP_RES= ###########################################
|
||||||
MONITOR=DP-3
|
|
||||||
NATIVE_RES=3440x1440@165
|
|
||||||
TEMP_RES=2560x1440@144
|
|
||||||
|
|
||||||
show_hdr_status() {
|
show_hdr_status() {
|
||||||
ICON="/usr/share/icons/breeze-dark/devices/64/monitor.svg"
|
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 "is present on your system for HDR Helper to function."
|
||||||
echo ""
|
echo ""
|
||||||
echo "--- Config ---"
|
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
|
# Check Dependencies
|
||||||
@@ -73,6 +70,18 @@ if [[ $(whereis kscreen-doctor) != *"kscreen-doctor" ]]; then
|
|||||||
exit -1
|
exit -1
|
||||||
fi
|
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
|
# Handle Args
|
||||||
if [[ $1 == "-e" ]] || [ $1 == "--enable" ]; then
|
if [[ $1 == "-e" ]] || [ $1 == "--enable" ]; then
|
||||||
enable_hdr
|
enable_hdr
|
||||||
|
|||||||
Reference in New Issue
Block a user