add sort-wallpapers script
This commit is contained in:
parent
80ec64a9c5
commit
6ef2e516ef
1 changed files with 29 additions and 0 deletions
29
scripts/sort-wallpapers
Executable file
29
scripts/sort-wallpapers
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# WALLPAPER_DIR=${HOME}/Drives/Stuff/Pictures/Waifus
|
||||
WALLPAPER_DIR=${HOME}/Pictures/Screenshots
|
||||
|
||||
readarray -td '' wallpapers < <(
|
||||
fd -ap -e jpg -e jpeg -e png -e webp \
|
||||
--max-depth 2 \
|
||||
--print0 \
|
||||
--base-directory "$WALLPAPER_DIR"
|
||||
)
|
||||
|
||||
# open all images in imv
|
||||
imv "${wallpapers[@]}" &
|
||||
pid=$!
|
||||
|
||||
sleep 1
|
||||
|
||||
for img in "${wallpapers[@]}"; do
|
||||
|
||||
echo "$img"
|
||||
sleep ".2"
|
||||
|
||||
imv-msg "$pid" next
|
||||
done
|
||||
|
||||
imv-msg "$pid" close all
|
||||
Loading…
Add table
Add a link
Reference in a new issue