If you are a user of dwm, then you might also like suckless.orgs st (simple terminal), Id like to dub it as suckless terminal. A thread about solarized st introduced me this two-year-old terminal emulator, first version 0.1 released in April, 2011.

As of writing, the latest version v0.4.1 was released on 2013-04-20.

On Gentoo, the latest version and older versions are still marked as unstable. Since I want to avoid ~arch as much as possible, therefore this post is just a quick note about st. However, I have no doubt in my mind, once st is moved to stable, I would start to transition into it as long as it runs properly with programs I use at that time.

1   The attraction

A quick quote from its webpage, even without specifically stating what st does better:

It [xterm] has over 65K lines of code and emulates obscure and obsolete terminals you will never need. The popular alternative, rxvt has only 32K lines of code.

st.c, v0.4.1, has only 3,397 lines. Do we need to say more? Even you count configuration file and some additional files, it cant top that 32K lines. For me, this is pretty close to convincing me using it.

Nonetheless, which is more than enough for me to try it out. I noticed its like 5 seconds to emerge, really fast. Estimated re-emerge time by genlop:

st: less than a minute (~10 to 20 seconds)
[ebuild   R   ~] x11-terms/st-0.4.1  USE="savedconfig" 0 kB
rxvt-unicode (urxvt): one minute (~30 to 120 seconds)
[ebuild   R    ] x11-terms/rxvt-unicode-9.18  USE="256-color blink font-styles perl xft -alt-font-width -buffer-on-clear -fading-colors -focused-urgency -iso14755 -mousewheel -pixbuf -secondary-wheel -startup-notification -unicode3 -vanilla -wcwidth" 0 kB
xterm: less than a minute (~30 to 40 seconds)
[ebuild  N     ] x11-terms/xterm-285  USE="toolbar truetype unicode -Xaw3d" 1,076 kB

As for dwm-like configuration file, since I am a dwm user, this type of configuration file seems more like a plus to me. Because you can expand or write your own code to enhance st in configuration file as I did to dwm. In urxvt, its impossible for me since I cant even read Perl.

2   Quick tests

Detail versions and options:

st 0.4.1 (c) 2010-2013 st engineers

rxvt-unicode (urxvt) v9.18 - released: 2013-03-24
options: perl,xft,styles,combining,blink,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,transparent,tint,XIM,frills,selectionscrolling,slipwheel,cursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm

The test configuration has only font setting modified, the rest is same as default. Please keep in mind that I know nothing about terminal emulator other than running them and print out stuff, so the numbers will be shown in the rest of post do not mean by rigorous testing.

2.1   Performance test

I used my script termfps.sh to test, which I wrote a while ago to test the speed of rendering, here is the results with same font setting Envy Code R:style=Regular:size=9:antialias=false:

terminal st st/tmux urxvtc urxvtc/tmux urxvt urxvt/tmux
size 138x24 138x23 118x24 118x23 118x24 118x23
frames 100 100 100 100 100 100
characters 331,200 317,400 283,200 271,400 283,200 271,400
elapsed time (s) 0.576 2.276 0.580 1.870 0.599 1.837
characters/s 575,000 139,455 488,275 145,176 472,788 147,784

st simple terminal performance test 2013-05-28--14:54:52

Although st is about 17.76% faster, but within tmux, it runs a bit slower. Not sure whats the cause.

Note that there is a different in terminal width/columns even I set them with same font size. But it doesnt affect the results I want to see.

2.2   Launch time test

I use Bash time to calculate the launch time with /bin/true:

time <term command> -e '/bin/true'

Here is the results:

term st urxvt urxvtc
real 0m0.382s 0m0.259s 0m0.032s
user 0m0.333s 0m0.213s 0m0.000s
sys 0m0.047s 0m0.036s 0m0.003s

Surprisingly, st is slower to launch up.

2.3   Resource usage

 0.2  0.7  60828 14840 st
 0.0  0.1  24872  2920  \_ bash
 0.2  0.7  60828 14844 st
 0.0  0.1  24872  2924  \_ bash
 0.0  0.0  20916  1364      \_ tmux
 0.6  1.1 119360 22692 urxvtd
 0.0  0.0  20920  1356  \_ tmux
 0.0  0.1  22776  2984  \_ bash
 0.0  0.1  24852  2912  \_ bash
 0.0  0.0  20920  1352  \_ tmux
 0.0  0.0  13584  1660 startx
 0.0  0.0  15932  1032  \_ xinit
 0.0  0.0  28344  1784      \_ dwm
 0.0  0.8  81340 18048          \_ urxvt
 0.0  0.1  24852  2908          |   \_ bash
 0.1  0.8  81264 18148          \_ urxvt
 0.0  0.1  24852  2868              \_ bash
 0.0  0.0  20920  1352                  \_ tmux

A st instance uses about 14.8 MB RSS (resident set size), urxvt uses about 18.0 MB, urxvt daemon uses about 22 MB, in my case, but hosts 4 windows.

2.4   ANSI escape code

My ANSI_test.sh, just a simple test for 256 colors, mainly.

st simple terminal ANSI test 2013-05-28--15:24:50

3   Thoughts

I have been using rxvt-unicode for years, more specifically, its daemon/client mode. Its fast and memory efficient if you have multiple windows opened. However, with terminal multiplexer like tmux or GNU/Screen, it has no advantage anymore since you most likely to tab or split tab into panes. Most of time, I only have one urxvtc. The only thing it benefits me, it (urxvtc) starts up fast, well, by 0.2 seconds.

Although the tests above dont show st is better that urxvt overall, but its still relatively new and I would still switch to it once it gets stabilized. The reason is urxvt has more features than I actually use. (Do you know the Ctrl + MMB or Ctrl + RMB in urxvt?) One thing totally useless is the scroll buffer once you start to use terminal multiplexer.

The point is too many stuff you dont use and you dont understand, if you realize, then that might be the same reason you switch to dwm. You configure your WM and you know a little better about it. If you take a look at config.def.h, it looks a bit like configuration file of dwm, and we only put things we need.

By no means that I am saying urxvt isnt good, in fact, its by far the most outstanding terminal emulator I have ever used. Its fast, probably the fastest one. I know one thing I would be missing was an extension of urxvt, url-select, I love using keyboard, but I would survive.

Would I recommend anyone to try st out? Of course! Please do try it if you are looking for simple terminal.

More people use it, the better it would be when I switch to it, my ingenious evil plan has been revealed!