btcinfo  

Hic inserere motto

Suckless st and tabbed

July 15, 2021 — shinohai

In my quest to vpatch more things that I use regularly, I finally made a section on this site for my collection of suckless tools. While urxvt served me well for some time, it grows more and more into a bloated mess every update for so simple an item as a virtual terminal. st + tabbed combined have far fewer lines of code, is all in C, and with a few tweaks mimics all the good functionalities I need.

The st vpatch is vanilla st with the scrollback patches and externalpipe patch applied so I get a clean genesis starting point, and tabbed is the one found at suckless.org but modified slightly to allow allow renaming of open tabs (more on that below).

Both items are pressed in the usual way using your preferred implementation of V. The `config.h.def` file can be adjusted further to operator preferences before building with `make`.

After the items are installed to your path, a couple of bash functions can be added to one's aliases to ease tabbed terminal startup and renaming of tabs:

function term() {
xid="$(tabbed -c -d -s -r 2 st -w x)"
st -w "$xid" bash &
}
function set-title() {
  if [[ -z "$ORIG" ]]; then
    ORIG=$PS1
  fi
  TITLE="\[\e]2;$*\a\]"
  PS1=${ORIG}${TITLE}
}

Now I have an easy way to open a tabbed terminal and quickly rename tabs to organize work. For me, it looks something like this:

These items can now be found here:

st vpatch and seals

tabbed vpatch and seals

Tags: News, Linux, Tools