Commit 147fcf20

147fcf20ec30Mergedon zach-1de969

zach · 1 month ago · 8 files · ~8 modified

Details

Commit
147fcf20ec30
Parent
95fc230caa8f

README.mdmodifiedView file

@@ -3,7 +3,7 @@
33 A small, no-frills terminal emulator for macOS, rendered on the GPU with
44 [wgpu](https://wgpu.rs). It does what vim, tmux, less and a shell need and
55 not much else: no tabs, splits, profiles, plugins or scripting. The whole
6-thing is ~3,500 lines of Rust meant to be read and changed.
6+thing is ~4,000 lines of Rust meant to be read and changed.
77
88 ## Build and run
99
@@ -18,6 +18,9 @@
1818 - 16, 256 and 24-bit color; bold, italic, dim, underline, strikethrough, inverse
1919 - Any installed font by family name (or a font file path), with real bold/italic
2020 faces and automatic fallback for CJK, emoji and symbols
21+- Programming ligatures (`->`, `!=`, `>=` ... in fonts like Berkeley Mono, Fira
22+ Code or JetBrains Mono), via text shaping
23+- Combining characters (accents, Vietnamese tone marks, emoji variation selectors)
2124 - Box-drawing, block and powerline characters drawn by acorn itself, so vim
2225 splits, tmux borders and statuslines join seamlessly
2326 - Alternate screen, scroll regions, application cursor keys, bracketed paste,
@@ -25,6 +28,8 @@
2528 - Mouse reporting (vim `mouse=a`, tmux), with Shift held to select instead
2629 - Scrollback, mouse/trackpad scrolling, click-drag / double-click (word) /
2730 triple-click (line) selection
31+- Text re-wraps when the window is resized
32+- Blinking cursor (programs like vim can switch blinking and shape)
2833 - OSC 52 clipboard writes (e.g. vim/tmux yanking over ssh), window titles
2934 - Multiple windows
3035
@@ -55,6 +60,7 @@
5560 line_height = 1.0 # multiplier
5661 fallback = [] # extra families for missing glyphs, e.g. ["Symbols Nerd Font Mono"]
5762 builtin_box_drawing = true # draw ─│┌ ▀█ etc. instead of using the font
63+ligatures = true
5864
5965 [window]
6066 columns = 100
@@ -79,6 +85,7 @@
7985 # working_directory = "~" # defaults to $HOME
8086 scrollback = 10000
8187 cursor_style = "block" # "block", "beam" or "underline"
88+cursor_blink = true
8289 scroll_multiplier = 3.0
8390 copy_on_select = false
8491 ```
@@ -92,13 +99,12 @@
9299 | `src/input.rs` | Key and mouse events → bytes for the program |
93100 | `src/renderer.rs` | wgpu setup, glyph atlas, building each frame |
94101 | `src/shader.wgsl` | The one shader: instanced rects and glyphs |
95-| `src/font.rs` | Font lookup, fallback and rasterizing (swash) |
102+| `src/font.rs` | Font lookup, fallback, shaping and rasterizing (swash) |
96103 | `src/boxdraw.rs` | Procedurally drawn line and block characters |
97104 | `src/pty.rs` | Starting the shell on a pseudo-terminal |
98105 | `src/config.rs` | Config file and defaults |
99106
100-Things deliberately left out: tabs and splits (use tmux), ligatures, text
101-reflow on resize, combining characters, cursor blinking, IME composition,
107+Things deliberately left out: tabs and splits (use tmux), IME composition,
102108 images, hyperlinks, and the kitty keyboard protocol.
103109
104-`cargo test` runs the terminal-emulation tests in `src/term.rs`.
110+`cargo test` runs the terminal-emulation and key-encoding tests.