Advertisement
mosaid

Untitled

Feb 3rd, 2019
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. dir="${HOME}/Pictures/wallhaven/111"
  4. if ! [[ -f "$dir/wlist" ]] ; then
  5.     find "$dir" -type f >| "$dir/wlist"
  6. fi
  7. index=$(cat "$dir/wIndex")
  8. index=$((index+1))
  9. wallpaper=$(cat "$dir/wlist" | sed -n "$index"p )
  10. feh --bg-fill "$wallpaper"
  11.  
  12.  
  13. echo "$index" >| "$dir/wIndex"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement