HDR-Helper v1.1.0.0

- SDR to HDR brightness control has been implemented.
- Sample monitor.conf file is now provided.
- VS Code debug launch file has been added.
- Updated Readme.
This commit is contained in:
2025-01-01 11:49:33 +00:00
parent 1630d00ec0
commit 7340ccda2f
5 changed files with 53 additions and 28 deletions
+6 -6
View File
@@ -16,21 +16,21 @@ show_hdr_status() {
}
set_brightness() {
if [ "$HDR_TARGET_BRIGHTNESS" -gt 0 ]; then
if [[ "$SDR_TARGET_BRIGHTNESS" -gt 0 ]]; then
# Store the current brightness level before attempting to update it.
kscreen-doctor -o | \
grep Brightness | \
head -n 1 | \
sed 's/.*set to \([0-9]\+\)%.*/\1/' \
> $CONFIG_CURR_BRIGHTNESS
echo "DEBUG: TARGET BRIGHTNESS" $HDR_TARGET_BRIGHTNESS
kscreen-doctor output.$MONITOR.brightness.$HDR_TARGET_BRIGHTNESS
grep -oP "(?<=set to )[0-9]+" \
> $CONFIG_CURR_BRIGHTNESS
kscreen-doctor output.$MONITOR.brightness.$SDR_TARGET_BRIGHTNESS
fi
}
restore_brightness() {
if [ -f $CONFIG_CURR_BRIGHTNESS ]; then
echo "Debug: CURRENT BRIGHTNESS" $(cat $CONFIG_CURR_BRIGHTNESS)
kscreen-doctor output.$MONITOR.brightness.$(cat $CONFIG_CURR_BRIGHTNESS)
rm $CONFIG_CURR_BRIGHTNESS
fi
}