[download]

local/bin/wallpaper-menu

   1 #!/bin/bash
   2 
   3 for i in ~/Wallpapers /usr/share/backgrounds
   4 do cd $i && break; done || exit
   5 
   6 i=($(du -b ~/.theme/background.jpg))
   7 n=$(find -type f -exec du -b {} + |
   8 sort -k 2 | awk -v i=$i '$1 == i { print NR }')
   9 
  10 sxiv -rton ${n:-1} . | xargs -r theme -b