dotfiles

Luke's GNU/Linux dotfiles for i3, vim, ranger, bash, mpd, etc.
git clone git@git.lukesmith.xyz:dotfiles
Log | Files | Refs | README | LICENSE

commit be0b2f3aef9619bc67f28d4bbb9a14adb952b38f
parent 4b93d5eeaeb0d038be1bd866db4ecf3c5cfab12e
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Mon, 24 Sep 2018 11:20:17 -0400

all in case statement

Diffstat:
M.scripts/displayselect | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git 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