summaryrefslogtreecommitdiffstats
path: root/.scripts/displayselect
diff options
context:
space:
mode:
Diffstat (limited to '.scripts/displayselect')
-rwxr-xr-x.scripts/displayselect5
1 files changed, 1 insertions, 4 deletions
diff --git a/.scripts/displayselect b/.scripts/displayselect
index 95a4dc6..179f374 100755
--- a/.scripts/displayselect
+++ b/.scripts/displayselect
@@ -5,7 +5,6 @@
# User may also select "manual selection" which opens arandr.
# I plan on adding a routine from multi-monitor setups later.
-
twoscreen() { # If multi-monitor is selected and there are two screens.
primary=$(echo "$screens" | dmenu -i -p "asdf")
secondary=$(echo "$screens" | grep -v "$primary")
@@ -23,6 +22,7 @@ morescreen() { # If multi-monitor is selected and there are more than two screen
multimon() { # Multi-monitor handler.
case "$(echo "$screens" | wc -l)" in
+ 1) xrandr $(echo "$allposs" | awk '{print "--output", $1, "--auto"}' | tr '\n' ' ') ;;
2) twoscreen ;;
*) morescreen ;;
esac ;}
@@ -33,9 +33,6 @@ allposs=$(xrandr -q | grep "connected")
# Get all connected screens.
screens=$(echo "$allposs" | grep " connected" | awk '{print $1}')
-# If only one screen, activate it and exit.
-[ "$(echo "$screens" | wc -l)" -lt 2 ] && xrandr $(echo "$allposs" | awk '{print "--output", $1, "--auto"}' | tr '\n' ' ') ||
-
# Get user choice including multi-monitor and manual selection:
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
case "$chosen" in