update
This commit is contained in:
parent
6ef2e516ef
commit
6113256074
5 changed files with 45 additions and 11 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -27,5 +27,5 @@ sidebar_config = 1
|
||||||
|
|
||||||
; DO NOT CHANGE!
|
; DO NOT CHANGE!
|
||||||
[Backup]
|
[Backup]
|
||||||
version = 1.2.8.923.g4f94bf0d
|
version = 1.2.9.743.g85d9593d
|
||||||
with = 2.16.0
|
with = 2.16.0
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@ for path in "${SOURCES[@]}"; do
|
||||||
delete_old "$path"
|
delete_old "$path"
|
||||||
done
|
done
|
||||||
|
|
||||||
sync
|
# Sync to MEGA
|
||||||
|
# sync
|
||||||
|
|
||||||
echo -e "${GRN}Backups done!${RST}"
|
echo -e "${GRN}Backups done!${RST}"
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,41 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# WALLPAPER_DIR=${HOME}/Drives/Stuff/Pictures/Waifus
|
SCAN_DIR=${HOME}/Drives/Stuff/Pictures/Waifus
|
||||||
WALLPAPER_DIR=${HOME}/Pictures/Screenshots
|
OUPUT_DIR=${HOME}/Drives/Stuff/Pictures/Wallpapers
|
||||||
|
# SCAN_DIR=${HOME}/Pictures/Screenshots
|
||||||
|
|
||||||
|
franchises=(
|
||||||
|
Mario
|
||||||
|
Zelda
|
||||||
|
Persona
|
||||||
|
)
|
||||||
|
|
||||||
|
orientations=(
|
||||||
|
Portrait
|
||||||
|
Landscape
|
||||||
|
)
|
||||||
|
|
||||||
|
# TODO: give option to exit script while inside fzf
|
||||||
|
get_fzf() {
|
||||||
|
# run inside subshell because fzf exit with 1 when no mach has been selected
|
||||||
|
output="$(
|
||||||
|
printf "%s\n" "$@" | fzf \
|
||||||
|
--reverse \
|
||||||
|
--height '10' \
|
||||||
|
--print-query \
|
||||||
|
--cycle \
|
||||||
|
--bind \
|
||||||
|
"alt-1:pos(1)+accept,alt-2:pos(2)+accept,alt-3:pos(3)+accept,alt-4:pos(4)+accept,alt-5:pos(5)+accept,alt-6:pos(6)+accept,alt-7:pos(7)+accept,alt-8:pos(8)+accept,alt-9:pos(9)+accept,alt-0:pos(10)+accept"
|
||||||
|
)"
|
||||||
|
echo "$output"
|
||||||
|
}
|
||||||
|
|
||||||
readarray -td '' wallpapers < <(
|
readarray -td '' wallpapers < <(
|
||||||
fd -ap -e jpg -e jpeg -e png -e webp \
|
fd -ap -e jpg -e jpeg -e png -e webp \
|
||||||
--max-depth 2 \
|
--max-depth 2 \
|
||||||
--print0 \
|
--print0 \
|
||||||
--base-directory "$WALLPAPER_DIR"
|
--base-directory "$SCAN_DIR"
|
||||||
)
|
)
|
||||||
|
|
||||||
# open all images in imv
|
# open all images in imv
|
||||||
|
|
@ -18,12 +45,18 @@ pid=$!
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
for dir in "${orientations[@]}"; do
|
||||||
|
mkdir -p "$OUPUT_DIR/$dir"
|
||||||
|
done
|
||||||
|
|
||||||
for img in "${wallpapers[@]}"; do
|
for img in "${wallpapers[@]}"; do
|
||||||
|
orientation=$(get_fzf "${orientations[@]}")
|
||||||
|
franchise=$(get_fzf "${franchises[@]}")
|
||||||
|
|
||||||
echo "$img"
|
cp "$img" "$OUPUT_DIR/$orientation"
|
||||||
sleep ".2"
|
|
||||||
|
|
||||||
imv-msg "$pid" next
|
echo "$img $orientation $franchise"
|
||||||
|
imv-msg "$pid" next
|
||||||
done
|
done
|
||||||
|
|
||||||
imv-msg "$pid" close all
|
imv-msg "$pid" close all
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue