fix resolution change when multiple displays are connected
parent
ef233a3d45
commit
6b463c19c5
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue