use xrandr --mode, support for primary monitor only

pull/40/head
TomasM 2017-12-13 07:58:49 -05:00
parent 8840c0f5e3
commit 2441cd20a2
3 changed files with 17 additions and 1 deletions

View File

@ -32,6 +32,7 @@ rm -Rf /usr/share/doc/*
rm -Rf /usr/share/info/*
rm -f /usr/share/images/fluxbox/debian-squared.jpg
rm -Rf /usr/share/fluxbox/nls/??*
rm -Rf /usr/share/gnome/help
rm -Rf /usr/share/locale/??
rm -Rf /usr/share/locale/??_*

View File

@ -84,7 +84,7 @@ rm -f $SIGNAL2 2>/dev/null
# gen screen resolutions to fluxbox menu
xrandr 2>/dev/null | fgrep x | fgrep . | sort -n | tr -s " " | cut -d " " -f 2 \
| sed -r "s:(.*):[exec] (\\1) {rm -f $SIGNAL1; xrandr -s \\1; while [ -e $SIGNAL1 ]; do sleep 0.1; done; killall -SIGUSR1 compton}:" > ~/.fluxbox/menu_resolution
| sed -r "s:(.*):[exec] (\\1) {fbscreensize \\1}:" > ~/.fluxbox/menu_resolution
# In all cases, wait for the sound sleeper.
# If startup took longer (sound completed already), no extra wait

View File

@ -0,0 +1,15 @@
#!/bin/bash
SIGNAL=~/.fehbg
rm -f $SIGNAL
OUTPUT=$(xrandr 2>/dev/null | grep 'connected' | cut -d " " -f 1)
MODE=$1
xrandr --output $OUTPUT --mode $MODE
while [ -e $SIGNAL ]; do
sleep 0.1
done
killall -SIGUSR1 compton