Switching Terminals

siduck st

st fork by siduck

Table Of Contents

  1. Introduction
  2. Patching Software
  3. What is wrong?
  4. What did I choose?

Introduction

Almost over a year ago I started out my linux journey with arch linux. The first terminal that I ever used was Alacritty. For a beginner like me it was the most perfect thing I had ever seen and used. But then I wanted to try out dwm, suckless’s window manager and by following a tutorial I installed st and dwm on my machine. Back then I really thought that st was only supposed to work on dwm. 😭
But right off the bat I noticed that st was missing a lot of features. No scrolling, random windows sizes etc. But what I loved the most about it was the rendering of the font. Iosevka Nerd Font (the font I use) used to be so wide in Alacritty and Kitty, but it rendered perfectly in st, like how it was supposed to be done. I decided to patch st rather than abandoning it


Patching Software

The patch command takes a patch or a .diff file and applies those differences to one or more files. To apply / remove a diff use the commands

Terminal window
$ ~ patch -p1 < applythepatch.diff ## apply a diff
$ ~ patch -R < applythepatch.diff ## remove a diff

Now, default st is not the most usable terminal in the world. It requires many common features to be patched into it and that is what drive users away from it. There were multiple patches I added to make it workable. These were:

  • Alpha - transparency
  • Anysize - allows st to resize to any pixel size
  • Boxdraw - fixed unicode
  • Delkey - make the delete key work
  • Font2 - fallback fonts
  • ResizeText - dont cut off text while resizing
  • Scrollback + ScrollbackMouse - name should be enough
  • VertCenter - text should be vertically centered
  • WideGlyphs - glyph support to not cut the glyphs in half
  • Xresources + live reload - fetch colors from xrdb

And after this I had my then perfect st, so what went wrong?

my st

What is wrong?

While I really love st, adding more and more patches into the same build can be a bit of a pain in the neck. To those who really wanna use st with a lot of patches I recommend st-flexipatch. But the main reason I wanted a new terminal was because of powerline.


powerline pic

Powerline gives this really cool effect to your shell and I was using them for my neovim statusline. Powerline fonts are supposed to greater in height but st did not do that. It worked really great when the chscale was set to 1.0 but increasing that would look very bad. Another issue was also that I could not get alpha and ligatures working in the same build. (tho it could be avoided by flexipatch). And as a ricer I also wanted a stable way to display images in the terminal, but I could not get w3m to work on my machine

What did I choose?

Even though the dev is kinda a dummy and the terminal itself is too bloated I ended up using kitty. Configuring it was really easy, but the only issue I had with it at first was ofc the font. ST IS THE BEST IN FONT RENDERING. But I Tried To Replicate st’s font by reducing the width

modify_font cell_height 120%
modify_font cell_width 87%
box_drawing_scale 0.01, 0.8, 1.5, 2

And this is how my terminal looks now:

kitty

Namish

21 Jul 2023

( っ˶´ ˘ `)っ made out of ❤️ and boredom

built with astro