Awhile back I patched Dolphin to sort hidden folders below visible files. Eg:
- Music/
- test.txt
- .git/
- .xsession-errors
Note, this applies the sort last, so it will keep them at the bottom regardless of what sort is used (filesize/filename/modified/etc).
By default, it uses the old behaviour. You'll have to go to "View > Adjust View Settings > Check Show hidden files last".
I'm not 100% sure where the "default" view settings is serialized, but from testing it worked fine when you also check "use as default".
There's a closed bug report #333219 labeled as WontFix in 2014 that mentions it's probably not what most people would expect. Recently on reddit, someone asked for the feature so I might as well upload the patch for discussion.
https://www.reddit.com/r/kde/comments/6vcujg/yet_another_support_question_concerning/
May not get accepted, but here's the list of things that would need to be done:
- Write test cases in src/tests/kfileitemmodeltest.cpp in KFileItemModelTest::testSorting()
- showHiddenFiles=true + shortHiddenFilesLast=false
- showHiddenFiles=true + shortHiddenFilesLast=true
- showHiddenFiles=false
- Test performance change on 1 million files (without patch, with patch and disabled, with patch and enabled). There's src/tests/kfileitemmodelbenchmark.cpp, though it doesn't test hidden files. It could be used to check the extra burden that was added though for normal folders. Two tests based on it could be added:
- 1-5k prefixed with . (first half needs to be moved to the bottom to emulate hidden folders moving to the bottom.
- All even numbers being hidden could be another test just to check.
- Create patch for kdialog so it's consistent across KDE? +Tests for that project.