kamiyaa / joshuto

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

feat lscolors support #489

Closed benjaminedwardwebb closed 4 months ago

benjaminedwardwebb commented 5 months ago

support LS_COLORS

This adds support for styling entries using the LS_COLORS environment variable. This styling is gated behind a configuration variable. If it's enabled, any other styling for entries based on theme configuration is ignored.

An example configuration line looks like

lscolors_enabled = true

in theme.toml.

This change adds a dependency on the lscolors crate. It addresses issue https://github.com/kamiyaa/joshuto/issues/443.

verification

I verified these changes by running

nix develop --impure
, run

on my local machine.

uname -a
Linux berrio 6.1.72 #1-NixOS SMP PREEMPT_DYNAMIC Wed Jan 10 16:10:37 UTC 2024 x86_64 GNU/Linux

Here's an image of when lscolors_enabled = true in theme.toml.

lscolors-enabled-true

Here's an image of when lscolors_enabled = false in theme.toml.

lscolors-enabled-false

I also confirmed that

benjaminedwardwebb commented 5 months ago

It looks like this addresses an existing issue https://github.com/kamiyaa/joshuto/issues/443