I Build My Own Terminal Configuration

productivity
Published

August 26, 2024

Why

Throughout my career as a developer, I’ve used numerous tools, including various IDEs, database management software, and a wide range of system utilities. I’ve even experimented with more than 20 keyboards. However, as I’ve grown older, I’ve come to realized that time is a precious, and I’ve been wasting too much of it on these trivial distractions. I found myself lost in the constant juggling of new tools and gadgets.

Now, it’s time to take responsibility for my life and focus on long-term goals. I’m striving to do less but think more deeply about how to improve my quality of life.

This realization led me to create my own terminal configuration. Having used MacOS for nearly as decade and worked as a backend engineer for eight years. I can use terminal to do most of my work.

Another catalyst for this change was reading about DHH’s decision to leave Apple and switch to Linux, It inspired me and made me feel it was time for a change in my own workflow.

Lastly, I want to reduce my dependence on constantly evolving enterprise tools. These applications frequently change their UI, introduce flashy new features, and deprecate others. While I understand the need for companies to innovate and make money, it often comes at the cost of user experience and knowledge. I’ve had my expertise rendered obsolete server times when tools I relied on changed dramatically or were discontinued. I’m tired of this cycle and want to minimize the risk. My goal is to use simple, effective tools that help me do my work without unnecessary complexity.

Goal

Give these concerns, my objectives are clear: I want to use tools that can genuinely improve my coding productivity. Here are my criteria:

  1. Open Source: If the creator abandons the project, I can still use and potentially maintain my own version.
  2. Customizable: I should be able to disable features I don’t need.
  3. Familiar: I should still be able to use my preferred tools to reduce the stress of migration.
  4. Keyboard-centric: I want to use the keyboard as much as possible for efficiency.

Following these criteria, I chose NeoVim to replace other IDEs, When selecting a terminal emulator among options like Kitty, WezTerm, iTerm2, and the system default terminal. I opted for WezTerm. This choice was influenced by the fact that I can use Lua to configure both NeoVim and WezTerm.

How

Now, let me introduce you to my terminal configuration step. My toolkit consists of WezTerm, NeoVim, Sketchybar, yabai and skhd. Let’s explore each of these components in detail.

WezTerm

For my WezTerm configuration, I drew inspiration from the article Okay, I really like WezTerm This comprehensive guide introduced me to WezTerm’s basic features and taught me how to configure them using Lua. Most of my WezTerm configuration is adapted from this excellent article.

NeoVim

When it came to configuring NeoVim, I initially considered several out-of-the-box solutions like DoomVim, LunarVim, AstroVim, etc. My first instinct was to build my configuration from scratch, so I began by reading the official NeoVim documentation. However, after spending an entire afternoon poring over the docs. I realized that NeoVim’s complexity made it impractical for me to start from zero at this stage.

I changed my approach, deciding to use third-party packages to achieve my goals while keeping things as minimal as necessary. Curious about DHH’s NeoVim setup, I investigated the omakub repository and was impressed by his ingenious solution. DHH use the starter template for LazyVim, a configuration framework I was already familiar with. This discovery made it convenient for me to begin with the starter template. As a result, my NeoVim configuration is almost fully based on omakub’s setup.

Sketchybar

Sketchybar is is a highly customizable replacement for the MacOS menu bar. Before discovering Sketchybar, I used bartender and iStat Menus to manage and simplify my status bar. Sketchybar offerd a popular, open-source alternative that aligned with my goals. Here is my sketchybar configuration link

Yabai + skhd

The final piece of my setup, which I initially considered least important but now use frequently, is a solution for controlling windows with the keyboard. Following common practice in the MacOS power-user community, I chose yabai for window management and skhd for custom keyboard shortcuts.

Yabai allows for advanced window tiling and management, while skhd enables me to create custom keyboard shortcuts for various and application controls. here is my yabai configuration link, and here is my skhd configuration link

This combination has significantly improved my workflow, making window management effortless even though I was already comfortable with trackpad gestures.

Conclusion

In this post, I’ve explained my motivations for building a custom terminal configuration and provided an overview of the tools I’ve chosen. While I haven’t delved into the specifics of each configuration. I’ve shared links to my setup files for those interested in replicating or adapting my approach.

This journey has not only improve my productivity but also deepened my understand of the tools I use daily. As I continue to use and refine this setup, I look forward to further optimizations and discoveries. If you have any questions or suggestions about my configuration, please let me know.