Bitcoin donations are welcome:14snQXeLcnJtWUduKZ6rC2MHdPYrYar1Tw

Sunday, March 31, 2019

Multiscreen setup fluxbox and lightdm

In lightdm.conf:
[SeatDefaults]
display-setup-script=/usr/bin/screenres.sh

screenres.sh:
#!/bin/bash
 
mode="$(xrandr -q|grep -A1 "DP1 connected"| tail -1 |awk '{ print $1 }')"
if [ -n "$mode" ]; then
  xrandr --output LVDS1 --off
  xrandr --output DP1 --primary --mode 1920x1080
fi
mode="$(xrandr -q|grep -A1 "DP2 connected"| tail -1 |awk '{ print $1 }')"
if [ -n "$mode" ]; then
  xrandr --output LVDS1 --off
  xrandr --output DP2 --primary --mode 1920x1080
  xrandr --output DP3 --mode 1920x1080
  xrandr --output DP3 --left-of DP2
fi

No comments:

Post a Comment