Skip to content

Instantly share code, notes, and snippets.

@danieloneill
Created April 16, 2024 11:12
Show Gist options
  • Save danieloneill/30beae8bb254a545f1c1f5bbfd6bad15 to your computer and use it in GitHub Desktop.
Save danieloneill/30beae8bb254a545f1c1f5bbfd6bad15 to your computer and use it in GitHub Desktop.
BASH script to display a PNG image in a Kitty-compatible terminal emulator (like Konsole)
#!/bin/sh
if [ $# -eq 0 ]
then
echo "Usage: $0 <filepath.png>"
exit 1
fi
echo -n $'\033[0C\033]1337;File=inline=1:'; cat $1 | base64 -w 0; echo $'\007'
@danieloneill
Copy link
Author

Screenshot_20240416_041217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment