feat: add default setup to displayselect
two-monitors setup with 1080p laptop
This commit is contained in:
parent
145b19d82d
commit
d6848f00ee
@ -36,10 +36,19 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
|
||||
--scale "$scale_x"x"$scale_y"
|
||||
else
|
||||
|
||||
default=$(printf "yes\\nno" | dmenu -i -p "Default settings?")
|
||||
if [ $default = "no" ]; then
|
||||
primary=$(echo "$screens" | dmenu -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?")
|
||||
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
|
||||
rotation=$(printf "normal\\nleft\\nright" | dmenu -i -p "Rotate $secondary?")
|
||||
xrandr --output "$primary" --auto --scale 1.0x1.0 \
|
||||
--output "$secondary" --"$direction"-of "$primary" --auto --scale 1.2x1.2 --rotate $rotation
|
||||
else
|
||||
xrandr --fb 4224x2376 \
|
||||
--output eDP1 --auto --mode 1920x1080 --pos 2304x0 \
|
||||
--output HDMI2 --auto --scale 1.2x1.2
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@ -65,7 +74,7 @@ allposs=$(xrandr -q | grep "connected")
|
||||
screens=$(echo "$allposs" | grep " connected" | awk '{print $1}')
|
||||
|
||||
# Get user choice including multi-monitor and manual selection:
|
||||
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
|
||||
chosen=$(printf "multi-monitor\\n%s\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
|
||||
case "$chosen" in
|
||||
"manual selection") arandr ; exit ;;
|
||||
"multi-monitor") multimon ;;
|
||||
|
Reference in New Issue
Block a user