simple terminal on wayland
HTTPS
https://git.nageyqma.icu/nageyqma/st.git
SSH
git@git.nageyqma.icu:nageyqma/st.git
HTTPS 链接可直接 git clone;推送代码请使用 SSH。
文件 · main
| patches/ | — | |
| .gitignoreraw | 63 B | |
| LEGACYraw | 732 B | |
| LICENSEraw | 1.8 KB | |
| Makefileraw | 3.8 KB | |
| READMEraw | 2.5 KB | |
| arg.hraw | 1.0 KB | |
| boxdraw.craw | 5.6 KB | |
| boxdraw_data.hraw | 6.1 KB | |
| config.hraw | 22.6 KB | |
| config.mkraw | 2.0 KB | |
| hb.craw | 3.4 KB | |
| hb.hraw | 111 B | |
| render.hraw | 736 B | |
| st.1raw | 3.5 KB | |
| st.craw | 61.7 KB | |
| st.hraw | 3.4 KB | |
| st.inforaw | 4.0 KB | |
| win.hraw | 2.4 KB | |
| wl.craw | 90.2 KB |
最近提交
| remove stupid llm config |
| tried to fix wired boarder |
| cjk font |
| early wayland support |
| some old changes i made 2023 |
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.