From 173803c6b7434d576978815357aa5f57f40f9e10 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 21 Oct 2016 17:32:05 +0200 Subject: [PATCH] [script]fix getMadame --- scripts/getMadame.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/getMadame.sh b/scripts/getMadame.sh index a8db72d..4d0c0c9 100755 --- a/scripts/getMadame.sh +++ b/scripts/getMadame.sh @@ -67,7 +67,7 @@ function resize { res= if [ -e /usr/bin/xrandr ]; then - res=$(xrandr | grep '\*' | awk '{print $1}') + res=$(xrandr | grep '\*' | awk '{print $1}' | head -1) else res=$(xdpyinfo | grep dimensions | awk '{print $2}') fi @@ -118,7 +118,7 @@ then mkdir $dirprefix; fi -wget -O - "http://www.bonjourmadame.fr${page}" | grep -Eo "(http://www.bonjourmadame.fr/photo/[^\"]+)|(http://[0-9]+.media.tumblr.com/tumblr[^\"]+)" | head -n 1 | wget -q -i - -O $todaywp +wget -O - "http://www.bonjourmadame.fr${page}" | grep -Eo "(http://[0-9]+.media.tumblr.com/[0-9a-z]+/tumblr[^\"]+)" | head -n 1 | wget -q -i - -O $todaywp echo Photo downloaded OK #ls $fileprefix* | sort -r | tail -n +2 | xargs rm -f @@ -130,7 +130,6 @@ fi fixdbus - if [[ -e /usr/bin/feh ]] then DISPLAY=:0 feh --bg-center $todaywp