This repo a custom configuration of Suckless Terminal with the patches applied according to the workflow of my convinence.
| Patch | Description |
|---|---|
| scrollback | for backwards scroll support |
| colorschemes | switch among 8 color schemes |
| boxdraw | adds options to render most of the lines/blocks characters and/or the the braille ones without using the font |
| ligatures | adds options to render most of the lines/blocks characters and/or the the braille ones without using the font |
| anysize | allows st to resize to any pixel size, makes the inner border size dynamic, and centers the content of the terminal. st will always fill the entire space allocated on a tiling WM. |
| delkey | Return BS on pressing backspace and DEL on pressing the delete key. |
- Development files for FreeType-based font drawing library for X (XFT).
- Development files for
Harfbuzzlibrary for ligatures support, an OpenType text shaping engine.
# for Debian/Ubuntu based distros
sudo apt install build-essential libxft-dev libharfbuzz-devSuckless’ programs are meant to be as minimal as possible after all. That’s not to say you’re left completely in the dust if you want something like scrollback support though. st’s patches provide you with an easy way of adding some extra functionality.
Most of the newbies, unfimilier with the open-source software development process (i.e. patches), are troubled by the lack of guidance and documentation. However, a careful look at the suckless' website reveals the hacking guide.
This guide lists three methods of patching a program:
For git users, use -3 to fix the conflict easily:
cd program-directory
git apply path/to/patch.diffFor patches formatted with git format-patch:
cd program-directory
git am path/to/patch.diffFor tarballs:
cd program-directory
patch -p1 < path/to/patch.diffIn addition to these, there's another good method is by using patch command with --merge option which merges a patch file into the original files.
cd program-directory
patch --merge -i path/to/patch.diffThe last mathod is the most favored one accross the hacker community.
The default font is set to FiraCode Nerd Font (config.def.h/config.h, line# 8):
static char *font = "FiraCode Nerd Font:pixelsize=11:antialias=true:autohint=true";The colorschemes patch must be applied prior to this tweak. The default color scheme is set to One Half dark (config.def.h/config.h, line# 167):
int colorscheme = 2; // One Half darkThis patch adds options to render most of the lines/blocks characters and/or the the braille ones without using the font.
Unlike others, this patch has been generated using git --format-patch. Most suitable command for patching is:
patch -p1 < st-boxdraw_v2-0.8.5.diffPredefined color schemes:
- the default (dark) st color scheme
- the default (dark) alacritty color scheme
- One Half (dark & light)
- Solarized (dark & light)
- Gruvbox (dark & light)
Key bindings:
- Select the first..eighth color scheme with Alt+1..8.
- Select the next color scheme with Alt+0.
- Select the previous one with Ctrl+Alt+0.
| Binding | Color Scheme |
|---|---|
Alt+1 |
st dark |
Alt+2 |
Alacritty dark |
Alt+3 |
One Half dark |
Alt+4 |
One Half light |
Alt+5 |
Solarized dark |
Alt+6 |
Solarized light |
Alt+7 |
Gruvbox dark |
Alt+8 |
Gruvbox light |