summaryrefslogtreecommitdiffstats
path: root/.local/bin/displayselect
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-06-01 17:46:17 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-06-01 17:46:17 -0400
commitae8929205eb9e7e8e12a387a2f5f60c6a17e7518 (patch)
tree513a2721c35351cac6e323dee3d3502d8e36b9d4 /.local/bin/displayselect
parent51fff23636826df1c9ec0fffc69e24b3bfab935d (diff)
parent88dfd0afe9df8b613e292f2e288d9b775735c9b5 (diff)
downloadeibhear-ae8929205eb9e7e8e12a387a2f5f60c6a17e7518.tar.gz
eibhear-ae8929205eb9e7e8e12a387a2f5f60c6a17e7518.tar.zst
eibhear-ae8929205eb9e7e8e12a387a2f5f60c6a17e7518.zip
Merge branch 'master' of github.com:LukeSmithxyz/voidrice into chambln-refactor
Diffstat (limited to '.local/bin/displayselect')
-rwxr-xr-x.local/bin/displayselect10
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.