My build of nnn with minor changes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env sh
  2. # Description: Set the selected image as wallpaper using nitrogen or pywal.
  3. # Usage: Hover on an image and run the script to set it as wallpaper.
  4. #
  5. # Shell: POSIX Compliant
  6. # Author: juacq97
  7. cmd_exists () {
  8. which "$1" > /dev/null 2>&1
  9. echo $?
  10. }
  11. if ! [ -z "$1" ]; then
  12. if [ "$(mimetype --output-format %m "$1" | awk -F '/' '{print $1}')" = "image" ]; then
  13. if [ "$(cmd_exists nitrogen)" -eq "0" ]; then
  14. nitrogen --set-zoom-fill --save "$1"
  15. elif [ "$(cmd_exists wal)" -eq "0" ]; then
  16. wal -i "$1"
  17. else
  18. printf "nitrogen ir pywal missing"
  19. read -r _
  20. fi
  21. # If you want a system notification, uncomment the next 3 lines.
  22. # notify-send -a "nnn" "Wallpaper changed!"
  23. # else
  24. # notify-send -a "nnn" "No image selected"
  25. fi
  26. fi