I use the terminal a lot. Here's how:
Summary
- I use Guake as my terminal
- I use
zsh
, probably installed throughoh-my-zsh
- I use the
ctrl-r
keybind extremely frequently - I use the
home
key to go to the start of the line - I use
ctrl + arrow key
to skip across words
Guake
I use Guake as my terminal.
I press ctrl-gravekey
to toggle the terminal.
I press ctrl-shift-tab
to open a new terminal tab.
I press ctrl-shift-w
to close the current terminal tab.
I press ctrl-pageup
or ctrl-pagedown
to move through terminal tabs.
The terminal is fixed to one monitor.
It is attached to the top of the screen.
It takes up about 80% of the vertical screen height.
It takes up about 80% of the horizontal screen width.
I use a fixed-position terminal so it is always accessible.
I never need to look for the terminal window.
The terminal takes focus immediately after toggling it open, so I can type in my terminal after pressing my keybind.
zsh
I use zsh
, probably installed through oh-my-zsh
, as my shell.
I press ctrl-r
to search my command history. I highly recommend trying this.
I use !!
to redo the previous command. As an example, I do sudo !!
to run the previous command with sudo
.
I press the home
key to go to the start of the line.
I press the end
key to go to the end of the line.
I press ctrl + arrow key
to skip across words.
I have the following block in my .zshrc
. It allows me to easily jump to my projects directory. It has tab completion, so I can type something like w seanw
, which will get autocompleted to w seanwilson.ca
:
export w="/home/sean/projects"
w () {
cd "$w/$1"
}
_w () {
_files -/ -W "$w"
}
compdef _w w
I use zsh
in this matter because it has nice colors out of the box (robbyrussell
theme), shows indicators for the exit code of the previous command (green = success, red = failure), and shows the current git branch.
I have used zsh
for so long now that I forget what is missing in other shells. I believe zsh
has better tab-complete functionality too, especially for fuzzy cases or case-insensitive cases.
I have a zsh
keybind bindkey -s '^T' 'tig status^M'
so that I can press ctrl-shift-t
to open tig
. For more information, see How I Use: Tig for Git.
I have a zsh
keybind bindkey -s '^q' '!!\n\n'
so that I can press ctrl-q
to re-run the last command. I use this very often when trying to exec into a docker-compose stack that is still booting.
I have a cowsay MOTD: fortune | cowsay -f beavis.zen | lolcat
_______________________________________
/ You definitely intend to start living \
\ sometime soon. /
---------------------------------------
\ __------~~-,
\ ,' ,
/ \
/ :
| '
| |
| |
| _-- |
_| =-. .-. ||
o|/o/ _. |
/ ~ \ |
(____@) ___~ |
|_===~~~.` |
_______.--~ |
\________ |
\ |
__/-___-- -__
/ _ \
I sometimes have a bigger cowsay MOTD: paste <(fortune | cowsay -f ren) <(fortune | cowsay -f stimpy) | pr -t -e
expr $(tput cols) / 2 | lolcat
_________________________________________ ________________________________________
/ Live in a world of your own, but always \ / Compassion -- that's the one things no \
\ welcome visitors. / | machine ever had. Maybe it's the one |
----------------------------------------- | thing that keeps men ahead of them. |
\ | |
\ | -- McCoy, "The Ultimate Computer", |
____ \ stardate 4731.3 /
/# /_\_ ----------------------------------------
| |/o\o\ \ . _ .
| \\_/_/ \ |\_|/__/|
/ |_ | / / \/ \ \
| ||\_ ~| /__|O||O|__ \
| ||| \/ |/_ \_/\_/ _\ |
| |||_ | | (____) | ||
\// | \/\___/\__/ //
|| | (_/ ||
||_ \ | ||
\_| o| | ||\
/\___/ \ //_/
/ ||||__ \______//
(___)_) __ || __||
(____(____)