Mostrando entradas con la etiqueta fondo de pantalla. Mostrar todas las entradas
Mostrando entradas con la etiqueta fondo de pantalla. Mostrar todas las entradas

25 febrero 2018

Script Bash Wallpapers Dinamicos Linux


#!/bin/bash
Dir="/home/$USER/.config/awesome/wallpaper/"
if [ ! -d "$Dir" ]; then
echo "Not Exist $Dir"
exit 1
fi
SetBG () {
TotalFiles=$( ls -1 "$Dir" | wc -l )
RandomNumber=$(( $RANDOM % $TotalFiles ))
test ! $RandomNumber = 0 || RandomNumber=1
RandomFile="$( ls -1 $Dir | head -n $RandomNumber | tail -n 1)"
#echo "Selected File: $RandomFile"
feh --bg-fill "${Dir%/}/${RandomFile}"
}
while true; do
SetBG
sleep 10m
done