From b86b6dacdf351ff84d82556be8e2cbcc482db88b Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Wed, 7 Dec 2016 16:39:50 +0200 Subject: [PATCH] Fix arithmics --- update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index 4c4997b..cbcc2d2 100755 --- a/update.sh +++ b/update.sh @@ -42,8 +42,8 @@ if [[ -z $XDG_CURRENT_DESKTOP ]]; then # Fallback for i3 esac fi -for i in {12..0..-1}; do # Loop backwards through the wallpapers - if [[ $hour -ge ${timing[i]} ]]; then +for i in $timing; do # Loop backwards through the wallpapers + if (( $hour >= $i )); then $setcmd file://$DIR/${files[i]} echo "Wallpaper set to ${files[i]}" exit