Backspace sends DEL instead of ^H.
[spft.git] / README.md
blob33d51e3dfa5e90bac21cdc6168cf7ac2acd4be34
1 spft
2 =====
4 Simple Proportional-Font Terminal
6 Inspired by mlterm and st.
8 mlterm was the only X terminal program I'd found that properly supports
9 proportional (that is, non-monospace) fonts.  There should be more than one...
10 and now there is.  Also, they broke some of the behavior around the
11 Shift-PageUp/Down keys in version 3.9.1.  It seems they wanted to make
12 scrolling a "mode" now, which it hadn't really been before, and they slipped
13 this significant UI change and its associated breakage into a point-point
14 release.  That ticked me off enough to prompt me to write this.
16 st is wonderfully simple in how it's coded.  It's a lot easier to find your way
17 around its code than it is for mlterm.  It provided accessible examples of how
18 to do various things.
20 spft is somewhere between the two in both functionality and code style.  spft
21 isn't written in a "suckless" style like st is (it's in C++, for a start), but
22 it still aspires to be as minimal and direct as possible.  It compiles in under
23 a second for me if I use all the cores on my machine.  It also appears to use
24 much less memory than mlterm, even when keeping much more scrollback history.
27 Status
28 -----
30 It doesn't handle every escape sequence known to man, but it seems quite usable
31 at this point.
34 Elastic Tabs
35 -----
37 spft is the first terminal program I know of that supports elastic tabs.  At
38 first, I had it do elastic tabs for all tabs.  But elastic tabs look terrible
39 if applied to output that's generated for tab-stop tabs.  (Often a wide column
40 on one line will be an empty "column" on another line, pushing the meat of the
41 second line way to the right.)  
43 So elastic tabs are enabled by a couple of special escape sequences.
44 "\x1B[?5001h" starts a group of elastic-tabbed lines with the line that the
45 cursor is on.  "\x1B[?5001l" ends that group; the line containing the cursor is
46 not part of it.  There are also expanded versions of these: "\x1B[?5002;Nh",
47 where N is the number of columns that will be right-justified; and
48 "\x1B?5002;1l" which ends the group, but includes the line with the cursor
49 (useful if you're right-justifying columns in a single line).
51 An "els" script is included; it wraps "ls" so the output is appropriate for
52 elastic tabs.  You might want to put something like this in your .bashrc:
54 ```bash
55 if [ -n "$SPFT" ]; then
56     alias ls='els --color=always'
57     fi
58 ```
61 Recommended Fonts
62 -----
64 I use "Helvetica Neue Light".  I wish I could find a free font that looks as nice as that.
67 What it still needs
68 -----
70 - More escape sequences.
71 - Handle requests for big selections correctly.
72 - Settable window class and other WM hints.