changed mode from name to actual values
This commit is contained in:
@@ -86,14 +86,20 @@ function load_profile_to_outputs {
|
||||
posy=$(echo "$out" | jq -r '.pos.y')
|
||||
rotation=$(echo "$out" | jq -r '.rotation')
|
||||
scale=$(echo "$out" | jq -r '.scale')
|
||||
mode=$(echo "$out" | jq -r '.currentModeId')
|
||||
mode_name=$(echo "$out" | jq -r ".modes[] | select(.id == \"$mode\") | .name")
|
||||
log "[VAR]" $mode_name
|
||||
mode_id=$(echo "$out" | jq -r '.currentModeId')
|
||||
# mode_name=$(echo "$out" | jq -r ".modes[] | select(.id == \"$mode_id\") | .name")
|
||||
# log "[VAR] mode_name:" $mode_name
|
||||
refresh_rate=$(echo "$out" | jq -r ".modes[] | select(.id == \"$mode_id\") | .refreshRate")
|
||||
height=$(echo "$out" | jq -r ".modes[] | select(.id == \"$mode_id\") | .size.height")
|
||||
width=$(echo "$out" | jq -r ".modes[] | select(.id == \"$mode_id\") | .size.width")
|
||||
mode="${width}x${height}@${refresh_rate}"
|
||||
log "[VAR] mode: $mode"
|
||||
|
||||
priority=$(echo "$out" | jq -r '.priority')
|
||||
|
||||
# Mode (Resolution + refresh)
|
||||
# CMD="kscreen-doctor output.$name.mode.$mode"
|
||||
CMD="kscreen-doctor output.$name.mode.$mode_name"
|
||||
CMD="kscreen-doctor output.$name.mode.$mode"
|
||||
log "[CMD]" $CMD
|
||||
$CMD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user