#!/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