Skip to content

Instantly share code, notes, and snippets.

@jadedgnome
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jadedgnome/28e757656463f4f460ee to your computer and use it in GitHub Desktop.
Save jadedgnome/28e757656463f4f460ee to your computer and use it in GitHub Desktop.
feh bash function/alias , It will search current dir and subfolders for .jpg,.jpeg & .png files and write them to a file in /tmp/ (e.g /tmp/filelist-4Gf) the last 3 characters are random. feh will then load the filelist and sort the files by modified time, display filename, auto-zoom and 800x600 resolution.
fehl() {
randomfile=filelist-$(< /dev/urandom tr -dc A-Za-z0-9 |head -c 3).txt
find . -type f \( -iname "*.jpg*" -or -iname "*.jpeg*" -or -iname "*.png*" \) -printf "%p\n" | grep -v /thumbs/ >> /tmp/$randomfile ; feh -d -S mtime -Z -g 800x600 -f /tmp/$randomfile &
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment