Table of contents
- Introduction
- Installing Arch Linux
- Dotfiles
- GNOME vs I3WM
- Terminal
- Useful CLIs
- Neovim as code editor
- Tmux
- LazyGit
- That's all folks
Introduction
So these days on my job after having a really bad developer experience on Windows, I finally persuaded my manager to switch from Windows to Linux. I think that now I’m on the perfect spot to share with you how I configure my Linux environment to have a nice and productive developer experience.
Installing Arch Linux
Let me explain why
I know that this first section may sound scary for some of you, but from my point of view, Arch Linux is the perfect distribution for the long term for the following reasons.
- It’s a Rolling Release distribution, so you won’t have to deal with major system upgrades that enforce you to wipe your whole system.
- It has the latest packages and the biggest repositories (Official and AUR), so it’s super easy to find what you need.
- In my experience, is the most stable distribution out there. Why? Well, basically because you can choose the packages that you already know that works with your hardware.
My experience with trending distros
The last point is the most important for me, because like half year ago, I had the fabulous idea of installing Ubuntu on my brothers laptop (Spoiler: In the end was not a good idea), just to teach him how a terminal works. My surprise comes when the audio card doesn’t work and some animations were extremely laggy.
What happened? All the trending distros like Ubuntu or Fedora are migrating its audio manager from PulseAudio to PipeWire, and its display manager from X11 to Wayland. So basically, they break compatibility with older laptops just to use the latest unproved “cool” software. So if you ask me, I prefer Arch, where I can install the old boring X11 that works perfectly fine with my computer.
Don’t go the hard way
These days the archinstall
script makes practically all the job, just ensure to make a boot partition and primary partition for your system, then use the script and follow the steps. Really, it has never been that easy.
Dotfiles
Just in case that you want to get some inspiration or adapt my dotfiles to have something to start building your config, here is the repository where I store my config files. Usually I create a Dotfiles
folder on my home directory where I use later to create symbolic links.
GNOME vs i3WM
My experience with tiling window managers
I was really thinking about installing a cool tiling window manager like I had done in the past. i3WM or Qtile worked pretty well for me. But if I’m honest, in the end I just use my key bindings to move between workspaces, send windows to some workspaces, open a new terminal, close some windows...
I mean, these are the basics of a tiling window manager, but all of these things can be done in GNOME quite easily.
Tiling window manager are the coolest thing on earth to impress your friends and colleagues, but the effort to setup them it’s not worth.
GNOME is more than enough
In GNOME I can do all the things mentioned before, and it’s preconfigured to start using it as soon as you install it. Also, it comes with some handy features, like an app to take screenshots, an easy way to install fonts and a big marketplace of extensions.
Key Bindings
Just in case that you are interested, this are the key bindings that I use to navigate through my workspaces.
ALT + ENTER # Open Terminal
ALT + W # Close focused window
ALT + 1 # Go to workspace 1
ALT + 2 # Go to workspace 2
ALT + 3 # Go to workspace 3
ALT + 4 # Go to workspace 4
ALT + SHIFT + 1 # Move window to workspace 1
ALT + SHIFT + 2 # Move window to workspace 2
ALT + SHIFT + 3 # Move window to workspace 3
ALT + SHIFT + 4 # Move window to workspace 4
Dash To Dock and Pop Shell
Talking about GNOME extensions, these 2 are indispensable for me. The first one provides a cool configurable mac-like dock. The second one, expand GNOME window management features just like if it was a tiling window manager, allowing you to resize windows with the keyboard, organize panels, etc.
Just a note, in the past Pop Shell had conflicts with Wayland, that's why I’m using X11 on my setup, take this into account if you include this in your workflow.
About themes
Be careful, themes can break your UI if a major GNOME update comes with breaking changes. Personally, in the past I had tried a lot of GTK themes, you can end up with a beautiful desktop, but take into account that you probably will have to spend a lot of time fixing details and future bugs.
This time, I won’t install a custom theme, I feel okay with the default GNOME Dark theme and a cool background ,like this one if you like Typescript 😄.
Terminal
Alacritty is all that you need
When I was writing this part of the post some weeks ago, the title was something like “Trying Warp terminal”. Don’t worry, I made the mistake for you so you don’t have to. Alacritty is really all that you need, trust me. It’s the fastest Linux terminal and you don’t need to create an account to use your tools.
Color scheme and Font
This is something very personal, in my case my favorite theme it’s Catppuccin Mocha. About the fonts, I use CaskaydiaCove NerdFont for the terminal. For my system menus, I like to use San Francisco Pro font (as you can already notice, this post is about how to simulate a cool mac setup on Linux 🤭).
ZSH vs Bash
Personally I enjoy using ZSH because it has a lot of plugins and customization options that are easy to configure. There are other options like Fish shell, but I have been using ZSH for a lot of years now and I’m very happy with the result.
Starship prompt
ZSH is a great shell but the prompt is boring and doesn’t display too much information. Starship it’s a great tool to display a fancy prompt in your terminal every time that you use it. In my case, I’m using a custom configuration that simulates the famous P10K theme for the old OhMyZsh framework, check my dotfiles just in case that you want to use it or get some inspiration.
Useful CLIs
Maybe you know them because they have been the trending tools during 2023 for your terminal, but just in case that you don’t know about them, let me show you some CLIs that instantly improved my workflow on the terminal.
- zoxide: better cd that work with patterns and recently visited paths.
- exa: a colorful replacement for ls.
- bat: just cat with steroids.
- tree: recursive ls.
Neovim as code editor
VS Code it’s more than enough
BUT, I have been using Neovim for 2 years now, and although it’s painful to configure it for the first time, once you start to understand the concepts and how its ecosystem works, it gives you the most customizable and enjoyable developer experience. And you know, now you can start being the guy that says “I use vim BTW” every time for no reason.
Because I was forced to use Windows, my unique alternative was to use VS Code as my main editor, which was fine, but honestly, when you start getting confidence with Neovim bindings and your productivity starts to raise, you will want at least to keep using your bindings via some extension.
In my case I was using the Vim emulator extension (that one with the blue Vim icon), If you don’t want to jump to Neovim (which is totally understandable), I really encourage you to give a try to the VS Code extension.
My Neovim config
This time I rebuilt my config for the 27th time, and in this trip I found some very interesting videos about how to config Neovim properly, here they are
Those 2 channels have really good information about building a proper Neovim distribution, as well as other information about Tmux, Terminal customization and so on. If I were you I would check them.
Tmux
If you have read up to this point it means that at least you have interest on how to build the best developer experience that you can have inside your terminal.
The next logical step is to talk about Tmux. Multiplexing terminals with Tmux gives you the super power of GNOME Workspaces inside your terminal.
When working on a feature, it’s usual to have a terminal with Neovim opened, another terminal where the backend is executing, another with the frontend running, maybe another with logs of some docker containers… It really depends on your project.
With Tmux, basically you can “group” all of this different terminals in the same one, and navigate through them with some bindings (yes, bindings everywhere). Tmux can offer much than that, but this is the reason why I use it.
LazyGit
Finally, lets talk about git… I’m not one of those guys that hates git CLI, but I have to admit that it isn’t the most intuitive tool that I have seen. If you just push and pull code into your own repository, the CLI could be more than enough.
But if you have to deal with merge conflicts, which for sure you will have to deal with if you are working with more people, having some sort of GUI tool to manage this situations is a very big advantage.
Personally, I have used GitKraken in the past and if your company can afford it, ask for a license. But… if you want to be the coolest kid on the park, LazyGit is a great and powerful alternative to use git from the terminal.
Personally, I have been using it for 1 month now, and I have to admit that I’m impressed. I though that it would be difficult to work with it because in the end is not as illustrative as other GUI options, but for my surprise, is not that hard to work with it in day to day.
That’s all folks
So, with all these tools, you will have a pretty solid system to get your work done.
Hope that you find it useful! See you in my next post!