diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2020-06-02 12:46:47 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2020-06-02 12:46:47 -0400 |
| commit | c4d6f4c027bb7e81093ec7c588f027de568e6bb6 (patch) | |
| tree | 92b550aa1c66b52661d01f92122715aa09fc706c /.local/bin/displayselect | |
| parent | 87b0754319a00648cd20b7f013cc821868f6d25e (diff) | |
| parent | 0df700f504cedeac1ae354c650ea80b32ab7668c (diff) | |
| download | eibhear-c4d6f4c027bb7e81093ec7c588f027de568e6bb6.tar.gz eibhear-c4d6f4c027bb7e81093ec7c588f027de568e6bb6.tar.zst eibhear-c4d6f4c027bb7e81093ec7c588f027de568e6bb6.zip | |
Merge branch 'chambln-refactor'
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. |
