Okay, I was stupid. I ran a bash script I got off of some forum on the internet, github I think it was, that said a cool matrix would appear in the terminal, which did happen, but it also messed up my keyboard.
In order to write just this help message, I have had to copy-paste every m,w,., and d, or else they look like this: ñ,ü,ç, and ɗ
Is there some way to undo this? I know this looks hilarious, but it really sucks to type.
I was wondering if someone that knew bash scripting could help me reverse the damage these are the problems I have in terminal.
This happens when I try to modify the script:
E325: ATTENTION
Found a swap file by the name ".bash matrix.swp"
owned by: chris dated: Thu Jan 8 00:35:25 2015
file name: ~chris/Documents/pr0grams/bash matrix
modified: YES
user name: chris host name: ubuntu
process ID: 16416
While opening file "bash matrix"
dated: Sun Dec 7 23:35:13 2014
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r bash matrix"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".bash matrix.swp"
to avoid this message.
Swap file ".bash matrix.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
And this is the script itself:
#!/bin/bash blue="\033[0;34m" brightblue="\033[1;34m" cyan="\033[0;36m" brightcyan="\033[1;36m" green="\033[0;32m" brightgreen="\033[1;32m" red="\033[0;31m" brightred="\033[1;31m" white="\033[1;37m" black="\033[0;30m" grey="\033[0;37m" darkgrey="\033[1;30m" colors=($green $brightgreen) spacing=${1:-100} scroll=${2:-0} screenlines=$(expr `tput lines` - 1 + $scroll) screencols=$(expr `tput cols` / 2 - 1) chars=(ア イ ウ エ オ カ キ ク ケ コ サ シ ス セ ソ タ チ ツ テ ト ナ ニ ヌ ネ ノ ハ ヒ フ ヘ ホ マ ミ ム メ モ ヤ ユ ヨ ラ リ ル レ ロ ワ ン) count=${#chars[@]} colorcount=${#colors[@]} trap "tput sgr0; clear; exit" SIGTERM SIGINT && setxkbmap gh fula if [[ $1 =~ '-h' ]]; then echo "Usage: matrix [SPACING [SCROLL]]" exit 0 fi clear tput cup 0 0 while : do for i in $(eval echo {1..$screenlines}) do for i in $(eval echo {1..$screencols}) do rand=$(($RANDOM%$spacing)) case $rand in 0) printf "${colors[$RANDOM%$colorcount]}${chars[$RANDOM%$count]} " ;; 1) printf " " ;; *) printf "\033[2C" ;; esac done printf "\n" done tput cup 0 0 done
It then asked to create an encryption key, and I remember it.
Please help, I know I was an idiot and should have tested it in a virtual environment first.
EDIT that formatted terribly, I found the forum I got it from: https://github.com/MKorostoff/bash-sandbox/blob/master/matrix.sh