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 742cc663ec6e219d76a169a263e0ef787a456303
parent ca8c5ed03d39b5beaa532b12b41b37248918956d
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue,  5 Mar 2019 08:32:36 +0100

Use dmenu_themed for display selection

Diffstat:
Mlinks/bin/displayselect | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/links/bin/displayselect b/links/bin/displayselect @@ -7,11 +7,11 @@ twoscreen() { # If multi-monitor is selected and there are two screens. - mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?") + mirror=$(printf "no\\nyes" | dmenu_themed -i -p "Mirror displays?") # Mirror displays using native resolution of external display and a scaled # version for the internal display if [ "$mirror" = "yes" ]; then - external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:") + external=$(echo "$screens" | dmenu_themed -i -p "Optimize resolution for:") internal=$(echo "$screens" | grep -v "$external") res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \ @@ -32,23 +32,23 @@ twoscreen() { # If multi-monitor is selected and there are two screens. --scale "$scale_x"x"$scale_y" else - primary=$(echo "$screens" | dmenu -i -p "Select primary display:") + primary=$(echo "$screens" | dmenu_themed -i -p "Select primary display:") secondary=$(echo "$screens" | grep -v "$primary") direction=$(printf "left\\nright" | \ - dmenu -i -p "What side of $primary should $secondary be on?") + dmenu_themed -i -p "What side of $primary should $secondary be on?") xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" \ --"$direction"-of "$primary" --auto --scale 1.0x1.0 fi } morescreen() { # If multi-monitor is selected and there are more than two screens. - primary=$(echo "$screens" | dmenu -i -p "Select primary display:") + primary=$(echo "$screens" | dmenu_themed -i -p "Select primary display:") secondary=$(echo "$screens" | grep -v "$primary" | \ - dmenu -i -p "Select secondary display:") + dmenu_themed -i -p "Select secondary display:") direction=$(printf "left\\nright" | \ - dmenu -i -p "What side of $primary should $secondary be on?") + dmenu_themed -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:") + grep -v "$secondary" | dmenu_themed -i -p "Select third display:") xrandr --output "$primary" --auto \ --output "$secondary" --"$direction"-of "$primary" --auto \ --output "$tertiary" \ @@ -74,7 +74,7 @@ screens=$(echo "$allposs" | grep " connected" | awk '{print $1}') # Get user choice including multi-monitor and manual selection: if [ $(echo "$screens" | wc -l) -gt 1 ]; then chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" \ - | dmenu -i -p "Select display arangement:") && + | dmenu_themed -i -p "Select display arangement:") && case "$chosen" in "manual selection") arandr ; exit ;; "multi-monitor") multimon ;;