| . ___ __ __ ___ . __ __ __ __ __ __ | | |__ |__) |__) |__ ' /__` /__` / \ /\ |__) |__) / \ \_/ |___ | |___ | \ | \ |___ .__/ .__/ \__/ /~~\ | |__) \__/ / \ ⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∽⋅∼⋅∽⋅∽⋅∽⋅∽⋅
In which I ramble about setting up kitty as a comfy terminal.
I have been struggling playing with code outside of the job lately. Laziness and going on auto-pilot is the core reason, which I struggle to tackle. A lesser reason which I can tackle is that my personal development environment is not comfy at all compared to my professional one.
The rational thing would be to copy the setup I made at work and call it a day. I don't feel rational in this peaceful Sunday afternoon. Let's build this from scratch. Feel free to read along, although me writing this is mostly to keep me on track. I also took some inspiration from this blog[0], especially for the window border decorations.
First and foremost, we need kitty[1]. I was sceptical of that project at first but I must say, as someone whose work day is mostly in the CLI, it does make my life about 3% nicer every work day. I simply haven't found something battery included that, say, offers what kitty does with ctrl+shift+e for hyperlink doc selection from the keyboard.
Once installed, we can edit the config files.
They are typically in:
~/.config/kitty/kitty.conf
But press ctrl-shift-F2 and you will be taken right at it. And press ctr-shift-F5 and it will refresh the terminal, applying the new config.
What do I need to work comfortably? I love three panel setups, one large on the left, two smaller on the right. That way I can view my code in one, have the references (documentation, header,... ) in the top left and some execution env on the bottom. In kitty, this is referenced as layout. And my preferences are so common it is called the "tall layout". We can use the kitty concept of sessions and declare in a `~/.config/kitty/custom_startup.conf`. We could use one per project. But already having sane defaults would be nice. Here is that session file.
# Saved in ~/.config/kitty/custom_startup.conf # Set the layout for the current tab layout tall # the terminal panes will open in the directory set in the session cd ~/$WHEREVER_YOU_WORK launch --title "Edition" launch --title "Execution" cd ~/$DOCUMENTATION launch --title "References"
Then we can specify it as startup session in `~/.config/kitty/kitty.conf`:
# path is relative to the kitty conf dir by default hence: startup_session custom_startup.conf
Unnecessary but cozy decorations we can add in the `~/.config/kitty/kitty.conf` :
- `cursor trail 1` to get a nice animation when you move the cursor around which helps track things
- `active_border_color #$HEX_CODE` for some nice border colo for the active window, same for foreground and background keywords.
- `window_border_width` so that the active border can be actually be seen
- `window_margin_width` to make each window pop visually from each other
And that's it. Font-wise, I have a monospace one that I like that works out of the box already.
Here are all the changes necessary for the kitty.conf, using a similar color theme to the present capsule.
# Saved in ~/.config/kitty/kitty.conf startup_session custom_startup.conf active_border_color #99ebba window_border_width 1pt window_margin_width 2 cursor_trail 1 background #0d0a0d
And that's enough for me to feel nice and cozy. Let's actually program now that the metaphorical slippers are on.
[0] Adam Chalmers' "My Kitty terminal config" blog post
[1] kitty terminal homepage
⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∼⋅∽⋅∽⋅∼⋅∽⋅∽⋅