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.
 
 
 
 
 
 

21 lines
427 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. # 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. exec 2>/dev/null
  11. filename=$(basename -- "$1")
  12. filesize=$(du -Hh -- "$1" | cut -f 1)
  13. geometry="${2}x${3}"
  14. echo "${filesize}${s}${geometry}${s}${filename}"