st - the suckless simple terminal, v0.9

suntong

suntong

Posted on October 16, 2022

st - the suckless simple terminal, v0.9

TL;DR

This Debian package does provide a scrollback buffer, it also supports color emoji, and it shows Chinese beautifully:

Why bother

For decades, I settled with urxvt to display Chinese, despite all its quirks, like surprising hot-keys and not supporting color emoji.

However, it is its "helpful" anti-aliasing font effect under WSL that become the last straw that broke the camel's back:

Image description

As I was not able to get rid of the above anti-aliasing effect under WSL.

Why not Alacritty

I agree with the comment from reddit that:

It's Ok to use Alacritty,

if you really want something a bit more bloated, and don't mind using rust software.

Alacritty
Like GNOME, it may look nice, but it consumes way too much RAM for a barebone terminal emulator IMO.

$ ps -eo comm,rss,pcpu | grep -E 'xterm|alacritty'

xterm 13052 0.0
alacritty 38884 0.1

Depending on your distribution, the packaged alacritty may be fatter than others. Here on Fedora (rawhide) is the new GNOME 42 terminal...

ps -eo comm,rss,pcpu | grep -E 'terminal|kitty|st'
kitty           83668  0.5
alacritty       69668  1.3
gnome-terminal- 61260  6.4
st              10172  0.3 (unpatched)
Enter fullscreen mode Exit fullscreen mode

I don't mind it is 4+ the size of st as long as I can get a precompiled Debian/Ubuntu package (as I really don't want to compile any packages myself). However, I gave up alacritty for the exact reason posted under here:

Something to note when using a gpu based terminal. Having the terminal emulator open will make the gpu ramp up a few power states. My 1080ti goes into power state 3, which results in an extra ~30 watts at the wall over using st, urxvt, etc.
Don't get me wrong, alacritty is amazing, but it's not worth the extra power draw for me.

I.e., despite how amazing it is, I'm not willing to let my laptop run hot all the time and reduce its battery time just for some fancy visual effects.

Why not sticking to the official precompiled Debian/Ubuntu package?

Despite how I dislike compiling packages myself, I cannot bear with the official precompiled Debian/Ubuntu package because it does not provide a scrollback buffer, and it crashes when displaying color emojis.

My precompiled Ubuntu package

Because I really don't want to compile any packages myself, and because the only way to get st is to compile it yourself, I'm providing this precompiled Ubuntu package in hoping that it'll help someone like me. It is built right from source git repo, thus it now supports color emoji, and it'll always give you the latest version. Besides, I added the patch so it does provide a scrollback buffer.

Image description

Here is how to get it installed under Debian 11 bullseye (Ubuntu would be similar but simpler):

Check out ppa:suntong001/ppa at https://launchpad.net/~suntong001/+archive/ubuntu/ppa:

This PPA can be added to your Debian 11 system manually by copying the lines below and adding them to your system's software sources.

deb https://ppa.launchpadcontent.net/suntong001/ppa/ubuntu focal main 
deb-src https://ppa.launchpadcontent.net/suntong001/ppa/ubuntu focal main 
Enter fullscreen mode Exit fullscreen mode

Then, after apt update, do:

apt-cache policy stterm libxft2
apt install stterm libxft2
Enter fullscreen mode Exit fullscreen mode

Recheck:

$ apt-cache policy stterm libxft2
stterm:
  Installed: 0.9.1~20221004~ubuntu20.04.1
  Candidate: 0.9.1~20221004~ubuntu20.04.1
  Version table:
 *** 0.9.1~20221004~ubuntu20.04.1 500
        500 http://ppa.launchpad.net/suntong001/ppa/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status
     0.8.5-1 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages
     0.8.4-1 500
        500 http://deb.debian.org/debian bullseye/main amd64 Packages
     0.8.2-1 500
        500 http://deb.debian.org/debian buster/main amd64 Packages

libxft2:
  Installed: 2.3.6-1
  Candidate: 2.3.6-1
  Version table:
 *** 2.3.6-1 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages
        100 /var/lib/dpkg/status
     2.3.6-1~202209251622~ubuntu20.04.1 500
        500 http://ppa.launchpad.net/suntong001/ppa/ubuntu focal/main amd64 Packages
     2.3.2-2 500
        500 http://deb.debian.org/debian bullseye/main amd64 Packages
        500 http://deb.debian.org/debian buster/main amd64 Packages
Enter fullscreen mode Exit fullscreen mode

That's it. Enjoy 😃.

💖 💪 🙅 🚩
suntong
suntong

Posted on October 16, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

st - the suckless simple terminal, v0.9
terminal st - the suckless simple terminal, v0.9

October 16, 2022