nageyqma·git

simple terminal on wayland

更新于 2026-10-29 · 512.0 KB

HTTPS https://git.nageyqma.icu/nageyqma/st.git SSH git@git.nageyqma.icu:nageyqma/st.git

HTTPS 链接可直接 git clone;推送代码请使用 SSH。

文件 · main

patches/—
.gitignoreraw63 B
LEGACYraw732 B
LICENSEraw1.8 KB
Makefileraw3.8 KB
READMEraw2.5 KB
arg.hraw1.0 KB
boxdraw.craw5.6 KB
boxdraw_data.hraw6.1 KB
config.hraw22.6 KB
config.mkraw2.0 KB
hb.craw3.4 KB
hb.hraw111 B
render.hraw736 B
st.1raw3.5 KB
st.craw61.7 KB
st.hraw3.4 KB
st.inforaw4.0 KB
win.hraw2.4 KB
wl.craw90.2 KB

最近提交

remove stupid llm configJean Hu · 2026-10-29 · 4e703c9
tried to fix wired boarderJean Hu · 2026-10-28 · 731ab3f
cjk fontnageyqma · 2026-10-27 · d97040a
early wayland supportnageyqma · 2026-10-23 · b5c3fba
some old changes i made 2023nageyqma · 2026-10-22 · 1273786

全部提交 →

README

st - simple terminal
--------------------
st is a simple terminal emulator for Wayland which sucks less.

It is a port of suckless st: the terminal core (st.c) is unchanged, the
old X11 backend has been replaced by a small Wayland backend (wl.c) that
draws an ARGB8888 wl_shm buffer.  There is no X11 code path and no
XWayland fallback.


Requirements
------------
In order to build st you need:

  - wayland-client and wayland-protocols (wayland-scanner)
  - xkbcommon
  - fontconfig and freetype2
  - harfbuzz

The protocol bindings are generated at build time and are not committed.
The XMLs are found through pkg-config, then under $XDG_DATA_HOME (or
~/.local/share), /usr/local/share and /usr/share.  If wayland-protocols
lives somewhere else, point WLPROTO at it:

    make WLPROTO=/opt/wayland-protocols


Installation
------------
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


Running st
----------
st runs on any Wayland compositor that implements xdg-shell and wl_shm.
The following protocols are used when the compositor provides them and
silently skipped otherwise: fractional-scale/viewporter for crisp
fractional scaling, text-input-v3 for input methods, primary-selection,
cursor-shape and xdg-system-bell.

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.

Notes
-----
- Wayland does not let clients place their windows.  -g only selects the
  initial number of columns and rows; offsets are ignored with a warning.
- -n and -w are gone: X11 instance names and XEmbed do not exist here.
- Scaling: the surface is rendered at the compositor's preferred scale and
  mapped through wp_viewport, so 1.5x and other fractional scales stay
  crisp.
- The window is drawn with two rotating buffers; every commit contains the
  complete frame.  This is required because some compositors (KWin) keep
  the current buffer alive until it is replaced and therefore never send
  wl_buffer.release for a single-buffer scheme.
- Font fallback: a glyph the configured font does not carry (CJK, for
  instance) is drawn with the first fontconfig candidate whose face really
  contains it.  The family in config.h stays the primary font; fallback only
  fills the gaps.

Credits
-------
Based on Aurélien APTEL <aurelien dot aptel at gmail dot com> bt source code.