Thank you for visiting!
My little window on internet allowing me to share several of my passions
Categories:
- OpenBSD
- FreeBSD
- PEKwm
- Zsh
- Nvim
- VM
- High Availability
- vdcron
- My Sysupgrade
- FreeBSD
- Nas
- VPN
- DragonflyBSD
- fapws
- Alpine Linux
- Openbox
- Desktop
- Security
- yabitrot
- nmctl
- Tint2
- Firewall
- Project Management
- Hifi
- Alarm
Most Popular Articles:
Last Articles:
In the serie of dotfiles, here my dotfiles for zsh
Posted on 2025-09-27 21:41:00 from Vincent in Zsh
Since few months, I'm using zsh as my main shell. In this post I explain changes I did and why. It uses Antidote, smart plugins, and a clean prompt. For syntax highlighting to battery status in the prompt, every detail is tuned for my daily use. Here’s how my .zshrc makes Zsh enjoyable.

My Zsh Configuration with Antidote and Plugins
When I first started exploring alternatives to the default shells on Unix-like systems, I quickly discovered Zsh. What struck me right away was how configurable it is and how much it can be tailored to personal habits. Over time, I built up a configuration that feels natural, efficient, and pleasant to use every day. What follows is a look into my current setup: how I structure my .zshrc, which plugins I rely on, and the small adjustments that make a big difference in practice.
I have been using Zsh as my main shell for quite a while, and over time my configuration has evolved into something that is both practical and enjoyable for daily use. My setup revolves around a carefully crafted .zshrc file combined with a handful of plugins that I manage with Antidote. The result is a shell that feels fast, informative, and a little bit smarter than the defaults.
At the heart of this configuration is the prompt. I like it to give me just the right amount of information at a glance: whether the last command succeeded or failed, which directory I am currently in, and whether I am working locally or over SSH. The left side of the prompt shows this information in a compact way, while the right side adds a timestamp and even the battery level of my laptop, complete with an icon to indicate charging status. This little detail has saved me more than once from running out of power mid-session.
Plugins play a big role in improving the Zsh experience. With Antidote, installing and updating them is very straightforward, and all I have to do is keep a list of plugins in a simple zsh_plugins.txt file. The core set I use is small but effective: syntax highlighting to catch typos before running a command, autosuggestions that remind me of commands I typed earlier, history substring search bound to the arrow keys so I can recall old commands quickly, and a set of extended completions that covers many tools out of the box. These plugins work together seamlessly and make the shell feel both responsive and intelligent.
Completions are another area where I paid extra attention. By default, Zsh completions can feel clunky, but with a bit of configuration they become very powerful. My setup makes them case-insensitive, applies colors that match LS_COLORS so suggestions are easy to distinguish, and loads them at startup so that completion is always ready when I need it. Combined with history tweaks—such as deduplicating entries, sharing history between sessions, and storing up to five thousand lines—I get a shell that remembers what I do and makes it easy to repeat common actions.
Another part of the configuration is about small quality-of-life improvements. I bind the arrow keys to search history by substring rather than just scrolling linearly, which feels much more natural. I also define a few aliases, such as forcing ls to always use colors on FreeBSD and shortening nvim to v for quick editing. My $PATH is adjusted to include ~/.local/bin, since many tools I install locally end up there. There are also environment tweaks, like setting WINIT_X11_SCALE_FACTOR=1 to fix scaling issues with Alacritty.
Some custom functions round things off. For example, I wrote a small get_battery function to display battery status in the prompt, and another one called is_local to detect whether I’m on a local machine or an SSH session. Others update the terminal title whenever I change directory or connect via SSH, which is especially useful when juggling multiple windows and tabs. Finally, I integrate tools like zoxide to make directory navigation much faster, since cd becomes smarter and remembers where I’ve been.
Updating everything is also simple. Antidote makes it easy to refresh plugins with a single command, and after sourcing my .zshrc again I immediately benefit from the latest improvements. The whole system is designed to be easy to maintain and extend, without locking me into a giant framework or overcomplicating the shell startup.
This configuration may not be universal, but it strikes the right balance for me: a clear and useful prompt, powerful completions, efficient history handling, and just enough plugins to enhance productivity without slowing things down. Zsh has a reputation for being a “tinkerer’s shell,” but in my experience, a thoughtful configuration turns it into a reliable daily driver. I now consider this setup complete enough to stick with, while still leaving room for occasional refinements as my workflow evolves.
If you’d like to explore my configuration files directly, you can find them on my SourceForge project page: FreeBSD Dotfiles – Zsh.