My build of nnn with minor changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
771 B

  1. #!/usr/bin/env sh
  2. # Description: Resize images in a directory to screen resolution with imgp
  3. # imgp homepage: https://github.com/jarun/imgp
  4. #
  5. # Notes:
  6. # 1. Set res if you don't want to be prompted for desktop resolution every time
  7. # 2. minsize is set to 1MB by default, adjust it if you want
  8. # 3. imgp options used:
  9. # a - adaptive mode
  10. # c - convert PNG to JPG
  11. # k - skip images matching specified hres/vres
  12. #
  13. # Shell: POSIX compliant
  14. # Author: Arun Prakash Jana
  15. # set resolution (e.g. 1920x1080)
  16. res=
  17. # set minimum image size (in bytes) to resize (default: 1MB)
  18. minsize=1048576
  19. if [ -z "$res" ]; then
  20. printf "desktop resolution (hxv): "
  21. read -r res
  22. fi
  23. if ! [ -z "$res" ] && ! [ -z "$minsize" ]; then
  24. imgp -ackx "$res" -s "$minsize"
  25. fi