My build of nnn with minor changes
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
619 B

  1. #!/usr/bin/env sh
  2. # Description: Open images in hovered directory and thumbnails
  3. # open hovered image in sxiv or viu and browse other images in the directory
  4. #
  5. # Shell: POSIX compliant
  6. # Author: Arun Prakash Jana
  7. if [ -z "$1" ] || ! [ -s "$1" ]; then
  8. printf "empty file"
  9. read -r _
  10. exit 1
  11. fi
  12. if command -v sxiv >/dev/null 2>&1; then
  13. if [ -f "$1" ]; then
  14. sxiv -q "$1" "$PWD"
  15. elif [ -d "$1" ] || [ -h "$1" ]; then
  16. sxiv -qt "$1"
  17. fi
  18. elif command -v viu >/dev/null 2>&1; then
  19. viu -n "$1" | less -R
  20. else
  21. printf "install sxiv or viu"
  22. read -r _
  23. exit 2
  24. fi