Closed bebehei closed 9 years ago
Can't reproduce - we use std::map which orders lexicographically already.
Maybe your locale is not set correctly?
Sorry, I'm using an exotic combination of German/English mix. Metrics are in German Standards and Language is english. Here is my setup:
[bebe:~] % printenv | grep LC
LC_NUMERIC=de_DE.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_CTYPE=en_US.utf8
[bebe:~] % printenv | grep LANG
LANG=en_US.utf8
GDM_LANG=en_US.utf8
I don't believe the locale matters directly.
When I execute the command j4-dmenu-desktop --dmenu='tee tmp | dmenu'
. This is the head of tmp:
CMake
CaesarIA
Counter-Strike: Global Offensive
Counter-Strike: Source
Goat Simulator
OBEY
Portal 2
Robocraft
Team Fortress 2
Afternoon Stalker
This is completely unsorted. How can this be?
Turns out I am kind of dumb with my comment above. Yes, that map is ordered (of course), but I didn't remember that the key is the file name, not the application name. I just never noticed this, because on my system the first 20+ app files appear sorted correctly. Also it never shows in using it, unless you have two different Firefox'es :)
Oh, and to put the cherry on the cake: the apps should be now sorted correctly taking locale into account. So öäüß and friends should be at the right spots.
:+1: This works. Thank you! Could you please tag a release, too?
Done.
Note: Some items are seemingly not sorted - it's the GenericNames. They're output directly after the Name, so they will appear out of place compared with a output that's completely sorted.
The Items printed from
app
-object are not sorted. In my item-list these are the first two items:This not a big problem at the beginning. But after typing your keywords and dmenu gives the following suggestions:
So if I type in dmenu the word
fire
and press Return, it will executeFirefox Developer
. This behavior is crappy. To execute the program, which my search-term matches best (Firefox
) is at the last position.I propose to sort the App-list lexicographically.
Additionally, you can then use the tab-completion properly from the dmenu.
But anyway, your program is fucking fast. This bug is the only thing which hinders me to use it.