diff options
| author | mhdzli <50514359+mhdzli@users.noreply.github.com> | 2020-03-16 04:22:24 +0330 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-15 20:52:24 -0400 |
| commit | 9e4cfc127d33980d4e037d17fc3abb439d7363b3 (patch) | |
| tree | b1f8082bfa07d2bc889e8f7c762685be701746ec /.local/bin/setbg | |
| parent | db46b82f7f0fe7d8bb76246e1e4b9947f4187012 (diff) | |
| download | eibhear-9e4cfc127d33980d4e037d17fc3abb439d7363b3.tar.gz eibhear-9e4cfc127d33980d4e037d17fc3abb439d7363b3.tar.zst eibhear-9e4cfc127d33980d4e037d17fc3abb439d7363b3.zip | |
Just find pictures (#499)
Filter the pictures in directory by file extensions
Diffstat (limited to '.local/bin/setbg')
| -rwxr-xr-x | .local/bin/setbg | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/setbg b/.local/bin/setbg index ea5bc14..728df4c 100755 --- a/.local/bin/setbg +++ b/.local/bin/setbg @@ -10,7 +10,7 @@ [ -f "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." -[ -d "$1" ] && mv "$(find "$1" -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen." +[ -d "$1" ] && mv "$(find "$1"/*.{jpg,jpeg,png} -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen." # If pywal is installed, use it. type wal >/dev/null 2>&1 && { wal -c ; |
