Tmux, Starship, and Neovim, the trio to make your terminal better
I like using the terminal (also called the console). On every computer I use, I always have it opened as one of the windows. I use it for SSHing into my homelab and VPSes, installing apps, managing files. I prefer the terminal rather than clicking through a GUI.
So, if it’s a tool that I use so often, why not make it more usable and prettier?
In this blog post I want to show my terminal setup, the different tools I use to make it nicer. It’s not meant to be a full tutorial how each tool can be configured, but more of an example of what can be achieved. There are many way to setup a terminal, but this one is mine. My terminal is my best friend. I must master the terminal…
OK, I better stop now. Anyway, here’s the final result:
As the base, I just use bash. I used zsh for some time, but I went back to the default shell shipped with Debian and Kubuntu, the OSes that I use.
I have been building this configuration over the last several months, so I cannot provide the source for each and every change, but if my memory serves me right, this Youtube video has been the basis of most of the config.
tmux
tmux is a terminal multiplexer. While it sounds like a technology from Star Trek (Mr Spock, the terminal multiplexers are down, fetch the ion torpedoes!) what it means is that the terminal window can be divided into multiple windows, each having multiple panes, and in each of those panes a different command can be run. Another useful feature is that you can detach tmux from your terminal, meaning anything run in it will continue to run but in the background. Useful for long-running commands when you need to turn off your PC or close the SSH connection.
tmux can be installed using your preferred package manager, for me it’s
sudo apt install tmuxtmux on itself is already useful, but it feels a bit… raw. However, it can be made much nicer by adding a custom configuration file and plugins.
First, let’s install the tmux plugin manager:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpmThe second step is installing a nice theme. I prefer the catppuccin theme:
git clone https://github.com/catppuccin/tmux ~/.tmux/themes/catppuccinThird step is to get Nerd Fonts, fonts with additional glyphs to use with the theme. My font of choice is the Noto Nerd font that can be downloaded from Nerd Fonts.
I guess the way to add new fonts differs between distros. For my Kubuntu it’s:
sudo apt install unzip
mkdir ~/.fonts
cd ~/.fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Noto.zip
unzip Noto.zip
# update the font cache
fc-cache -fv
# if the command above is not found: sudo apt install fontconfigSometimes new fonts do not load properly, then it is best to just reboot.
With everything installed, we can create the config file in the home directory:
# ~/.tmux.conf
set-option -g default-terminal 'tmux-256color'
set -g base-index 1 # start indexing windows at 1 instead of 0
set -g detach-on-destroy off # don't exit from tmux when closing a session
set -g escape-time 0 # zero-out escape time delay
set -g history-limit 1000000 # increase history size (from 2,000)
set -g renumber-windows on # renumber all windows when any window is closed
set -g set-clipboard on # use system clipboard
set -g status-position top # macOS / darwin style
set -g default-terminal "${TERM}"
# toggle panes with Vim shortcuts
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#install plugins
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tpm'
set -g @catppuccin_flavor 'mocha'
# Load catppuccin
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
# Configure top bar
set -g status-right-length 100
set -g status-left-length 100
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_application}"
set -agF status-right "#{E:@catppuccin_status_cpu}"
set -ag status-right "#{E:@catppuccin_status_session}"
set -ag status-right "#{E:@catppuccin_status_uptime}"
set -agF status-right "#{E:@catppuccin_status_battery}"
# use current path when opening new pane
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
run '~/.tmux/plugins/tpm/tpm'I hope the particular settings are self-explanatory. For more details, consult the docs or the video I linked above. And le voila, now your tmux will be pretty.
Starship
Starship is a customizable prompt for your terminal. A prompt is basically the thing that you see at the beginning of the input line when you type something in the terminal.
Starship can be installed using a package manager or the easy-but-shady method of piping curl to bash. The installation docs are here. To render properly, starship requires a Nerd Font that we already installed in the previous step.
A lot of things works straight out of the box, like showing the git repository status or the Python virtual environment, and additional configuration can be done using, you would never guess it, a configuration file, ~/.config/starship.toml.
The full configuration docs are available here.
Here’s mine:
# don't add newline after the prompt
add_newline = false
# always show machine hostname
[hostname]
ssh_only = false
format = '[$ssh_symbol](bold blue)[$hostname](bold blue)'
trim_at = '.companyname.com'
disabled = false
# always show machine IP
[localip]
ssh_only = false
format = '@[$localipv4](bold blue) '
disabled = falseNeoVim
The final part of the Terminal Trio is Neovim, an evolution of the evergreen text editing machine, Vi. Nvim can be installed using your package manager of choice, or by downloading the binary.
Nvim also has support for plugins, there are several available plugin engines, and from them, I use Vim-plug. It can be installed by downloading the plug.vim file into the nvim’s autoload directory:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vimMore information and alternative methods can be found in the Vim-plug docs
With the plugin manager installed, the next step is to create the configuration file and paste the desired settings into it:
mkdir -p ~/.config/nvim
nvim ~/config/nvim/init.vimAnd here’s my config file:
set mouse=v " middle-click paste with
set hlsearch " highlight search
set incsearch " incremental search
set tabstop=4 " number of columns occupied by a tab
set softtabstop=4 " see multiple spaces as tabstops so <BS> does the right thing
set expandtab " converts tabs to white space
set shiftwidth=4 " width for autoindents
set autoindent " indent a new line the same amount as the line just typed
set number " add line numbers
set wildmode=longest,list " get bash-like tab completions
set cc=80 " set an 80 column border for good coding style
filetype plugin indent on "allow auto-indenting depending on file type
syntax on
set clipboard=unnamedplus " using system clipboard
filetype plugin on
set cursorline " highlight current cursorline
" plugins section
" Start NERDTree and put the cursor back in the other window.
autocmd VimEnter * NERDTree | wincmd p
:let g:NERDTreeWinSize=60
" Exit Vim if NERDTree is the only window remaining in the only tab.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | call feedkeys(":quit\<CR>:\<BS>") | endif
call plug#begin()
" List your plugins here"
" A Tree-like side bar for better navigation
Plug 'preservim/nerdtree'
" A cool status bar
Plug 'vim-airline/vim-airline'
call plug#end()Most of the settings are either self-explanatory or explained with comments. I am using two Nvim plugins: NERDTree and vim-airline. The first one adds a file manager to the side of nvim, to make it work more like an IDE, and the second one adds a status bar wit useful information, like the current mode or rows and column numbers.
When the configuration file is saved and you open Nvim again, you’ll get an error that the plugins are not installed. To install them, do :PlugInstall when in command mode in Nvim.
nala
Finally, I would like to mention nala, about which I heard in the Linux Matters podcast. Nala is an alternative frontend to apt, the package manager of Debian and its derivatives. Under the hood it uses the same library as apt, but has a much nicer and friendlier look and feel. The commands are mostly the same, running nala upgrade with both update the local package information, and install the new versions of packages. Just a fun, small thing to brighen up your terminal even further.
Bottom Line
And that’s it, hope my post will be an inspiration for you to make your terminal have a dash of sparkle. What terminal enhancements do you use? For the time being I have turned off comments as I was not happy with my comments system, and I removed all superflous services from my VPS after the last attack, but you can reach me through email or the Fediverse, links in the footer.
Thanks for reading!
If you enjoyed this post, please consider helping me make new projects by supporting me on the following crowdfunding sites:


