Terminal Tools

Most of my work is performed in a terminal window or a TUI, except for rare instances where I utilize a GUI. That is precisely the reason why I strive to acquire the finest tools available, analogous to a carpenter who seeks the finest chisels available. Boost your productivity. #neowim #lazyvim

Terminal Tools
Photo by Joshua Aragon / Unsplash

The majority of my work is performed in a terminal window or a TUI, except for rare instances where I utilize a GUI. That is precisely the reason I strive to acquire the finest tools available, analogous to a carpenter who seeks the finest chisels available.
My personal computer experienced a crash last week as a result of a crappy NVME that experienced overheating. My first tough was to rebuild using my cloned home-folder as it is, but in the end I decided to do it from scratch instead. I'm prone to frequently switching between operating systems and/or desktop environments. I'm a fan of Tiling Window Managers, but I had to decide between Arch with Hyprland or a more conventional version like Pop!_OS.

I decided to delay Hyprland for a while and install Pop!_OS instead.

My other Choices

All tool choices are driven by the fact that I use both Mac and Linux machines.

How can I switch Linux versions so easily? Because I use a separate disk for the Home Directory /home.

Momentum is my new favorite browser add-on, and as browsers, I installed Floorp and Chromium.

The terminal is Alacrity and the GNOME Terminal. My Mac favorite, Warp, is not on Linux Jet. I use Starship to rice the terminal. I use mainly use zsh, but sometimes fish, and bash. Zsh, because it's also the shell on Mac.

