[download]

local/bin/wallpapers-menu

   1 #!/bin/bash
   2 
   3 # i=($(du -b ~/.theme/background))
   4 # n=$(find "${d[@]}" -type f -exec du -b {} + |
   5 # sort -k 2 | awk -v i=$i '$1 == i { print NR }')
   6 
   7 d=(~/Wallpapers/ /usr/share/backgrounds/)
   8 n=$(find "${d[@]}" -type f | sort |
   9 awk -v i="$(theme -h b)" '$1 == i { print NR }')
  10 
  11 sxiv -rton ${n:-1} "${d[@]}" | xargs -r theme -b