~kris/suckless

st

suckless simple terminal — krisyotam build
15f7a94e — Kris Yotam a month ago
chore: sync local state after restore (push updates, no pull)
3bb3315d — Kris Yotam 3 months ago
switch terminal colorscheme to Plan 9 palette, set border to 4px
180915a3 — Kris Yotam 7 months ago
Update README: clarify suckless repos are my builds

refs

main
browse  log 

clone

read-only
https://git.krisyotam.com/~kris/st
read/write
git@git.krisyotam.com:~kris/st

You can also use your local clone with git send-email.

#Kris's build of st (flexipatch)

The suckless terminal (st) with additional features that make it the best terminal emulator.

This build is based on st-flexipatch, which uses preprocessor directives to manage patches. This allows easy toggling of features without manual patching.


#How Patches Work (Preprocessor Directives)

Unlike traditional st patching, this build uses C preprocessor directives to include/exclude patches at compile time. To enable or disable a patch, edit patches.h and set the value to 1 (enabled) or 0 (disabled):

#define ALPHA_PATCH 1      /* enabled */
#define FULLSCREEN_PATCH 0 /* disabled */

Then rebuild:

sudo make clean install

All patch options are documented in patches.h. The actual code for each patch lives in the source files, wrapped in #if PATCH_NAME ... #endif blocks.


#Features

#Clipboard

Keybinding Action
Ctrl+c or Ctrl+Shift+c Copy selection
Ctrl+v or Ctrl+Shift+v Paste
Right Click Paste from clipboard

#Scrollback

Keybinding Action
Alt+k / Alt+Up Scroll up (1 line)
Alt+j / Alt+Down Scroll down (1 line)
Alt+u / Alt+PageUp Scroll up (page)
Alt+d / Alt+PageDown Scroll down (page)

#Font & Zoom

Keybinding Action
Alt+, Zoom in
Alt+. Zoom out
Alt+g Reset to default size
Super+Shift+K/J Zoom in/out
Super+Shift+U/D Zoom in/out (2x)

#Transparency

Keybinding Action
Alt+s Increase transparency
Alt+a Decrease transparency
Alt+m Reset transparency (opaque)

#External Pipe

Keybinding Action
Alt+l Open URL handler
Alt+y Copy URL to clipboard
Alt+o Copy terminal output

#Other

Keybinding Action
Super+Shift+Enter Spawn new terminal in current directory
Ctrl+Shift+U Unicode input (ISO 14755)

#Enabled Patches

Configured in patches.h:

Patch Description
alpha Transparency support with configurable opacity
anygeometry Dynamic geometry/borders
anysize Resize to any pixel size
blinking_cursor Cursor blinking support
boxdraw Render box-drawing characters without font glyphs
clipboard Clipboard integration (CLIPBOARD on selection)
columns Doesn't cut text while resizing
copyurl Select and copy URLs
externalpipe Pipe terminal content to external commands
font2 Secondary font support (emoji fallback)
iso14755 Unicode input via dmenu
ligatures HarfBuzz ligature support
newterm Spawn new terminal in current directory
scrollback Scroll history
scrollback_mouse Scroll with mouse wheel + Shift
scrollback_mouse_altscreen Mouse scroll in alternate screen
sixel Sixel graphics support (for manga-tui, etc.)
swapmouse Swap mouse buttons
sync Synchronized updates to reduce flicker
xresources Load settings from Xresources
xresources_reload Live reload on SIGUSR1

#Appearance

  • Default font: JetBrainsMono Nerd Font
  • Color scheme: Gruvbox Dark
  • Transparency: 85% (configurable)
  • Xresources: Supports dynamic colors via ~/.Xdefaults or ~/.Xresources
  • Live reload: xrdb merge ~/.Xresources && kill -USR1 $(pidof st)

#Installation

#Dependencies

# Arch
pacman -S harfbuzz imlib2 libxft fontconfig freetype2

# Debian/Ubuntu
apt install build-essential libxft-dev libharfbuzz-dev libimlib2-dev

# Fedora
dnf install harfbuzz-devel imlib2-devel libXft-devel

# Void
xbps-install libXft-devel libX11-devel harfbuzz-devel imlib2-devel

#Build

git clone https://github.com/krisyotam/st
cd st
sudo make clean install
xrdb merge ~/.Xresources

Add the xrdb merge command to your WM's autostart.

Requires a compositor (xcompmgr, picom, etc.) for transparency.


#Configuration

#Enabling/Disabling Patches

Edit patches.h to toggle patches:

#define SIXEL_PATCH 1        /* Enable sixel graphics */
#define FULLSCREEN_PATCH 0   /* Disable fullscreen */

#Customizing Settings

Edit config.def.h for:

  • Font settings
  • Colors (Gruvbox by default)
  • Keyboard shortcuts
  • Transparency level
  • External pipe commands

After editing, rebuild:

rm config.h && sudo make clean install

#Xresources

This build reads settings from ~/.Xdefaults or ~/.Xresources. Changes reload live with:

xrdb merge ~/.Xresources && kill -USR1 $(pidof st)

Example Xresources:

st.font: JetBrainsMono Nerd Font:pixelsize=15
st.alpha: 0.85
st.color0: #282828
st.background: #282828
st.foreground: #ffffff

#Sixel Graphics

This build includes sixel support for displaying images in the terminal. Applications like manga-tui can render images directly in st.

To verify sixel support:

# If you have libsixel installed
img2sixel /path/to/image.png

#My Other Suckless Repos

  • dwm - dynamic window manager
  • dwmblocks - modular status bar
  • surf - simple web browser
  • dmenu - application launcher

#Credits


#Contact