You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
541 B
Bash
25 lines
541 B
Bash
#!/bin/bash
|
|
|
|
wallpapers_dir=~/.local/share/wallpapers
|
|
finder="rofi-dmenu Wallpaper"
|
|
|
|
cd "$wallpapers_dir"
|
|
|
|
# fzf selector
|
|
if [ "$1" == '-s' ] ; then
|
|
# follows links and omits the env file
|
|
selection=$(find -L -type f -printf '%P\n' | $finder)
|
|
if [ -n "$selection" ] ; then
|
|
# didnt exit
|
|
feh --bg-scale "$selection"
|
|
fi
|
|
fi
|
|
|
|
# feh slideshow selector
|
|
if [ "$1" == '-p' ] ; then
|
|
# follows links and omits the env file
|
|
# find -L -type f -printf '%P\n' | feh -A "echo '%f';"
|
|
echo "BROKEN">&2
|
|
exit 1
|
|
fi
|