diff --git a/scripts/getMadame.sh b/scripts/getMadame.sh index 6be6eb2..f0d5ad0 100755 --- a/scripts/getMadame.sh +++ b/scripts/getMadame.sh @@ -14,7 +14,6 @@ ########################################### page= -set -x function usage { script_name=`basename "$0"` echo "Usage $script_name [Day]" @@ -68,7 +67,7 @@ function resize { res= if [ -e /usr/bin/xrandr ]; then - res=$(xrandr | tail -1 | awk '{print $1}') + res=$(xrandr | grep '*' | awk '{print $1}') else res=$(xdpyinfo | grep dimensions | awk '{print $2}') fi @@ -84,7 +83,7 @@ function resize { mult=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 [ $tailleY -gt $((($tailleX*$imgY)/$imgX)) ]; + if [[ $tailleY -gt $((($tailleX*$imgY)/$imgX)) ]]; then mult=$tailleX div=$imgX