izer is a command-line tool for adding icons to filenames.
izer is heavily inspired by VimDevIcons.
- Portable, no dependencies
- Fast
- Icon sets for different fonts
- Colored icons
- Deiconize feature for removing icons from filenames
- Smooth integration with fzf
BenchmarkDeiconize-8 10 1118691512 ns/op
--- BENCH: BenchmarkDeiconize-8
deiconize_bench_test.go:28: Input size: 44148 KB - 1356000 lines
BenchmarkIconize/Nerd-8 10 1301644333 ns/op
BenchmarkIconize/NerdColor-8 10 1567274214 ns/op
BenchmarkIconize/NerdDir-8 10 1829822057 ns/op
BenchmarkIconize/NerdDirColor-8 10 2202257278 ns/op
--- BENCH: BenchmarkIconize
iconize_bench_test.go:32: Input size: 19472 KB - 1356000 lines
The release page includes precompiled binaries for Linux, FreeBSD, macOS and Windows.
go get -u github.com/NightWolf007/izer
iconize
command adds icons to filenames.
You can pass filenames to command through stdin or as arguments.
Usage:
izer iconize [flags]
Flags:
-c, --color Enable colorful output
-d, --dir Enable icons for directories (Slows down the process due checking files)
-f, --font string Font to be used. See: izer fonts
-h, --help help for iconize
# Using arguments
izer iconize -f=nerd somefile.go somefile2.py
# Using stdin
find . | izer iconize -f=nerd
Checking that filename is directory or not slows down the iconization process. Thus, by default izer handles directories as a simple files.
To enable directory icons use -d
opton.
# Using arguments
izer iconize -f=nerd -d somedir somefile.go
# Using stdin
find . | izer iconize -f=nerd -d
-c
option prints icons in ANSI colors
# Using arguments
izer iconize -f=nerd -c somefile.go somefile2.py
# Using stdin
find . | izer iconize -f=nerd -c
deiconize
command removes icons from filenames (undoing iconize command).
You can pass filenames to command through stdin or as arguments.
# Using arguments
izer deiconize " somefile.go" " somefile.py"
# Using stdin
find . | izer iconize -f=nerd | izer deiconize
To show list of all supported fonts use fonts
command.
izer fonts
Using izer with fzf
You can use izer to iconize files in fzf.
# Set default preview command
export FZF_DEFAULT_PREVIEW="fd --type file | izer iconize -f=nerd -c"
# Run fzf
fzf | izer deiconize
# Run fzf with preview
fzf --preview 'bat $(izer deiconize {})' | izer deiconize
More info about fzf usage here.
- Go 1.13
- gomplate
- golangci-lint
# Build izer binary
make
# Generate font files and test inputs from mappings
make generate
# Using make
make lint
# Alternatively, you can run golangci-lint directly
golangci-lint run
# Run all tests
make test
# Run integration tests
make itest
# Update test golden files
make goldens
# Run integration benchmarks
make bench
# Also, you can pass benchtime through variable
BENCHTIME=10x make bench