fix resolution change when multiple displays are connected

pull/63/head
TomasM 2018-12-18 09:43:44 +00:00
parent ef233a3d45
commit 6b463c19c5
1 changed files with 4 additions and 2 deletions

View File

@ -3,13 +3,15 @@
SIGNAL=~/.fehbg SIGNAL=~/.fehbg
rm -f $SIGNAL rm -f $SIGNAL
OUTPUT=$(xrandr 2>/dev/null | grep 'connected' | cut -d " " -f 1) OUTPUT=$(xrandr 2>/dev/null | grep -iv disconnected | grep -i 'connected' | head -n 1 | cut -d " " -f 1)
MODE=$1 MODE=$1
xrandr --output $OUTPUT --mode $MODE xrandr --output $OUTPUT --mode $MODE -s $MODE
while [ -e $SIGNAL ]; do while [ -e $SIGNAL ]; do
sleep 0.1 sleep 0.1
done done
sleep 1
killall -SIGUSR1 compton killall -SIGUSR1 compton