[script][get_madame] Correct xrandr use
This commit is contained in:
parent
a5191597a9
commit
0a6d5c35d3
@ -14,7 +14,6 @@
|
|||||||
###########################################
|
###########################################
|
||||||
page=
|
page=
|
||||||
|
|
||||||
set -x
|
|
||||||
function usage {
|
function usage {
|
||||||
script_name=`basename "$0"`
|
script_name=`basename "$0"`
|
||||||
echo "Usage $script_name [Day]"
|
echo "Usage $script_name [Day]"
|
||||||
@ -68,7 +67,7 @@ function resize {
|
|||||||
res=
|
res=
|
||||||
if [ -e /usr/bin/xrandr ];
|
if [ -e /usr/bin/xrandr ];
|
||||||
then
|
then
|
||||||
res=$(xrandr | tail -1 | awk '{print $1}')
|
res=$(xrandr | grep '*' | awk '{print $1}')
|
||||||
else
|
else
|
||||||
res=$(xdpyinfo | grep dimensions | awk '{print $2}')
|
res=$(xdpyinfo | grep dimensions | awk '{print $2}')
|
||||||
fi
|
fi
|
||||||
@ -84,7 +83,7 @@ function resize {
|
|||||||
mult=0
|
mult=0
|
||||||
div=0
|
div=0
|
||||||
# If using $tailleX and $imgX as factor scale for Y -> use it! It will perfectly fitt for X and do the best for Y
|
# If using $tailleX and $imgX as factor scale for Y -> use it! It will perfectly fitt for X and do the best for Y
|
||||||
if [ $tailleY -gt $((($tailleX*$imgY)/$imgX)) ];
|
if [[ $tailleY -gt $((($tailleX*$imgY)/$imgX)) ]];
|
||||||
then
|
then
|
||||||
mult=$tailleX
|
mult=$tailleX
|
||||||
div=$imgX
|
div=$imgX
|
||||||
|
Loading…
Reference in New Issue
Block a user