diff options
| author | JameyBear <WhispersofJ@gmail.com> | 2020-06-01 15:29:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-01 15:29:57 -0400 |
| commit | f820ccf4dd69d4cf784fca4fc0e1ae273993077e (patch) | |
| tree | da152f42dc7b4597b63bc63297032a640b410eb0 /.local/bin/displayselect | |
| parent | 87b0754319a00648cd20b7f013cc821868f6d25e (diff) | |
| download | eibhear-f820ccf4dd69d4cf784fca4fc0e1ae273993077e.tar.gz eibhear-f820ccf4dd69d4cf784fca4fc0e1ae273993077e.tar.zst eibhear-f820ccf4dd69d4cf784fca4fc0e1ae273993077e.zip | |
Shellcheck (#676)
Co-authored-by: WhispersOfJ <kaotiks@gmail.com>
Diffstat (limited to '.local/bin/displayselect')
| -rwxr-xr-x | .local/bin/displayselect | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/.local/bin/displayselect b/.local/bin/displayselect index 1c61103..890363c 100755 --- a/.local/bin/displayselect +++ b/.local/bin/displayselect @@ -18,10 +18,10 @@ twoscreen() { # If multi-monitor is selected and there are two screens. res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \ tail -n 1 | awk '{print $1}') - res_ext_x=$(echo $res_external | sed 's/x.*//') - res_ext_y=$(echo $res_external | sed 's/.*x//') - res_int_x=$(echo $res_internal | sed 's/x.*//') - res_int_y=$(echo $res_internal | sed 's/.*x//') + res_ext_x=$(echo "$res_external" | sed 's/x.*//') + res_ext_y=$(echo "$res_external" | sed 's/.*x//') + res_int_x=$(echo "$res_internal" | sed 's/x.*//') + res_int_y=$(echo "$res_internal" | sed 's/.*x//') scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l) scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l) @@ -53,7 +53,7 @@ multimon() { # Multi-monitor handler. esac ;} onescreen() { # If only one output available or chosen. - xrandr --output "$1" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$1" | awk '{print "--output", $1, "--off"}' | paste -sd ' ') + xrandr --output "$1" --auto --scale 1.0x1.0 "$(echo "$allposs" | grep -v "$1" | awk '{print "--output", $1, "--off"}' | paste -sd ' ')" } postrun() { # Stuff to run to clean up. |
