Skip to content

Python script for listing files and folders in a directory in a column view with Nerd Font icons and color coding.

License

Notifications You must be signed in to change notification settings

Dev-Totti/Terminal-Icons-Py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Terminal-Icons-Py

This Python script provides a convenient way to list all files in a directory in a column view, similar to the ls command in Linux. The number of columns is automatically calculated based on the terminal width. Each file/folder is accompanied by a Nerd Font icon and color, inspired by the project Terminal-Icons.

Features:

  • Column View: Display files and folders in a column layout for easy readability.
  • Automatic Column Calculation: Adjusts the number of columns based on the terminal width.
  • Dynamic Column Width: Each column dynamically adjusts its width depending on its content.
  • Details View: This view provides file/dir size, attributes, and full path.
  • Nerd Font Icons: Each file and folder is represented by a Nerd Font icon for added visual clarity.
  • Color Coding: Utilizes color to distinguish between different types of files and folders.

Usage:

Simply run the Python script in the desired directory to view the contents in a visually appealing and organized column format.

python Terminal-Icons.py

Arguments:

python Terminal-Icons.py [-p <path>] [-f <filter>] [-c <columns>] [-r] [-a] [-d]

-p, --path : Specify the directory path.

-f, --filter : Expression to filter files, e.g., *.exe.

-c, --columns : Number of columns to force in display.

-r, --recursive: Recursively list files and folders.

-a, --all: Show hidden files.

-d, --detail: Shows details view with additional information (file/dir size, attributes, and full path)

Dependencies:

  • Python 3.x
  • Nerd Fonts (for icons)

How It Works:

The script utilizes Python's built-in os module to list files and folders in the specified directory. It then calculates the optimal number of columns based on the terminal width and formats the output accordingly. Nerd Font icons and colors are applied to each entry for enhanced visualization.

License:

This project is licensed under the MIT License. Feel free to use, modify, and distribute it as per the terms of the license.

Acknowledgments:

  • Special thanks to the creators of Terminal-Icons for color/icon theme.
  • This project is inspired by the functionality of the ls command in Linux.

Screenshots:

Columns View:

Screenshot 2024-04-01 184750

Details View:

2

About

Python script for listing files and folders in a directory in a column view with Nerd Font icons and color coding.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages