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')
|
posy=$(echo "$out" | jq -r '.pos.y')
|
||||||
rotation=$(echo "$out" | jq -r '.rotation')
|
rotation=$(echo "$out" | jq -r '.rotation')
|
||||||
scale=$(echo "$out" | jq -r '.scale')
|
scale=$(echo "$out" | jq -r '.scale')
|
||||||
mode=$(echo "$out" | jq -r '.currentModeId')
|
mode_id=$(echo "$out" | jq -r '.currentModeId')
|
||||||
mode_name=$(echo "$out" | jq -r ".modes[] | select(.id == \"$mode\") | .name")
|
# mode_name=$(echo "$out" | jq -r ".modes[] | select(.id == \"$mode_id\") | .name")
|
||||||
log "[VAR]" $mode_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')
|
priority=$(echo "$out" | jq -r '.priority')
|
||||||
|
|
||||||
# Mode (Resolution + refresh)
|
# Mode (Resolution + refresh)
|
||||||
# CMD="kscreen-doctor output.$name.mode.$mode"
|
# 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
|
log "[CMD]" $CMD
|
||||||
$CMD
|
$CMD
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user