TL;DR
Single monitor, laptop, standing desk, treadmill, no mouse, fish shell, tmux, vim (well, neovim), and a bunch of scripts.
Extended TL;DR
My want my setup to be portable. Laptop is all I need, no extra-monitors, and no mouse. I rarely take my hands off the keyboard when Iām working and itās working for me. Trackpad replaces me a mouse when I ocassionally need to move the cursor, tmux replaces me workspaces and monitors.
If I need to do some whiteboarding I use printer paper, which replaced me a notebook (boy I have lots of notebooks).
Inspired by Linus Torvaldsā setup, I got myself a standing desk and later - a treadmill.
Image credit: softpedia.com
At any time I have only my terminal app, - kitty and a browser open. Everything else is non-essential.
Terminal
This is where I spend most of my time, so it better be good. And a good terminal emulator must tick serveral points for me:
- Fast (if I can see lag while typing, weāre done)
- GPU-accelerated
- Cross-platform (Mac and Linux, last time I worked with Windows was when Windows Vista was a huge failure)
- FOSS or GTFO (no, Iām not sorry, warp)
I used iTerm2 a lot mostly because everyone else was using iTerm2 and it was perceived as āthe defaultā. I wish I learned sooner there are better alternatives which donāt pack as many useless features, but faster.
Some options I tried besides iTerm2 included Hyper, alacritty, and wezterm.
Hyper, being electron-based is as slow as iTerm2, so itās off the list.
Alacritty was snappy, looked good, and ticked most boxes. But on my machine, kitty still edged it out in feel and responsiveness.
I tried wezterm after kitty and it was comparable in speed, so I decided not to bother switching.
I totally could use alacritty or wez as my daily driver, but kitty is occupying this spot since 2020(ish), and so far Iām happy.
Now, letās see what I run inside kitty.
Tmux
At any time I have exactly 1 kitty window.
Inside of it Iām running tmux, and inside tmux I run multiple sessions (those are project-based).
Each sessions would usually have 1st window designated for vim, and the rest for anything else.
The vim window would usually be zoomed in (Prefix+z) on vim, and the hidden pane would contain something like logs or web server process.
All the other windows would typically be created for things like database, additional logs, monitoring, testing, etc.
Inside a single window I can have multiple panes as needed
VIM
I already told my story of why I chose vim as a my go-to editor (and why have I migrated to neovim). TL;DR: Vim is fast, minimal, runs in the terminal, and doesnāt make me bounce between tools for every new language or framework. It stays out of the way and lets me think.
My whole (n)vim configuration can be found in my dotfiles.
Fish shell
Similar to iTerm2 zsh is perceived as āthe defaultā shell for software developers. But I think itās largely because mostly people just never try anything else.
Zsh is good, but fish turned out to be better for me. You can read why I decided to switch to fish and maybe it will make you want to try it.
Writing this article just reminded me I wanted to try nushell a while ago, it looks very promising!
Scripts
You can find my scripts, again, in my dotfiles. There are fish scripts, and some other scripts in a ~/bin directory. I will not go through all of them, only the ones which I use the most.
p.fish
THE most used script.
It allows jumping between projects in no time. All you need is to type the projectās name part and it will take you there (provided you have zoxide installed). Two conditions though - your project has to be a git repo (this is how p knows itās a project, not a regular directory). Second condition, - you have to add all the projectsā roots to $PROJECTS_DIRS env var (i.e. set -x PROJECTS_DIRS ~/Projects $GOPATH/src)
If a project can not be found by partial name, p will show a list of projects via fzf (if itās installed) and you can auto-complete the projectās name from there. Next time p will ārememberā your choice, and, provided the same search term, will take you to the selected project.
@.fish
A shortcut for docker exec -it <container id>. To āsshā into a container, I just type @ elasticsearch bash.
bin/prview
Under the hood, it uses the official GitHub cli tool gh to fetch a list of my PRs and pipe them into FZF for fuzzy find.
Browser openers scripts
There is a bunch of scripts that open browser links for me (not committed to my public git repo).
In the past, I used Alfred to have my custom searches, so I could open up links that follow a particular pattern easily. Now Iāve replaced Alfred with a bunch of scripts. When I need to open up a JIRA ticket, for instance, I simply type j on console and j takes me to the JIRA ticket that (how does it know the name? Donāt you remember? Itās my tmux sessions name). j can also accept the argument of the ticket number, so I can do j TICKET-123.
Itās really easy to do, by the way. Let me quickly āfish it upā for ya:
function google open "https://google.com/?q=$argv"endNow
google coffeeaddict devwill take you to https://www.google.com/?q=coffeeaddict%20dev
Gotta be super easy to script it up in bash too, Iām just too lazy to try it.
Honorable mentions
dnsto quickly add or remove a dns serverproxyto enable proxy (useful with something likemitmproxy)t(alias for taskwarrior which āscopesā to the current tmux session using the session name):
Thatās it, folks!
Terminal, tmux, vim, and a bunch of scripts is all it takes to almost never lift up hands from the keyboard. Not that itās an ultimate goal, but it does add up to effectiveness hour by hour, day by day, month by month, year by yearā¦