LX: A nicer way to list your files
A modern alternative to ls with more readable formatting, colours, icons, and customizable output.
Features
- 🎨 Colorized output with file type icons
- 📊 Multiple display modes: short (default) and long (
-l) - 👻 Hidden files support: use
-ato show all files - ⚙️ Configurable: customize colors, spacing, and display options
- 📏 Smart alignment: properly handles unicode characters and icons
Requirements
- Rust (>= 1.56.1) and Cargo
- Either a nerd font or a terminal like Ghostty which has nerd font icons pre-installed.
Installation
The easiest way to install lx is using Cargo:
Alternatively, you can build it from source:
Now the lx command should be available in your path, and you can use it to list your files anywhere!
Usage
lx is used pretty much just like regular old ls. There are only a couple of flags at the moment, but more are on the way!
# List files in current directory
# List files in long format
# Show hidden files
# Combine flags
# List files in a specific directory
Configuration
lx can be customized using a configuration file at ~/.config/lx/config.
See config.example for all available options.
Example Configuration
(this is different from default)
[]
= "blue"
= "red"
= "white"
[]
= 3
= 7
Available Colors
black,red,green,yellow,blue,magenta,cyan,whitebright_black,bright_red,bright_green,bright_yellow,bright_blue,bright_magenta,bright_cyan,bright_white
Configuration Options
[colors]
directory: Color for directory names (default:blue)executable: Color for executable files (default:green)regular: Color for regular files (default:white)
[display]
column_spacing: Number of spaces between columns (default:2)max_rows: Maximum number of rows before wrapping to next column in short format. Set to0for no limit (default:0)- When set, each file type (directories, executables, regular files) will wrap into multiple columns after reaching the max row count
- For example, with
max_rows = 5and 12 directories, they will be displayed in 3 columns with 5 rows each - File type separation is maintained - directories, executables, and files are kept in their own sections
- Only applies to short format (default view), not long format (
-l)