- Dependecia:
Feh
- Apunte esta (
Dir="/home/$USER/.config/awesome/wallpaper/"
) linea acia su directorio de preferencia. - Otorge permisos de ejecución: chmod +x Cambiar_wallpapers.sh
- Inícielo con el sistema.
- https://github.com/Tarrasquero/Wallpapers-Din-mico-Feh-
#!/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 |