Bash script to add a cheat sheet as your Windows Terminal background. Works for Ubuntu on WSL.
sudo apt-get update
# install dependencies
sudo apt-get install imagemagick
sudo apt-get install jq
# download the repository
sudo apt-get install git
git clone --depth 1 -c core.autocrlf=false https://github.com/potatopeelings/cheat ~/usr/local/scripts/potatopeelings-cheat
# add to ~/.bashrc and reload
echo 'alias cheat='\''bash ~/usr/local/scripts/potatopeelings-cheat/src/cheat.sh'\''' >> ~/.bashrc
source ~/.bashrc
To apply the sample cheat sheet
cheat -a sample
To use an image
cheat -a path/to/img
You can add your own cheat sheets
cheat -e eggs
Once you've saved the contents, apply it
cheat -a eggs
For the full list of commands, run cheat -h
Override defaults by setting the followingn environment variables in ~/.bashrc
Variable | Default | Description |
---|---|---|
CHEAT_ALIGNMENT |
topRight |
Cheat sheet alignment. See Appearance profile settings in Windows Terminal > Background image alignment |
CHEAT_COLOR |
white |
Font color |
CHEAT_FONT_SIZE |
12 |
Font size |
CHEAT_OPACITY |
0.3 |
Cheat sheet opacity |
CHEAT_SIZE |
400x600 |
Cheat sheet size |
Your sheets are saved in ./usr/local/scripts/potatopeelings-cheat/src/sheets
in case you need to back them up, or take them with you.
- Scot Hanselman's Build Reaction Gifs for the inspiration
- The wonderful people at Microsoft who worked on Windows Terminal