still working on refactoring things
This commit is contained in:
@@ -79,15 +79,20 @@ function apply_attribute {
|
|||||||
value=$3
|
value=$3
|
||||||
value_map=$4
|
value_map=$4
|
||||||
|
|
||||||
if [[ -n "$value_map" ]]; then
|
|
||||||
value=${map["$value"]}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $value != "null" ]; then
|
if [ $value != "null" ]; then
|
||||||
|
|
||||||
|
if [[ -n "$value_map" ]]; then
|
||||||
|
log "[PREVALUE] Value supplied for $output_id $attribute: $value"
|
||||||
|
value=${value_map["$value"]}
|
||||||
|
log "[POSTVALUE] Value output for $output_id $attribute: $value"
|
||||||
|
fi
|
||||||
|
|
||||||
CMD="kscreen-doctor output.$output_id.$attribute.$value"
|
CMD="kscreen-doctor output.$output_id.$attribute.$value"
|
||||||
|
log "[CMD]" $CMD
|
||||||
|
$CMD
|
||||||
|
else
|
||||||
|
log "Output $output_id has not attribute $attribute, skipping..."
|
||||||
fi
|
fi
|
||||||
log "[CMDDDDDD]" $CMD
|
|
||||||
$CMD
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function load_profile_to_outputs {
|
function load_profile_to_outputs {
|
||||||
@@ -126,27 +131,21 @@ function load_profile_to_outputs {
|
|||||||
|
|
||||||
|
|
||||||
declare -A bool_enable_map
|
declare -A bool_enable_map
|
||||||
wcg_map["true"]="enable"
|
bool_enable_map["true"]="enable"
|
||||||
wcg_map["false"]="false"
|
bool_enable_map["false"]="disable"
|
||||||
|
|
||||||
|
declare -A rgb_range_map
|
||||||
|
rgb_range_map["0"]="automatic"
|
||||||
|
rgb_range_map["full"]="full"
|
||||||
|
rgb_range_map["limited"]="limited"
|
||||||
|
|
||||||
apply_attribute $name "wcg" $wcg $bool_enable_map
|
apply_attribute $name "wcg" $wcg $bool_enable_map
|
||||||
#if [ $wcg == true ]; then
|
|
||||||
# CMD="kscreen-doctor output.$name.wcg.enable"
|
|
||||||
#else
|
|
||||||
# CMD="kscreen-doctor output.$name.wcg.disable"
|
|
||||||
#fi
|
|
||||||
#log "[CMD]" $CMD
|
|
||||||
#$CMD
|
|
||||||
|
|
||||||
if [ $sdrbrightness != "null" ]; then
|
apply_attribute $name "sdr-brightness" $sdrbrightness
|
||||||
CMD="kscreen-doctor output.$name.sdr-brightness.${sdrbrightness}"
|
|
||||||
log "[CMD]" $CMD
|
|
||||||
$CMD
|
|
||||||
fi
|
|
||||||
|
|
||||||
apply_attribute $name "vrrpolicy" $vrrPolicy
|
apply_attribute $name "vrrpolicy" $vrrPolicy
|
||||||
|
|
||||||
apply_attribute $name rgbrange $rgbRange
|
apply_attribute $name "rgbrange" $rgbRange $rgb_range_map
|
||||||
|
|
||||||
CMD="kscreen-doctor output.$name.overscan.$overscan"
|
CMD="kscreen-doctor output.$name.overscan.$overscan"
|
||||||
log "[CMD]" $CMD
|
log "[CMD]" $CMD
|
||||||
|
|||||||
Reference in New Issue
Block a user