kamiyaa / joshuto

ranger-like terminal file manager written in Rust
https://crates.io/crates/joshuto
GNU Lesser General Public License v3.0
3.37k stars 148 forks source link

Scrollable tab-bar #437

Closed DLFW closed 9 months ago

DLFW commented 10 months ago

This implements a scrollable tab bar, like discussed in #233.

This makes tabs easier to read, better utilizes the space in the top-bar and makes handling many tabs way easier.

The display of the current directory has been removed. The current tab will show the directory always in full form. The directories of other tabs will be shown in full form if there is enough space, otherwise, they will be shown in a short form. If the available space in the top-bar is still not sufficient, scroll tags will be added at each end.

The long-form is currently defined as the full, absolute path. The short-form is currently defined as the last directory element of the path.

The tab-bar is configurable in terms of font styling and style character (like dividers, prefixes, and postfixes).

Documentation has been created in a separate file.

Collateral impact:

DLFW commented 10 months ago

Quick link to the documentation for tab-bar configuration in my fork: https://github.com/DLFW/joshuto/tree/nicer-tabs/docs/configuration/tabbar

I would enhance the docs in some time, I guess.

Here are two screenshots of the default configuration; without scroll tags: Screenshot_20230930_211141

...and with scroll tags: Screenshot_20230930_211736

kamiyaa commented 9 months ago

Fixed crash :+1: https://github.com/kamiyaa/joshuto/commit/cfcefaf9985adf766557e48db4fc2fb6d7498094

DLFW commented 9 months ago

Thanks @kamiyaa! Sorry for the bug... I was testing this since weeks but it seems I'm not so interested in my root dir.... 😄