Enviado em 28/05/2015 - 16:06h
galera, preciso de um script que altera papel de parede automaticamente. o ambiente é o gnome, sistema debian! alguem pode me ajudar?
Enviado em 28/05/2015 - 16:06h
Enviado em 28/05/2015 - 18:45h
#!/bin/bash
# Para executar a cada 15 min, adicione o script ao crontab:
# $ crontab -e
# */15 * * * * DISPLAY=:0.0 /local/onde/estar-o/script-wallpaper.sh
WALLPAPERS="$HOME/Imagens/wallpapers" #coloque aqui a localização das imagens.
ALIST=( `ls -w1 $WALLPAPERS` )
RANGE=${#ALIST[@]}
let "number = 0"
let LASTNUM="`cat $WALLPAPERS/.last` + 1"
let "number = $LASTNUM % $RANGE"
echo $number > $WALLPAPERS/.last
if [ $number -gt $RANGE ];then
number=1
fi
gsettings set org.gnome.desktop.background picture-uri "file://$WALLPAPERS/${ALIST[$number]}"
Enviado em 02/06/2015 - 17:22h
#!/bin/bash
# Para executar a cada 15 min, adicione o script ao crontab:
# $ crontab -e
# */15 * * * * DISPLAY=:0.0 /local/onde/estar-o/script-wallpaper.sh
WALLPAPERS="$HOME/Imagens/wallpapers" #coloque aqui a localização das imagens.
ALIST=( `ls -w1 $WALLPAPERS` )
RANGE=${#ALIST[@]}
let "number = 0"
let LASTNUM="`cat $WALLPAPERS/.last` + 1"
let "number = $LASTNUM % $RANGE"
echo $number > $WALLPAPERS/.last
if [ $number -gt $RANGE ];then
number=1
fi
gsettings set org.gnome.desktop.background picture-uri "file://$WALLPAPERS/${ALIST[$number]}"
Entre na sua conta para responder.