Hey y'all, I just wanted to jot down my current (January 2021) terminal setup.
I enjoy customizing my developer experience. Although it may not be functional in super productive to make things look beautiful, I appreciate nice looking interfaces, and that's all that matters 🙂. It's all for the aesthetics 💯, and none of this is essential. I do think that ZSH does help you type slightly faster, but that's not my limiting factor for speed (that would just be me).
Please note that I'm running on Arch Linux. The installation steps will definitely be different for other linux distros. Some features may not even work entirely on Windows or Mac (unless you are using WSL on windows - still unsure about Macos since I don't own a mac).
Terminal
Emulator
The first step of customizing your terminal is picking a terminal. Here on Linux, there are many different terminal emulators such as kitty, alacrity, urxvt, termite, gnome-terminal. Each terminal emulator has its pros and cons and various features. I current use Kitty since it's GPU-accelerated, and it has a very clean configuration file format. I have used urxvt and termite in the past, and I haven't noticed any significant performance differences, but I did find that urxvt is a bit harder to configure. I've also tried hyper, the electron-based emulator but found it to be slow.
Electron allows people to build desktop applications using HTML, CSS, and JavaScript; this is typically nice for writing large-scale applications where you don't want to duplicate code between web and desktop. But this comes at a cost: slower performance. Although hyper is getting better and optimizes to improve speed, I definitely have noticed that it is much slower than a traditional terminal emulator, so I avoid it.
To setup kitty you first need to create the configuration file ~/.config/kitty/kitty.conf
(there
are other ways to load a config file as seen in the docs). Here we can put all the
configuration options.
1# Loads in my color palette2include afterglow.conf34# My font that I downloaded above5font_family SpaceMono Nerd Font Mono6# I personally dislike ligatures7disable_ligatures always89# Works with picom (on linux) to add some transparency10background_opacity .61112url_color #0087bd13url_style curly1415# Enable zsh as seen below16shell zsh
And my color palette
1foreground #d0d0d023cursor #d0d0d045selection_foreground #9283746selection_background #3c383678# Black9color0 #15151510# Bright black11color8 #5050501213# red14color1 #a53c2315# light red16color9 #a53c231718# green19color2 #7b924620# light green21color10 #7b92462223# yellow24color3 #d3a04d25# light yellow26color11 #d3a04d2728# blue29color4 #6c99bb30# light blue31color12 #547c993233# magenta34color5 #9f4e8535# light magenta36color13 #9f4e853738# cyan39color6 #7dd6cf40# lighy cyan41color14 #7dd6cf4243# light gray44color7 #d0d0d045# dark gray46color15 #f5f5f5
And with that kitty should be setup!
Also check out Gogh for different color schemes.
Font
Later in the post I will talk about using starship. Starship requires having a nerd font installed and enabled for the terminal (read more here). I choose to go with space mono. I switch up my font every now and again though.
If you are using arch you can easily install this font with yay -S nerd-fonts-space-mono
(AUR
package).
Blur/Opacity
This section is very specific to Linux (again install details differ for other distros).
I am using picom, a compositor for Xorg. I'm not entirely sure how compositors work underneath the hood, but they allow you to apply specific effects to Windows, such as blurring, animations, and transparency. You can read more here. As of this writing, the base picom repo does not support dual kawase blur and rounded borders, so I am using a fork that supports both. This fork also supports window animation, which I think look nice.
1# ░█▀█░▀█▀░█▀▀░█▀█░█▄█░░░░█▀▀░█▀█░█▀█░█▀▀2# ░█▀▀░░█░░█░░░█░█░█░█░░░░█░░░█░█░█░█░█▀▀3# ░▀░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░░▀▀▀░▀▀▀░▀░▀░▀░░4#5# X compositor configuration67# ░█▀▀░█░█░█▀█░█▀▄░█▀█░█░█8# ░▀▀█░█▀█░█▀█░█░█░█░█░█▄█9# ░▀▀▀░▀░▀░▀░▀░▀▀░░▀▀▀░▀░▀1011shadow = false;12shadow-radius = 12;13shadow-opacity = 0.75;14shadow-offset-x = -12;15shadow-offset-y = -12;1617# shadow-red = 018# shadow-green = 019# shadow-blue = 020shadow-color = "#000000";2122shadow-exclude = [23"name = 'Notification'",24"class_g = 'Conky'",25"class_g ?= 'Notify-osd'",26"class_g = 'Cairo-clock'",27"class_g = 'slop'",28"class_g = 'Firefox' && argb",29"class_g = 'Rofi'",30"_GTK_FRAME_EXTENTS@:c",31"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"32];3334# shadow-exclude-reg = "x10+0+0";35# xinerama-shadow-crop = true;3637# ░█▀▀░█▀█░█▀▄░▀█▀░█▀█░█▀▀38# ░█▀▀░█▀█░█░█░░█░░█░█░█░█39# ░▀░░░▀░▀░▀▀░░▀▀▀░▀░▀░▀▀▀4041# fading = true;42# fade-in-step = 0.03;43# fade-out-step = 0.03;44# fade-delta = 3;4546# fade-exclude = [];4748# no-fading-openclose = false;49# no-fading-destroyed-argb = true;5051# ░█▀█░█▀█░█▀█░█▀▀░▀█▀░▀█▀░█░█52# ░█░█░█▀▀░█▀█░█░░░░█░░░█░░░█░53# ░▀▀▀░▀░░░▀░▀░▀▀▀░▀▀▀░░▀░░░▀░5455inactive-opacity = 1;56frame-opacity = 1;57inactive-opacity-override = false;58active-opacity = 1.0;59inactive-dim = 0.0;6061focus-exclude = [62"class_g = 'Cairo-clock'",63"class_g ?= 'rofi'",64"class_g ?= 'slop'",65"class_g ?= 'Steam'"66];6768# inactive-dim-fixed = 1.0;6970opacity-rule = [71"80:class_g = 'URxvt'",72"80:class_g = 'UXTerm'",73"80:class_g = 'XTerm'",74# "80:class_g = 'kitty'",75"80:class_g = 'Alacritty'",76# "80:class_g = 'Code'",77"80:class_g = 'Spotify'"78# "80:class_g = 'discord'"79]8081# ░█▀▄░█░░░█░█░█▀▄░█▀▄░▀█▀░█▀█░█▀▀82# ░█▀▄░█░░░█░█░█▀▄░█▀▄░░█░░█░█░█░█83# ░▀▀░░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀8485blur: {86method = "dual_kawase";87strength = 7.0;88deviation = 1.0;89# kernel = "11x11gaussian";90}9192blur-background = false;93blur-background-frame = true;94blur-background-fixed = true;95# blur-kern = "3x3box";9697blur-background-exclude = [98"window_type = 'desktop'",99"window_type = 'utility'",100"class_g = 'slop'",101"class_g = 'Firefox' && argb",102"_GTK_FRAME_EXTENTS@:c"103];104105# ░█▀▀░█▀▀░█▀█░█▀▀░█▀▄░█▀█░█░░░░░█▀▀░█▀▀░▀█▀░▀█▀░▀█▀░█▀█░█▀▀░█▀▀106# ░█░█░█▀▀░█░█░█▀▀░█▀▄░█▀█░█░░░░░▀▀█░█▀▀░░█░░░█░░░█░░█░█░█░█░▀▀█107# ░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░░▀░░▀▀▀░▀░▀░▀▀▀░▀▀▀108109daemon = false;110backend = "glx";111vsync = true;112dbus = false;113mark-wmwin-focused = true;114mark-ovredir-focused = true;115detect-rounded-corners = true;116detect-client-opacity = true;117refresh-rate = 0;118# use-ewmh-active-win = true;119# unredir-if-possible = false;120# unredir-if-possible-delay = 0;121122unredir-if-possible-exclude = [];123124detect-transient = true;125detect-client-leader = true;126resize-damage = 1;127128invert-color-include = [];129130glx-no-stencil = true;131# glx-no-rebind-pixmap = false;132use-damage = true;133# xrender-sync-fence = true;134135# glx-fshader-win = "";136# force-win-blend = false;137138# no-ewmh-fullscreen = false;139# max-brightness = 1.0;140141transparent-clipping = false;142143log-level = "warn";144log-file = "/home/kpfromer/.cache/picom-log.log";145show-all-xerrors = true;146# write-pid-path = '/path/to/your/mom';147148wintypes: {149tooltip = { fade = true; shadow = false; focus = false; };150normal = { shadow = false; };151dock = { shadow = false; };152dnd = { shadow = false; };153popup_menu = { shadow = true; focus = false; opacity = 0.90; };154dropdown_menu = { shadow = false; focus = false; };155above = { shadow = true; };156splash = { shadow = false; };157utility = { focus = false; shadow = false; };158notification = { shadow = false; };159desktop = { shadow = false };160menu = { focus = false };161dialog = { shadow = true; };162};163164# ░█▀█░█▀█░▀█▀░█▄█░█▀█░▀█▀░▀█▀░█▀█░█▀█░█▀▀165# ░█▀█░█░█░░█░░█░█░█▀█░░█░░░█░░█░█░█░█░▀▀█166# ░▀░▀░▀░▀░▀▀▀░▀░▀░▀░▀░░▀░░▀▀▀░▀▀▀░▀░▀░▀▀▀167# requires https://github.com/jonaburg/picom (read more there too)168transition-length = 185169transition-pow-x = 0.1170transition-pow-y = 0.1171transition-pow-w = 0.1172transition-pow-h = 0.1173size-transition = true174175# ░█▀▀░█▀█░█▀▄░█▀█░█▀▀░█▀▄░█▀▀176# ░█░░░█░█░█▀▄░█░█░█▀▀░█▀▄░▀▀█177# ░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀178# requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom179corner-radius = 10.0;180rounded-corners-exclude = [181#"window_type = 'normal'",182"class_g = 'awesome'",183# "class_g = 'URxvt'",184# "class_g = 'XTerm'",185# "class_g = 'kitty'",186# "class_g = 'Alacritty'",187# "class_g = 'Polybar'",188# "class_g = 'code-oss'",189#"class_g = 'TelegramDesktop'",190# "class_g = 'firefox'",191# "class_g = 'Thunderbird'"192];193round-borders = 1;194round-borders-exclude = [195#"class_g = 'TelegramDesktop'",196];
Shell
There are many different types of shells that you can run, but the main three that come off my head
are bash, zsh, and fish. I've only used bash and zsh and have not messed around with fish. I use zsh
the most since it's extensible, has better tab completion (than bash), and is POSIX sh
compliant.
Installing zsh is reasonably easy:
1# Arch install2yay -S zsh3# Debian? (from quick google search)4sudo apt install zsh
Make sure you set the zsh in your terminal (as seen in the kitty configuration file).
Plugins
I also install [zplug](https://github.com/zplug/zplug)
, which is a zsh plugin manager. There are
many different plugin managers, but personally, I have found zplug
to be clean to write with and
fast.
1# Arch install2yay -S zplug3# Check their docs for setup on others (https://github.com/zplug/zplug)
Here's my .zshrc
file
1# _2# _______| |__3# |_ / __| '_ \4# / /\__ \ | | |5# /___|___/_| |_|67# Launch Starship8eval "$(starship init zsh)"910# Zplug (this is the location that arch installs zpl)11source /usr/share/zsh/scripts/zplug/init.zsh1213# Colorize older terminal apps (like man)14# Start blinking15export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green16# Start bold17export LESS_TERMCAP_md=$(tput bold; tput setaf 2) # green18# Start stand out19export LESS_TERMCAP_so=$(tput bold; tput setaf 3) # yellow20# End standout21export LESS_TERMCAP_se=$(tput rmso; tput sgr0)22# Start underline23export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 1) # red24# End bold, blinking, standout, underline25export LESS_TERMCAP_me=$(tput sgr0)2627# aliases28alias ls='exa --long --header --icons --sort=type'29alias tree='exa --tree --level 3'30alias sdn="sudo shutdown -h now" # Quick shutdown31alias cp="cp -i" # Confirm before overwriting something32alias pkg="yay -Q | fzf"33alias yt='youtube-dl --add-metadata -i'34alias cz='git-cz --disable-emoji'3536# load the good parts from oh-my-zsh37# zsh auto completion38zplug "lib/completion", from:oh-my-zsh39# setups up histoyr40zplug "lib/history", from:oh-my-zsh41# Color highlighting in terminal42zplug "zdharma/fast-syntax-highlighting"43# Auto suggests commands based on history44zplug "zsh-users/zsh-autosuggestions"4546# Install plugins if there are plugins that have not been installed (copied from the zplug readme)47if ! zplug check --verbose; then48printf "Install? [y/N]: "49if read -q; then50echo; zplug install51fi52fi5354# # Then, source plugins and add commands to $PATH55zplug load5657# run pfetch if terminal is interactive (https://github.com/dylanaraps/pfetch)58[ -z "$PS1" ] || pfetch
Theme
In the past I installed my theme via zsh, but I recently have found starship a customizable prompt that works with any shell. It's written in rust and boosts a sensible design and vast number of customization options.
1# Arch install2yay -S starship-bin3# Regular install4curl -fsSL https://starship.rs/install.sh | bash
taken from starship.rs
Colorful ls
A while back, I wanted a more colorful version of ls. I've been searching online and have found this
program called exa. It has many similar command-line options to ls
and has some additional features like a tree view (note I aliased ls to exa in the zshrc config).
1# Arch install2yay -S exa3# Debian/ubuntu4sudo apt install exa5# read more: https://the.exa.website/#installation
Summary
Thanks for reading; hopefully, you found something interesting or useful. Feel free to look at some of my dot files (link) to learn more about how I have customized my Linux environment. I also have my awesome window manager dotfiles here. Also take a look at the resources below for further inspiration; I think that they have some slick setups.