A Simple X Image Viewer
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.
 
 
 
 
 
 

20 lines
512 B

  1. #!/bin/sh
  2. # Example for $XDG_CONFIG_HOME/sxiv/exec/image-info
  3. # Called by sxiv(1) whenever an image gets loaded,
  4. # with the name of the image file as its first argument.
  5. # The output is displayed in sxiv's status bar.
  6. s=" | " # field separator
  7. filename=$(basename "$1")
  8. filesize=$(du -Hh "$1" | cut -f 1)
  9. geometry=$(identify -format '%wx%h' "$1[0]")
  10. tags=$(exiv2 -q -P v -g "Iptc.Application2.Keywords" "$1" | tr '\n' ',')
  11. tags=${tags%,}
  12. echo "${filesize}${s}${geometry}${tags:+$s}${tags}${s}${filename}"