Skip to main content

Pure Python implementation of subset of ls command with colors and icons

Project description

Colorls

Pure Python implementation of ls command with colors and icons. Inspired from colorls. Requires Nerd Fonts for icon/glyphs.

Note: This is not optimized and runs an order of magnitude slower than native ls.

Installation

This is intended to run as an executable and not a library, it is preferable to use a tool such as pipx or uv tool

pipx install color-ls

[!NOTE] To customize the colors or add / change icons, copy config/colorls.toml to either $XDG_CONFIG_HOME/colorls/colorls.toml or ~/.colorls.toml and update as required. Alternatively, you can call lx with a (partial) config file using the -c flag.

Usage

lx --help

usage: colorls.py [-h] [-1] [-a] [-B] [-d] [-f] [--sd] [--sf] [-F] [-i]
                  [-I PATTERN] [-l] [-n] [-R] [-t [DEPTH]] [--version] [--si]
                  [-r] [-U] [-H] [-x] [--report] [--dump-config]
                  [-c [CONFIG_FILE]]
                  ...

Pure Python implementation of `ls` command. Only a subset of available
arguments are implemented

positional arguments:
  FILE                  List information about the FILE(s).

options:
  -h, --help            show this help message and exit
  -1                    list items on individual lines
  -a, --all             do not ignore entries starting with .
  -B, --ignore-backups  do not list implied entries ending with ~
  -d, --directory       list directories themselves, not their contents
  -f, --file            list files only, not directories
  --sd, --sort-directories
                        list directories first
  --sf, --sort-files    list files first
  -F, --classify        append indicator (one of */=>@|) to entries
  -i, --inode           display inode number
  -I, --ignore PATTERN  do not list implied entries matching shell PATTERN
  -l, --long            use a long listing format
  -n, --numeric-uid-gid
                        like -l, but list numeric user and group IDs
  -R, --recursive       list subdirectories recursively
  -t, --tree [DEPTH]    max tree depth
  --version             display current version number and exit
  --si                  display file size in SI units
  -r, --reverse         reverse sorting order
  -U, --unsorted        do not sort; list entries in directory order.
                        --reverse supercedes this.
  -H, --header          do not display header
  -x                    do not display icons
  --report              print counts of dirs and files
  --dump-config         dump default config to file `colorls.toml`
  -c, --config [CONFIG_FILE]
                        custom config file

Feature Requests/Bugs should be reported at https://codeberg.org/compilation-
error/colorls/issues

Screenshots

Default view

lx

No Icons

lx -x

List only files or dirs

lx -f lx -d

List files or dirs first

ls --sf lx --sd

Long Listing

lx -l

Tree View

lx -t[=3]

Globs should work as well

lx -I

Current Version

lx --version

Requirements

  • Python 3.10 or higher
  • Nerd Fonts

License

GPL-3.0-or-later

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

color_ls-3.0.4.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

color_ls-3.0.4-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file color_ls-3.0.4.tar.gz.

File metadata

  • Download URL: color_ls-3.0.4.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for color_ls-3.0.4.tar.gz
Algorithm Hash digest
SHA256 06c9cabef6158f6021b0ff68216e4ae3f03e73e2351164cfd47bca39d3cb6d37
MD5 4a21869fa8456da3720b9eaf8aa84f27
BLAKE2b-256 6199ef8a595a62b7b4fbbc8b48edf13408eb47ec06ab43420ea2bedd9e12cb8c

See more details on using hashes here.

File details

Details for the file color_ls-3.0.4-py3-none-any.whl.

File metadata

  • Download URL: color_ls-3.0.4-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for color_ls-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f0410224fc3c08454d480a2801c99ffe12cedc53fa8275d880f4cc9e993ce4a0
MD5 250e243524b84cb429806dd898b95d55
BLAKE2b-256 2ccb6ea140802edc6afa1495a6fe4b8bbaf5faded1573085d463a1187945da9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page