aboutsummaryrefslogtreecommitdiff
path: root/bin/wallpaper
blob: 41526a8568d0468c5383855f53f205efbaa3ba84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# Baseado no script do Luke Smith

<<<<<<< HEAD
DIR="$HOME/imagens/wallpapers"
=======
DIR="$HOME/Imagens/wallpapers"
>>>>>>> fe53ac6 (Tentativa de consertar o librewolf ainda não deu certo)
WAL="$DIR/wall.png"

# se o diretório existir, pegue um arquivo aleatoriamente
[ -d "$DIR" ] && IMG=$(find "$DIR"/* | shuf -n 1)

# se a imagem for diferente do wallpaper atual, copie-a
[ "$IMG" != "$WAL" ] && cp "$IMG" "$WAL"

xwallpaper --stretch "$WAL"