[Feature Request] Resolution and Size in Status Bar
I was looking through the code to see how you were populating the status bar but couldn't suss it out.
I wanted to add a field to display image resolution and size. How could I do this?
Thanks
The function where the text for the title- and statusbar is generated is update_info().
But the information you want to display needs to be generated. As far as I remember it is currently not available.
File size should be easy with os.path.getsize. Dunno for the image resolution. But I assume there is a function in GdkPixbuf or Gdk.
Hope that helps
Thank you! I did this earlier and figured I could do it with a shell script
file *.png | grep '[0-9]* x [0-9]*' | string split ',' | grep '[0-9]* x [0-9]*'
this will take all the *.png in the current directory and output all their resolutions on each line.
Don't know much about Gdk however
Or even better:
fd -e jpg -e png -x identify {} | awk '{print $3}'
find could be used instead of fd-find and identify and awk are pretty standard on posix systems.