• Stars
    star
    1,697
  • Rank 26,441 (Top 0.6 %)
  • Language
    PowerShell
  • License
    MIT License
  • Created about 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A PowerShell module to show file and folder icons in the terminal

Terminal-Icons

A PowerShell module to show file and folder icons in the terminal.

GitHub Actions PSGallery License
GitHub Actions Status PowerShell Gallery License

Icon

Overview

Terminal-Icons is a PowerShell module that adds file and folder icons when displaying items in the terminal. This relies on the custom fonts provided by Nerd Fonts.

You must be using one of the fonts provided by Nerd Fonts for this module to work as these fonts include tons of custom glyphs/icons that are referenced by their unicode number.

How Does this Work?

It uses a custom format.ps1xml file that inspects the items being displayed and looks up their appropriate icon based on name or extension. Icons for well-known files/folders are attempted to be used first before displaying an icon based on the file extension. Any files/folders that are not matched are shown using a generic file or folder icon.

Installation

To install the module from the PowerShell Gallery:

Install-Module -Name Terminal-Icons -Repository PSGallery

You can also install it from Scoop:

scoop bucket add extras
scoop install terminal-icons

Usage

Import-Module -Name Terminal-Icons

Get-Item ./README.md

Get-ChildItem

Get-ChildItem | Format-List

Get-ChildItem | Format-Wide

Commands

Command Description
Add-TerminalIconsColorTheme Add a Terminal-Icons color theme for the current user.
Add-TerminalIconsIconTheme Add a Terminal-Icons icon theme for the current user.
Format-TerminalIcons Prepend a custom icon (with color) to the provided file or folder object when displayed.
Get-TerminalIconsColorTheme List the available color themes.
Get-TerminalIconsIconTheme List the available icon themes.
Get-TerminalIconsTheme Get the currently applied color and icon theme.
Remove-TerminalIconsTheme Removes a given icon or color theme.
Set-TerminalIconsColorTheme DEPRECATED Set the Terminal-Icons color theme.
Set-TerminalIconsIconTheme DEPRECATED Set the Terminal-Icons icon theme.
Set-TerminalIconsTheme Set the Terminal-Icons icon and/or color theme.
Show-TerminalIconsTheme List example directories and files to show the currently applied color and icon themes.

Screenshots

Get-ChildItem -Path . -Force

Screenshot 1

Tips

If using the default console in Windows and not something like VSCode, ConEmu, Terminus, etc., you may have issues getting a nerd font to be recognized correctly. Try following this quick guide by Mark Wragg. Issue #269 on Nerd Fonts has more information.

Contributions

Any ideas on how to improve this module are welcome. If you have ideas for an appropriate glyph to display for a well-known folder or file, or a particular file extension, please raise an issue. If you'd like to submit an entirely new color or icon theme, take a look at the existing ones here and here, create your new file(s) named what ever you like, and submit a pull request.

More Repositories

1

Stucco

An opinionated Plaster template for high-quality PowerShell modules
PowerShell
175
star
2

watchmen

Infrastructure test runner using Pester and OVF modules
PowerShell
83
star
3

NetScaler

PowerShell module for interacting with Citrix NetScaler via the Nitro API
PowerShell
68
star
4

github-action-psscriptanalyzer

GitHub Action to run PSScriptAnalyzer static code analysis
PowerShell
62
star
5

POSHOrigin

PowerShell framework for defining and invoking custom DSC resources to provision infrastructure.
PowerShell
56
star
6

PasswordState

PowerShell module for interacting with ClickStudio's PasswordState password management application
PowerShell
39
star
7

POSHOrigin_vSphere

DSC resources to manage VMware vSphere with POSHOrigin
PowerShell
27
star
8

AzSpeedTest

Azure speed test tool for PowerShell
PowerShell
23
star
9

Release-Pipeline-Example

Release Pipeline example using PowerShell-based tools
PowerShell
20
star
10

powershell-prompt

My PowerShell prompt
PowerShell
19
star
11

pshealthz

Basic HTTP listener written in PowerShell that executes Operation Validation Framework (OVF) tests and returns results using a simple REST API
PowerShell
19
star
12

InfoBlox

PowerShell module for interacting with InfoBlox IPAM solution
PowerShell
17
star
13

OVF.Windows.Server

Pester/OVF module to test Windows server operation
PowerShell
15
star
14

psake-github-action

GitHub Action to execute psake tasks
PowerShell
13
star
15

pssummit2018-classes

PowerShell
6
star
16

advent-of-code

PowerShell
6
star
17

presentations

Slides and demo code from various presentations
PowerShell
6
star
18

building-powershell-modules-feedback

Feedback on the PowerShell Module Development book
6
star
19

POSHOrigin_NetScaler

DSC resources to manage Citrix NetScaler with POSHOrigin
PowerShell
5
star
20

Pester.WindowsServer

A set of Pester tests for Operation Validation Framework (OVF) to test the health of a Windows Server operating system
PowerShell
4
star
21

devblackops

4
star
22

POSHOrigin_ActiveDirectoryDNS

DSC resources to manage Active Directory DNS records with POSHOrigin
PowerShell
4
star
23

devblackops.github.io

CSS
3
star
24

psake.module.tasks

Example of hosting psake tasks inside a standalone PowerShell module and invoking those tasks within a psake script
PowerShell
3
star
25

Module.Template

Plaster template for new PowerShell modules
PowerShell
2
star
26

pssummit2018poshbot

2
star
27

IsilonDsc

DSC resources to manage the EMC Isilon platform
PowerShell
2
star
28

Switch-User

Helper PowerShell module for switching the current user and securely creating credentials from the command line
PowerShell
2
star
29

dsc-summit-precon

Sample and Demo scripts for the DSC PreCon at the PowerShell and DevOps Global Summit 2016
PowerShell
1
star
30

POSHOrigin_PasswordState

PowerShell
1
star
31

watchmen.demo

Demo project showing Operation Validation testing using Pester/OVF/Watchmen
PowerShell
1
star
32

advent-of-code-2019

PowerShell
1
star
33

PSInfluxDB

PowerShell module for sending metrics to InfluxDB
PowerShell
1
star
34

.github

1
star
35

PSKnife

Powershell module for interacting with Chef similar to Chefs' knife utility but using Powershell semantics
PowerShell
1
star