dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 74787a8199b62d6bcbef83a0f57c1bfd5b586ecc
parent 06eb79ea03a6eb9459ebda44f1643758097d1b3e
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 28 Jan 2020 08:16:33 +0100

Limit display selection to two monitors

Diffstat:
M.local/bin/displayselect | 18+-----------------
1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/.local/bin/displayselect b/.local/bin/displayselect @@ -41,27 +41,11 @@ twoscreen() { # If multi-monitor is selected and there are two screens. fi } -morescreen() { # If multi-monitor is selected and there are more than two screens. - primary=$(echo "$screens" | dmenu -i -p "Select primary display:") - secondary=$(echo "$screens" | grep -v "$primary" | \ - dmenu -i -p "Select secondary display:") - direction=$(printf "left\\nright" | \ - dmenu -i -p "What side of $primary should $secondary be on?") - tertiary=$(echo "$screens" | grep -v "$primary" | \ - grep -v "$secondary" | dmenu -i -p "Select third display:") - xrandr --output "$primary" --auto \ - --output "$secondary" --"$direction"-of "$primary" --auto \ - --output "$tertiary" \ - --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" \ - --auto -} - multimon() { # Multi-monitor handler case "$(echo "$screens" | wc -l)" in 1) xrandr "$(echo "$allposs" | awk '{print "--output", $1, "--off"}' \ | tr '\n' ' ')" ;; - 2) twoscreen ;; - *) morescreen ;; + *) twoscreen ;; esac ; }