st
is a simple terminal emulator for X
which sucks less.
st
is one of the few terminal emulators for Linux that supports ligatures.
My favorite font to work in, Fira Code, requires ligatures. I personally find that it makes code easier to follow and generally more legible.
There are other choices out there, but I prefer to have a performant terminal versus something that may consume more resources like something based on Electron, etc.
This repository includes patches that:
- add ligature support
- boxdraw support (fixes rendering of lines and drawing glyphs)
- font2 var support to enable backup/spare font configuration addresses issues where specific glyphs can't be present in default font settings and must be included separately
- desktop entries specification that gets copied to the appropriate path, enabling Gnome and KDE to display a desktop-style launcher for st
- configures
st
to use the Fira Code font - gruvbox color scheme via patch st-gruvbox-dark-0.8.2.diff
There are other choices out there, but I prefer to have a performant terminal versus something that may consume more resources like something based on electron, etc.
In order to build st
you need the Xlib
header files.
Edit config.mk
to match your local setup (st is installed into
the /usr/local
namespace by default).
Afterwards enter the following command to build and install st
(if
necessary as root
):
$ make clean install
Edit config.def.h
to update miscellaneous configuration options.
For example:
unsigned int tabspaces = 8;
/* bg opacity */
- float alpha = 0.99;
+ float alpha = 0.55;
Once your changes have been saved/committed, you can run the following to
update your st
installation.
$ make clean && make config.h && make -j8 ; sudo make -j8 install
rm -f st st.o x.o boxdraw.o hb.o st-0.8.3.tar.gz
make: 'config.h' is up to date.
c99 -I/usr/include/X11 `pkg-config --cflags fontconfig` `pkg-config --cflags freetype2` `pkg-config --cflags harfbuzz` -DVERSION=\"0.8.3\" -D_XOPEN_SOURCE=600 -O -c st.c
st build options:
c99 -I/usr/include/X11 `pkg-config --cflags fontconfig` `pkg-config --cflags freetype2` `pkg-config --cflags harfbuzz` -DVERSION=\"0.8.3\" -D_XOPEN_SOURCE=600 -O -c x.c
c99 -I/usr/include/X11 `pkg-config --cflags fontconfig` `pkg-config --cflags freetype2` `pkg-config --cflags harfbuzz` -DVERSION=\"0.8.3\" -D_XOPEN_SOURCE=600 -O -c boxdraw.c
c99 -I/usr/include/X11 `pkg-config --cflags fontconfig` `pkg-config --cflags freetype2` `pkg-config --cflags harfbuzz` -DVERSION=\"0.8.3\" -D_XOPEN_SOURCE=600 -O -c hb.c
CFLAGS = -I/usr/include/X11 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DVERSION="0.8.3" -D_XOPEN_SOURCE=600 -O
LDFLAGS = -L/usr/lib/X11 -lm -lrt -lX11 -lutil -lXft -lXrender -lfontconfig -lfreetype -lfreetype -lharfbuzz
CC = c99
c99 -o st st.o x.o boxdraw.o hb.o -L/usr/lib/X11 -lm -lrt -lX11 -lutil -lXft -lXrender `pkg-config --libs fontconfig` `pkg-config --libs freetype2` `pkg-config --libs harfbuzz`
[sudo] password for jgrow:
mkdir -p /usr/local/bin
cp -f st /usr/local/bin
chmod 755 /usr/local/bin/st
mkdir -p /usr/local/share/man/man1
sed "s/VERSION/0.8.3/g" < st > /usr/local/share/man/man1/st
chmod 644 /usr/local/share/man/man1/st
tic -sx st.info
7 entries written to /etc/terminfo
Please see the README file regarding the terminfo entry of st.
mkdir -p /usr/local/share/applications
cp -f st.desktop /usr/local/share/applications
update-desktop-database /usr/local/share/applications
Finally, to install the st
logo to use for the icon, copy st.svg
to appropriate $XDG
icon directory e.g.
/usr/share/icons/hicolor/scalable/apps/st.svg
$ cp st.svg /usr/share/icons/hicolor/scalable/apps/st.svg
If you did not install st
with make clean install
, you must compile
the st
terminfo
entry with the following command:
$ tic -sx st.info
See the man
page for additional details.
Based on Aurélien APTEL bt source code.