A Simple X Image Viewer
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

38 рядки
1.3 KiB

  1. #!/bin/sh
  2. # Example for $XDG_CONFIG_HOME/sxiv/exec/key-handler
  3. # Called by sxiv(1) after the external prefix key (C-x by default) is pressed.
  4. # The next key combo is passed as its first argument, followed by the paths of
  5. # all marked images or the path of the current image, if no image is marked.
  6. # sxiv(1) blocks until this script terminates. It then checks which images
  7. # have been modified and reloads them.
  8. # The key combo argument has the following form: "[C-][M-][S-]KEY",
  9. # where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X
  10. # keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix.
  11. key="$1"
  12. shift
  13. case "$key" in
  14. "C-c")
  15. echo -n "$@" | xsel -i ;;
  16. "C-e")
  17. for file in "$@"; do urxvt -bg "#444" -fg "#eee" -sl 0 -title "$file" -e sh -c "exiv2 pr -q -pa '$file' | less" & done ;;
  18. "C-g")
  19. gimp "$@" & ;;
  20. "C-comma")
  21. for file in "$@"; do jpegtran -rotate 270 -copy all -outfile "$file" "$file"; done ;;
  22. "C-period")
  23. for file in "$@"; do jpegtran -rotate 90 -copy all -outfile "$file" "$file"; done ;;
  24. "C-slash")
  25. for file in "$@"; do jpegtran -rotate 180 -copy all -outfile "$file" "$file"; done ;;
  26. "C-less")
  27. exec mogrify -rotate -90 "$@" ;;
  28. "C-greater")
  29. exec mogrify -rotate +90 "$@" ;;
  30. "C-question")
  31. exec mogrify -rotate 180 "$@" ;;
  32. esac