leo-arch / clifm

The shell-like, command line terminal file manager: simple, fast, extensible, and lightweight as hell.
https://github.com/leo-arch/clifm/wiki
GNU General Public License v2.0
1.33k stars 40 forks source link

the option ListDirsFirst doesn't work initially #217

Closed muellerto closed 1 year ago

muellerto commented 1 year ago

Describe the bug When ListDirsFirst is true and clifm starts up the directories do not appear first.

Expected behavior Directories should be at first, also in the initial case, when ListDirsFirst demands that.

Screenshots 1 Immediately after startup with ListDirsFirst=true. All blue entries are directories.

Desktop (please complete the following information):

Additional context Does happen independent from the view (short, long). Does also survive refreshes by Enter or rf. Does also survive directory changes and jumps. It seems that this option is ignored while reading the clifmrc file.

leo-arch commented 1 year ago

@muellerto, please run with a fresh config file (clifm -P newprof) and in stealth mode (clifm -S) to discard any issue in the config file.

It seems that this option is ignored while reading the clifmrc file

Even if this option is ignored, it is the default value.

muellerto commented 1 year ago

Made a complete new profile now. This solves this problem. Dirs are indeed first now.

I also saw now the new option to classify files and show a symbol for the result, for instance '@'. Works good. But I removed it again because it makes it somehow hard to read. Would be good either to have spaces around the symbol or to have the symbol and the end of the filename as usual.

leo-arch commented 1 year ago

Good to know! But still, old config files shouldn't be an issue. So, I'll keep trying to reproduce this using old configs.

As to the new symlinks option, yes, true, it's not visually compelling yet.

Would be good either to have spaces around the symbol or to have the symbol and the end of the filename as usual

Spaces around the symbol: Maybe a good approach, but too much work. I need to recompute all columns and file lengths.

Symbols at the end: More traditional, but I don't think it will improve readability.

I experimented with colors for the symbol, but couldn't find any highlighting the symbol enough, mostly because the target file name could be of any color.

Maybe a different symbol, like ! or something like that, which takes less space and adds thus to readability. However, it would be confusing, since whatever different symbol I use, it wouldn't be what is usually used to mark symlinks.

Not sure, but I'll find a way out of it.

Thanks for your suggestions @muellerto!

leo-arch commented 1 year ago

Added a new color code (lc, standing for Link Character) to make the symlink indicator color customizable.

To customize it just edit your color scheme file (via cs edit) and add the new color code to the InterfaceColors field. Something like this:

InterfaceColors="...:lc=1;38;5;214:..."

This gives you a bold orange symlinks indicator.

The default color is cyan (bold on 4-bit setups, i.e. only 16 colors support).

Hopefully, this will make the symlink indicator stand out better. If you have a better suggestion for the default color, just let me know it.