My preferred editor is Neovim, but I also use Nano. They need tweaking of their configuration files and add-ons installed for better performance.
Most of the editing is done using Sublime Text and Merge, but also Visual Studio Code (yes I know it collect telemetry, it's by Microsoft) is in use. I do test the new lightning-fast and powerful Rust based Lapce.

Keybindings

Learn your keybindings for increased performance and better ergonomics.
Edit your keybindings to fit your workflow.

Quickref - Neovim docs
Neovim user documentation

Editors

I use Neovim as my main editor on the Linux box. The way I've set it up makes Neovim more like an IDE. On almost every server, nano is the norm.

Neovim Installation

As Pop!_OS is based on Ubuntu, it is necessary to undertake additional work as Ubuntu is currently stuck on an outdated version.

  1. Download nvim-linux64.tar.gz
  2. Extract: tar xzvf nvim-linux64.tar.gz
  3. Run ./nvim-linux64/bin/nvim
  4. Move the files to .local
  5. Delete the tarball and the nvim/linux64 folder
  6. Create the basics mkdir .config/nvme and the init.lua file in it

Install on macOS

brew install nvim

Install the lazy.nvim package manager

Lazy.nvim is a very good plugin-manager. You need at least version 0.8 of Neovim, which is why we use the instructions above and not nala or apt.

  1. git clone https://github.com/LazyVim/starter ~/.config/nvim
  2. rm -rf ~/.config/nvim/.git

Neovim Configuration

There is a lot of stuff you can configure and add-ons to install. It's mostly up to your workflow how you do it. Even though the default version of Neovim is still a good text editor, it lacks some features like code completion. We’ll fix these issues through Neovim’s configuration files.

You can set up a lot of things and get some cool stuff installed. How you do it is mostly up to your workflow. Although the default version of Neovim is still a good text editor, it lacks some features like code completion. These issues will be fixed through the configuration files of LazyVim.

Index - Neovim docs
Neovim user documentation

Install lazy.nvim was discussed in the Neovim Install section.

A very good plugin-manager is lazy.nvim, that is the base for LazyVim.

The installation of LazyVim install Tokyo Night colorscheme and a ton off plugins.

🚀 Getting Started | LazyVim
LazyVim is a Neovim setup powered by 💤 lazy.nvim

For more plugins and colorschems

Dotfyle | Neovim Plugin Search | Neovim Config Search | Neovim News
Find new plugins, trending plugins & popular plugins. Search for Neovim configurations by plugin manager, plugins or language cervers. Read the lateset Neovim News in This Week in Neovim.

Nano Configuration

When nano is launched, it reads its configuration parameters from the system-wide configuration file /etc/nanorc and from the user-specific files ~/.config/nano/nanorc and ~/.nanorc if the files are present.

Options specified in the user files take precedence over the global options.

Nano as Default Editor

export VISUAL=nano
export EDITOR="$VISUAL"

Edit .bashrc/.zshrc

Fonts

For ricing terminals, you require a Nerd font with the special symbols added to a basic font of your choice. Using Starship or LazyVim it's required.

  • JetBrains Mono, 2020 by Philipp Nurullin
    JetBrains Mono is my favorite font for terminals. Link
    • JetBrains Mono, is by Jet Brains, the house for DevOps tools — Homepage.
  • Inconsolata, 2021 Ralph Levine
    • Inconsolata is a monospaced font, designed for code listings and the like, in print. There are a great many “programmer fonts,” designed primarily for use on the screen, but in most cases do not have the attention to detail for high resolution rendering. — Ralph Levine Homepage, google/fonts at GitHub.

List of my other favorites and what they are based on

  • 3270font, 2015 by Ricardo Bánffy.
    This font is a nostalgic trip to my youth and IBM terminals, for more info, see rbanff on GitHub.
    • This font is derived from the x3270 font, which, in turn, was translated from the one in Georgia Tech's 3270tool, which was itself hand-copied from a 3270 series terminal. I built it because I felt terminals deserve to be pretty. The .sfd font file contains a x3270 bitmap font that was used for guidance. — rbanff
  • DejaVuMono, 2004 DejaVu Project
    • The DejaVu fonts are a font family based on the Vera Fonts. Its purpose is to provide a wider range of characters while maintaining the original look and feel through the process of collaborative development (see authors), under a Free license.Homepage
  • Fira Mono, 2013 Erik Spiekerman. Mozilla's Fira Type Family — Homepage
  • Noto Mono, 2012 by Steve Matteson. Google fonts Homepage
  • Red Hat Mono, 2019 Jeremy Mickel.
    • Red Hat Mono is our monospaced font that was created to distinguish code from natural-language text. It should only be used when demonstrating code snippets in our communications and specifications, or as a stylistic approach for a more technical audience, like the Red Hat Developer Program or Command Line Heroes. — Red Hat Homepage
  • Ubuntu Mono, 2010 Dalton Maag. Ubuntu Homepage
Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcher
Iconic font aggregator, collection, & patcher: 9,000+ glyph/icons, 60+ patched fonts: Hack, Source Code Pro, more. Popular glyph collections: Font Awesome, Octicons, Material Design Icons, and more

Installing a Nerd Font

Download by visiting the official Nerd Fonts download page and browse all the available Nerd fonts. Pick one or many.

Where to place the unzipped font

Make a nerd folder in /usr/share/fonts and then unzip the font to it. sudo mkdir -p /usr/share/fonts/nerd. Or use ~/local/share/fonts/ for personal use only.

cd Downloads
sudo unzip Iosevka.zip -d /usr/share/fonts/nerd/Iosevka/

Install the Font

Now, the important part, installing nerd font to your system.

fc-cache -fv

Visual Studio Code

Open VSC and go to File → Preferences → Settings → Text Editor → Font, then choose your favorite Nerd Font

Sublime Text

On the menu bar, click on Preferences → Settings. This will open up a new window with two configuration files. On the left the default configuration, on the right the user override configuration settings.
Edit only the right side to avoid messing up the default settings. I know from experience.

Terminals

There is a multitude of Terminals. I prefer one by habit — Alacritty.
Alacritty is a cross-platform, GPU-accelerated terminal emulator. It is an OpenGL terminal emulator written in Rust. Thanks to the OpenGL renderer and the high throughput parser, Alacritty is incredibly fast and an extremely lightweight Terminal emulator.

Ricing the terminal

Alacritty needs some tweaking of the configuration file.

🚀 Starship

The minimal, blazing-fast, and infinitely customizable prompt for any shell! It also works with warp! As I'm a big fan of warp (not on Linux yet) but I also use bash and zsh on a daily basis.

  • Fast: it's fast – really, really fast!
  • Customizable: configure every aspect of your prompt.
  • Universal: works on any shell, on any operating system.
  • Intelligent: shows relevant information at a glance.
  • Feature rich: support for all your favorite tools.
  • Easy: quick to install – start using it in minutes.
  • Prerequisites
    • Nerd Font installed and enabled in your terminal 

Starship Installation

How to install and configure Starship.

  1. Install any Nerd Font you like. It's necessary for a nice and powerful shell.
  2. Install and use zsh as the default on Linux, just like it is on Macs. On my computer, I like to use Warp.
    1. Start zsh and select (2) Populate your ~/.zshrc configuration file and edit it
  3. Configure your terminal of choice
  4. Install Starship
    1. Download the installation script wget https://starship.rs/install.sh -O starship-install.sh ⚠️ Please read the script before running it!
    2. and make it executable chmod -x starship-install.sh
    3. run the script ./starship-install.sh
  5. Configure Starship by adding a line to
    1. ZSH add to .zshrc eval "$(starship init zsh)"
    2. BASH add to .bashrc or .bashrc-personal eval "$(starship init bash)"
  6. Configure
    1. Normal install
      1. touch ~/.config/starship.toml copy the basic configuration here.
    2. A better way
      1. create a separate folder mkdir -p ~/.config/starship/
      2. add the configuration file touch ~/.config/starship.toml
      3. add to the .zshrc and/or .bashrc
        export STARSHIP_CONFIG=~/.config/starship/starship.toml
Now you can use a new prompt on all your terminals!

The starship presets page has some examples, and you can modify your own with the commands on the configuration page.

I set up a bunch of different configs for me to play with (naming convention used: starship.toml.TokioNights). To switch, type cp starship.toml.TokyoNights starship.toml.


Other cool Stuff

Being lazy can make you vert effective. Also, remember that laziness is the most important driving factor for inventions.
It's not about working more — it's about working better than the rest, that makes you a winner. We already discussed Starship and mentioned Visual Studio Code (Lapce is another really great one) and spent alot on neovim.

In earlier posts, I talked about exa, bat, dockge, and nala. link

Neovim

Vim was introduced in 1991 and it shows. A modern fork of vim is neovim. Actually, most of the reasons I use Sublime is answered by neovim. A fast terminal is one of the things you need, nala Alacritty, Mac Warp. Fully compatible with Vim's editing model and Vimscript v1.

Any tool you have, remember to configure it for your workflow.
export VISUAL=neovim
export EDITOR="$VISUAL"

Edit .bashrc/.zshrc

The fuck

We all do mistakes. What if there would be a tool to correct command typos. Yes, this is what thefuck do.

gif with examples

fzf

Tired of the constant ls — cd ... ls — cd routines. Use fzf instead and jump directly. It's an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc.

HTTPie

Today, HTTP is everywhere. HTTPie is a fantastic tool to boost your productivity.
HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI interaction with web services as human-friendly as possible. HTTPie is designed for testing, debugging, and generally interacting with APIs & HTTP servers. The http & https commands allow for creating and sending arbitrary HTTP requests. They use simple and natural syntax and provide formatted and colorized output.

HTTPie CLI: HTTP & API testing client

Install HTTPie

# Install httpie
brew update
brew install httpie

macOS using Homebrew

# Install httpie
curl -SsL https://packages.httpie.io/deb/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/httpie.gpg
sudo echo "deb [arch=amd64 signed-by=/usr/share/keyrings/httpie.gpg] https://packages.httpie.io/deb ./" > /etc/apt/sources.list.d/httpie.list
sudo apt update
sudo apt install httpie

Debian / Ubuntu based OS's

# Install httpie on Arch
pacman -Syu httpie

Arch Linux

Lazy Docker

A simple terminal UI for both docker and docker-compose, written in Go with the gocui library. Memorizing docker commands is hard. Memorizing aliases is slightly less hard.

Keeping track of your containers across multiple terminal windows is near impossible. What if you had all the information you required in one terminal window, with every common command living one key struck away (and the ability to add custom commands as well).

Gif

Dockge

Dockage is an replasement for Portainer. One of my new faworites. A fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager.

Dockge
Dockge simplifies Docker management, particularly when dealing with Docker stacks. You can perform tasks like creating, editing, starting, stopping, restarting, and deleting Docker containers and services through a web terminal.

tmux

It's like a tiling window manager but for terminals. Tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.

Home
tmux source code. Contribute to tmux/tmux development by creating an account on GitHub.

Burn-in HDDs & Servers
Burn-in HDD and Servers. When customer satisfaction is the key objective you need to go the extra mail and make sure there is no breaks early due to bad HW or bad SW. Most bad HDD failures happens early if they are to fail. The failing due to old age is easy to handle by monitoring.
HBA or IT-mode
For running ZFS on RAID controllers we need the RAID-controller in HBA or IT-mode for RAID pass trough and a separate boot device, you can’t usually boot from a HBA device.
GitHub - AnalogJ/scrutiny: Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds
Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds - GitHub - AnalogJ/scrutiny: Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thres…

Warp

Your terminal, reimagined. Warp is a 21st century, Rust-based terminal with AI built in so you and your team can build great software, faster. On Mac and Linux download today.Warp will come to Windows later.

Warp: Your terminal, reimagined
Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster. Now available on MacOS.

File:Free and open-source software logo (2009).svg

Free and Open Source Software

FOSS - Free and Open Source Software

If only free and open because some of us do donate, by merchandise, buy coffee and give them stars on GitHub. Please support any way you can for FOSS to continue to be here.

Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software, where anyone is freely licensed to use, copy, study, and change the software in any way, and the source code is publicly available so that people are encouraged to improve the design of the software. This is in contrast to proprietary software, where the software is under restrictive copyright or licensing and the source code is hidden from the users. - Wikipedia


References

Fonts [1] Alacritty [2] Starship [3]Nano [4] Neovim [5] LazyVim [6] Sublime Text and Memerge [7] Visual Studio Code and the FOSS verions Lapce, VSCodium and Code - OSS[8] The Fuck [9] fzf [10] HTTPie [11] Lazy Docker [12] Dockge [13] bat [14] exa [15]


  1. Nerd fonts selection homepage, download page ↩︎

  2. Alacritty homepage, wiki ↩︎

  3. Starship on GitHub, documentation ↩︎

  4. nano editor homepage, documentation ↩︎

  5. Neovim editor homepage, documentation ↩︎

  6. LazyVim homepage ↩︎

  7. Sublime Text and Merge. On wikipedia ↩︎

  8. Microsofts Visual Studio Code homepage.
    See the Free and Open Source versions: Lapce, VSCodium (Telemetry less)
    and Microsofts Code - OSS, Visual Studio Code vs. Code - OSS ↩︎

  9. The Fuck GitHub ↩︎

  10. Fuzzy find GitHub ↩︎

  11. HTTPie GitHub homepage, CLI ↩︎

  12. Lazy Docker GitHub ↩︎

  13. Dockge my blog post, Dockage homepage on GitHub ↩︎

  14. bat GitHub ↩︎

  15. exa homepage ↩︎