qimgv icon indicating copy to clipboard operation
qimgv copied to clipboard

[Feature request] Add natural sorting to filename sort modes by default

Open SilverKeeper opened this issue 7 months ago • 3 comments

Currently, A-Z/Z-A sorting modes go through files in a strict alphabetical order.

  • pic.jpg
  • pic1.jpg
  • pic11.jpg
  • pic20.jpg
  • pic30.jpg

In a folder with those files, pic20.jpg and pic30.jpg are shown before pic11.jpg. It's my only personal nitpick with this image viewer, so I hope it gets implemented soon. :)

SilverKeeper avatar May 21 '25 15:05 SilverKeeper

Are you using something like arch linux?

If thats' the case you might need to check if you have system locale set up properly https://wiki.archlinux.org/title/Locale

easymodo avatar May 21 '25 18:05 easymodo

Are you using something like arch linux?

If thats' the case you might need to check if you have system locale set up properly https://wiki.archlinux.org/title/Locale

Void Linux. So... yeah, /etc/locale.conf has: LANG=es_ES.UTF-8 LC_COLLATE=C

I don't see any other suggestion in the Arch article so I assume LC_COLLATE=C is the correct value, and locale command confirms it's using it. Setting it to the LANG value kind of sorts naturally, but something like pic30_2.jpg will show before pic30.jpg. I don't have this issue with Ristretto or nomacs.

SilverKeeper avatar May 21 '25 18:05 SilverKeeper

something like pic30_2.jpg will show before pic30.jpg

yep.. interestignly, it's sorted the other way around on windows. will look into this

easymodo avatar May 21 '25 20:05 easymodo