Snippets

One Digital Media View a screenshot in ASCII

Created by Peter Finlayson last modified
#!/bin/bash
# Take a screenshot of an X session and render it as ascii art

# create the screenshot
temp_file=$(mktemp /tmp/snapshot-XXXXXX.png)
DISPLAY=:0 /usr/bin/scrot "$temp_file"

# prevent cacaview from displaying the screenshot within an X session
unset DISPLAY

# display the screenshot
/usr/bin/cacaview "$temp_file"
rm "$temp_file"

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.