diff options
Diffstat (limited to 'mga-bg-res/mga-bg-res.sh')
-rwxr-xr-x | mga-bg-res/mga-bg-res.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mga-bg-res/mga-bg-res.sh b/mga-bg-res/mga-bg-res.sh index e73caa4..00f7688 100755 --- a/mga-bg-res/mga-bg-res.sh +++ b/mga-bg-res/mga-bg-res.sh @@ -4,11 +4,9 @@ bgpath="/usr/share/mga/backgrounds" theme="Mageia-Default" curlink=$(readlink $bgpath/default.jpg) -# Search for the optimal background resolution according to the driver -DRIVER=$(grep -A 6 'Device' /etc/X11/xorg.conf | grep 'Driver') # => Driver "DriverName" -DRIVER=$(expr "$DRIVER" : '.*"\(.*\)"') # isolate driver's name -if [ ! -z "$DRIVER" -a -e /usr/sbin/monitor-probe ]; then - res=$(exec /usr/sbin/monitor-probe $DRIVER | grep -m 1 ModeLine) # => ModeLine "1920x1080" ... +# Search for the optimal background resolution according to monitor-edid +if [ -e /usr/sbin/monitor-edid ]; then + res=$(exec /usr/sbin/monitor-edid | grep -m 1 ModeLine) # => ModeLine "1920x1080" ... res=$(expr "$res" : '.*"\(.*\)".*') # isolate the resolution fi |