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.

image-info 488 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # Example for $XDG_CONFIG_HOME/sxiv/exec/image-info
  3. # Called by sxiv(1) whenever an image gets loaded.
  4. # The output is displayed in sxiv's status bar.
  5. # Arguments:
  6. # $1: path to image file
  7. # $2: image width
  8. # $3: image height
  9. s=" | " # field separator
  10. filename=$(basename -- "$1")
  11. filesize=$(du -Hh -- "$1" | cut -f 1)
  12. geometry="${2}x${3}"
  13. tags=$(identify -format '%[IPTC:2:25]' ":$1" | tr ';' ',')
  14. echo "${filesize}${s}${geometry}${tags:+$s}${tags}${s}${filename}"