Tag Archives: c64

C64 Gnome Terminal

Create the file .bash_c64 in your home directory and populate with the following:

#!/usr/bin/env bash
export PS1=$
row=0
mem=$(grep MemTotal /proc/meminfo | awk '{print $2}')
mem=$((${mem}/1024))
free=$(( $(vmstat | sed '1,2d' | awk '{print $4}') * 4096 * 2))
text=("" "**** BASH $BASH_VERSION ****" "" "${mem}K RAM SYSTEM ${free} BASIC BYTES FREE" "")
clear
for f in "${text[@]}"; do
  columns=$(( ($(tput cols) - ${#f}) / 2))
  tput cup $(( row++ )) ${columns}
  echo "${f}"
done
echo "READY."

Now we'll source the file whenever a new terminal is opened. Open .bashrc and at the bottom enter the following:

source ~/.bash_c64

Next we'll install the c64 font. Download the file below and unpack to /home/<user>/.local/share/fonts

Now open the terminal preferences and create a new profile and configure the basic settings. I've chosen 49 chars wide purely for aesthetics but this will differ depending on your resources. The text will be centred regardless.

Now to define the colours. I set the defaults to the following values:

Text: #7c71da
Background: #3e32a2

Set the profile to be the default (optional) and close.
You'll need to close and reopen terminal and you should be presented with a c64esk termnial.