A command line image viewer
> go build .
> gv [options] {image_file_path_name}
> cat {image_file_path_name} | gv [options]
-i
: invert the image brightness (optional, default: false)-w {number}
: limit the maximum width in pixels (optional, default: screen width)-h {number}
: limit the maximum height in pixels (optional, default: screen height)
You can use this to fzf
's preview
> ls *.png | fzf --preview "gv -w 100 {}"
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣶⣶⣾⣿⢿⡿⣿⣷⣶⣶⣦⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣶⣶⣿⣶⣾⡿⠟⣋⣡⣤⣖⡶⣞⣞⢷⣛⡾⢶⡳⠶⠦⣬⣉⠛⢿⡿⠿⠿⢿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⢠⣿⠟⣠⠶⠻⠂⣴⠚⣡⣴⣶⣶⣶⣬⡑⢯⣟⡼⢃⣴⣾⣿⣿⣷⣦⡙⢷⣄⠙⠻⣳⡌⢻⣷⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⢻⣿⠈⣿⡄⢠⣿⡁⡾⠉⠉⣿⣿⣿⣿⣿⢈⡿⠠⡏⠀⡘⣿⣿⣿⣿⡗⢸⣳⢧⠘⡷⠃⣼⡿⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⣶⢀⣯⠿⣥⠘⣶⣶⣿⣿⣿⡿⢋⡼⠋⠧⠙⢷⣿⣿⣿⡿⠟⣡⡟⣶⢏⣇⢸⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⢸⣯⢞⣧⣟⣳⣤⣤⣴⢲⠎⣤⣤⣀⣤⣤⣍⠲⣶⡞⣯⡟⣽⣝⡮⣟⢾⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⢸⣟⣭⡟⣞⣳⡽⣞⡽⡽⣦⠉⣤⡄⣦⠌⣡⣼⣛⡾⡽⣭⣻⢽⣚⣯⢽⡂⣿⣟⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣏⢸⡳⢿⣹⢶⡻⣝⡾⣣⣟⢧⡷⣈⣤⣌⡴⢯⣛⣧⢿⣹⡞⣧⠷⣾⣹⢾⡁⢿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣹⣿⢈⡿⣱⢿⣱⠾⣝⡾⡽⢶⣫⡟⣞⣧⠿⣭⠷⣞⣳⢯⣳⢟⣮⡽⣛⣧⢿⡁⢿⣟⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⠀⣿⣚⣯⢶⣻⡼⣛⣮⠷⣽⡺⣵⢯⣳⡞⣧⡟⣾⣱⡟⣽⡞⣽⣫⣞⠷⡆⢽⣿⣦⣄⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢸⣿⠁⢶⡿⠀⣯⢷⣫⣟⡼⣏⡾⣝⡾⣝⡾⣵⣻⢼⡻⣼⢻⣼⢻⡵⣛⣾⡹⢷⣹⢧⡇⢸⡗⠈⣿⡧⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠈⠿⣷⣶⣾⠐⣯⢷⣛⡿⡼⣶⢻⣝⡾⣹⠾⣽⢶⡻⣝⡶⣏⣷⢳⡾⣭⢿⣹⡳⣞⢯⡇⢸⣶⣿⠟⠁⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡟⢸⣎⣟⣮⢟⣮⢟⣮⠷⣞⣧⢯⡗⡿⡼⡽⣞⢯⣞⠷⣽⡭⣷⣫⡽⢶⡳⣏⢸⣿⡃⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⢸⣏⡿⣺⣝⡾⣣⢿⣹⡞⣯⡽⣝⡾⣎⡿⡵⢯⣾⣹⡳⢯⣻⢳⡞⣧⡟⡧⢸⣿⠄⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣏⢸⡞⣯⡽⣞⢯⣞⡽⣳⣏⢷⣻⠼⣏⣾⢫⡾⣭⢟⣳⡞⣧⡟⣧⠿⣼⣫⠇⣸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⠐⣯⢷⣫⣟⢮⡷⣫⣞⣯⡽⣞⡽⢮⣗⢯⣞⢷⡳⣽⢞⣵⡻⣖⣯⢳⡻⢀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣧⠘⣿⣱⢯⣳⢯⣻⡼⣛⣷⢺⢯⡽⣞⢧⡿⣱⣞⢯⣳⣏⢿⣱⢯⡳⢁⣾⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡄⠙⢯⢷⡻⣼⢏⣾⢳⣏⡾⣏⣶⣛⡾⣝⣧⢯⡟⣵⣳⠭⢃⠰⣿⣯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣟⠰⢩⡿⠓⣠⣌⣉⠛⠓⠯⠾⠽⠽⠾⠽⠞⠮⠓⢋⣉⣤⣦⡙⢿⡉⠄⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠿⣷⣶⣾⡿⠋⠉⠙⠛⠻⠿⠿⠿⠿⠿⠿⠿⠿⠛⠛⠉⠁⠙⠻⣿⣾⡿⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
Make a text image with this and paste it into text contents
# make an inverted image and copy it
> gv -i {image_file_path_name} | pbcopy
- including a cool logo in your cli command application
- just for fun