Skip to content

Commit c708017

Browse files
committed
runcommand - cosmetic / fix bad indentation
1 parent fd0b8c2 commit c708017

1 file changed

Lines changed: 26 additions & 27 deletions

File tree

scriptmodules/supplementary/runcommand/runcommand.sh

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -276,35 +276,35 @@ function get_all_kms_modes() {
276276

277277
function get_all_x11_modes()
278278
{
279-
declare -Ag MODE
280-
local id
281-
local info
282-
local line
283-
local verbose_info=()
284-
local output="$($XRANDR --verbose | grep " connected" | awk '{ print $1 }')"
279+
declare -Ag MODE
280+
local id
281+
local info
282+
local line
283+
local verbose_info=()
284+
local output="$($XRANDR --verbose | grep " connected" | awk '{ print $1 }')"
285285

286-
while read -r line; do
287-
# scan for line that contains bracketed mode id
288-
id="$(echo "$line" | awk '{ print $2 }' | grep -o "(0x[a-f0-9]\{1,\})")"
286+
while read -r line; do
287+
# scan for line that contains bracketed mode id
288+
id="$(echo "$line" | awk '{ print $2 }' | grep -o "(0x[a-f0-9]\{1,\})")"
289289

290-
if [[ -n "$id" ]]; then
291-
# strip brackets from mode id
292-
id="$(echo ${id:1:-1})"
290+
if [[ -n "$id" ]]; then
291+
# strip brackets from mode id
292+
id="$(echo ${id:1:-1})"
293293

294-
# extract extended details
295-
verbose_info=($(echo "$line" | awk '{ for (i=3; i<=NF; ++i) print $i }'))
294+
# extract extended details
295+
verbose_info=($(echo "$line" | awk '{ for (i=3; i<=NF; ++i) print $i }'))
296296

297-
# extract x/y resolution, vertical refresh rate and append details
298-
read -r line
299-
info="$(echo "$line" | awk '{ print $3 }')"
300-
read -r line
301-
info+="x$(echo "$line" | awk '{ print $3 }') @ $(echo "$line" | awk '{ print $NF }') ("${verbose_info[*]}")"
297+
# extract x/y resolution, vertical refresh rate and append details
298+
read -r line
299+
info="$(echo "$line" | awk '{ print $3 }')"
300+
read -r line
301+
info+="x$(echo "$line" | awk '{ print $3 }') @ $(echo "$line" | awk '{ print $NF }') ("${verbose_info[*]}")"
302302

303-
# populate resolution into arrays
304-
MODE_ID+=($output:$id)
305-
MODE[$output:$id]="$info"
306-
fi
307-
done < <($XRANDR --verbose)
303+
# populate resolution into arrays
304+
MODE_ID+=($output:$id)
305+
MODE[$output:$id]="$info"
306+
fi
307+
done < <($XRANDR --verbose)
308308
}
309309

310310
function get_tvs_mode_info() {
@@ -496,7 +496,6 @@ function load_mode_defaults() {
496496
local temp
497497
MODE_ORIG=()
498498

499-
500499
if [[ -n "$HAS_MODESET" ]]; then
501500
# populate available modes
502501
[[ -z "$MODE_ID" ]] && get_all_${HAS_MODESET}_modes
@@ -506,9 +505,9 @@ function load_mode_defaults() {
506505
MODE_CUR=("${MODE_ORIG[@]}")
507506
MODE_ORIG_ID="${MODE_ORIG[0]}${separator}${MODE_ORIG[1]}"
508507

509-
if [[ "$MODE_REQ" == "0" ]]; then
508+
if [[ "$MODE_REQ" == "0" ]]; then
510509
MODE_REQ_ID="$MODE_ORIG_ID"
511-
elif [[ "$HAS_MODESET" == "tvs" ]]; then
510+
elif [[ "$HAS_MODESET" == "tvs" ]]; then
512511
# get default mode for requested mode of 1 or 4
513512
if [[ "$MODE_REQ" =~ (1|4) ]]; then
514513
# if current aspect is anything else like 5:4 / 10:9 just choose a 4:3 mode

0 commit comments

Comments
 (0)