Skip to content

lVoidi/Icon-ls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icon ls

image


Installation

It is required to have a terminal with nerd fonts installed: the nerd fonts.


After you install the script, you have 3 options:

  • You can create a binary file by using pyinstaller or py2bin
  • You can create a simple alias in your .zshrc to call the script
  • Or you can make the script executable

I will explain the second option because it is way easier and its the same thing

we need to go our home directory

    cd
  

and then edit your shell config file. For this, you can use vim, neovim, emacs, nano or any other

    # USE YOUR TEXT EDITOR HERE
    
    # For zsh
    nvim .zshrc

    # bash shell
    nvim .bashrc
  

then, add this line to the end of your file, changing the path/to/script.py to your actual path

    alias ls="python3 path/to/script.py"
  

restart your terminal and you're done!

NOTE: To make your script executable use the command chmod +x /path/to/script.py


Docker

You can also run this tool using Docker. The Docker setup includes the required Nerd Fonts pre-installed.

Using docker-compose (Recommended)

    # Build and run the container
    docker-compose run ls-icons

    # To run in a specific directory
    docker-compose run ls-icons directory/

    # To run with options
    docker-compose run ls-icons -sh
  

Using Docker directly

    # Build the image
    docker build -t icon-ls .

    # Run the container
    docker run --rm -v $(pwd):/app icon-ls

    # To run in a specific directory
    docker run --rm -v $(pwd):/app -w /app icon-ls directory/

    # To run with options
    docker run --rm -v $(pwd):/app icon-ls -sh
  

Note: The Docker setup includes:

  • Pre-installed DejaVuSansMono Nerd Font
  • Python 3.9 environment
  • Proper terminal color support


Usage

Type in your terminal ls

You can also see what's inside a directory ls directory/

Options

      -h  --help                      Shows this dialog
      -sh -a --show-hidden            Shows the hidden files
      -oh -hi --only-hidden           Shows ONLY the hidden files
      -ex --exclude                   Excludes a file extension, for example:
                                              ls -ex 'py'
                                              This will exclude all the python files
      -od -d --only-dirs              This will display only the directories
  


Thanks for using my script!

Releases

No releases published

Packages

No packages published