My build of nnn with minor changes
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

28 行
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