Commit graph

2155 commits

Author SHA1 Message Date
Daniel Eklöf
c3cf05f8fb
doc: foot.5: make it clear that 'login-shell' is a boolean option 2020-06-30 17:46:35 +02:00
Daniel Eklöf
db7a51e3a4
changelog: grammar 2020-06-30 17:46:25 +02:00
Daniel Eklöf
a259eda535
config: add 'blink' option to cursor section in footrc
This option controls whether the default cursor should blink or
not. The default is to *not* blink.
2020-06-30 17:45:34 +02:00
Daniel Eklöf
7f65bd1c20
csi: '\E[0 q' resets the cursor style to the default, not '\E[2 q'
Also update 'Se' capability in the terminfo, to reflect this.
2020-06-30 17:44:43 +02:00
Daniel Eklöf
fd4904d82a
csi: debug: print 'private' *after* parameters 2020-06-30 17:42:57 +02:00
Daniel Eklöf
08309537ce
Merge branch 'sixel-performance' 2020-06-30 17:41:59 +02:00
Daniel Eklöf
fad5838dba
Merge branch 'master' into sixel-performance 2020-06-29 22:03:26 +02:00
Daniel Eklöf
62be729c45
scroll: destroy scrolled out sixels before scroll is applied
The logic that breaks out of sixel loops does not work for rows that
has already wrapped around.

Thus, we need to destroy sixels that are about to be scrolled
out *before* we actually scroll.

Since this is the *only* time we destroy sixels (instead of
overwriting it), rename the sixel functions. And, since they now do a
very specific thing, they can be greatly simplified (and thus faster).
2020-06-29 22:01:02 +02:00
Daniel Eklöf
a136987678
reflow: ensure sixels are correctly sorted when re-inserted
And make sure to remove re-inserted sixels that has wrapped around the
scrollback (this may happen when the window size decreases).
2020-06-29 21:59:40 +02:00
Daniel Eklöf
6ee76c21f2
changelog: group sixel related changes toghether 2020-06-29 21:57:01 +02:00
Daniel Eklöf
8f5e6e85e0
sixel: destroy all sixels when font size is decreased
If changing the font size causes the cell size to decrease, either
horizontally or vertically (or both), then delete all sixels since the
grid space they allocated no longer is enough to hold the images.
2020-06-29 21:53:29 +02:00
Daniel Eklöf
2c4ebec4da
changelog: slave -> client 2020-06-29 21:53:07 +02:00
Daniel Eklöf
b56dbfa854
changelog: 'capturing mouse events' -> 'capturing the mouse' 2020-06-29 21:52:50 +02:00
Daniel Eklöf
a6d35d41c4
changelog: make it easier to read 2020-06-29 21:52:32 +02:00
Daniel Eklöf
2ea32398c3
term: use 'left_ptr' instead of 'hand2' as cursor when client is mouse grabbing 2020-06-29 21:51:53 +02:00
Daniel Eklöf
1140dd37d3
sixel: overwrite-by-rectangle: optimize: break out of loop as soon as possible
Since the images are sorted, we can break out of the loop as soon as
we detect an image that *ends before* the rectangle's top starts.

In order for the row comparisons to work, the row numbers must be
re-based against the current scrollback offset, or the
scrollback *end*, to be precise.
2020-06-28 19:22:23 +02:00
Daniel Eklöf
43b890c8e4
Merge branch 'master' into sixel-performance 2020-06-28 14:27:12 +02:00
Daniel Eklöf
aa1951a4d2
sixel: overwrite-by-row: optimize: break out of loop as soon as possible
Since the images are sorted, we can break out of the loop as soon as
we detect an image that *ends before* the row we're looking for.

In order for the row comparisons to work, the row numbers must be
re-based against the current scrollback offset, or the
scrollback *end*, to be precise.
2020-06-28 14:24:30 +02:00
Daniel Eklöf
c7b2dcc0f4
render: sixel: regression: need to take current offset into account when early-quitting sixel rendering
The sixel images are sorted, that's true. But in order for our row
numer comparisons to actually work, we need to rebase all numbers
against the current scrollback offset (or, the scrollback *end*, to be
precise).
2020-06-28 14:19:43 +02:00
Daniel Eklöf
4006fc86e4
sixel: overwrite: pass 'width' to sixel_overwrite_at_cursor()
This is necessary to handle multi-column characters correctly.
2020-06-28 11:01:19 +02:00
Daniel Eklöf
5158be86d2
render: sixels: break out of loop when we're sure there aren't any more visible images
The sixel list is sorted, with the most recent images *first* in the
list (and thus the "oldest" images are at the back).

This means we can break out of the loop when we see a sixel
that *ends before* the current view starts.

As a minor optimization, we also recognize sixels that *start after*
the current view ends. We can't break out of the loop, but we can skip
trying to render them (they wouldn't have been rendered, but more work
would have been done in render_sixel() to reach this conclusion).
2020-06-28 10:45:30 +02:00
Daniel Eklöf
0483466f68
sixel: insert: calculate end rows in a single statement 2020-06-28 10:45:05 +02:00
Daniel Eklöf
32e84fbc54
readme: nope, how about a png then? 2020-06-28 09:32:54 +02:00
Daniel Eklöf
dc5b6ca73a
readme: let's see if we can use the SVG in the top header 2020-06-28 09:32:16 +02:00
Daniel Eklöf
a3adc5724e
readme: link to PNG instead 2020-06-28 09:30:23 +02:00
Daniel Eklöf
81968b989e
readme: special thanks go to Ordoviz, for designing foot's logo 2020-06-28 09:29:20 +02:00
Daniel Eklöf
4cea9d910e
Merge branch 'logo' 2020-06-28 09:22:48 +02:00
Daniel Eklöf
4a0042ba15
sixel: insert: sort sixels such that those furthest up in the scrollback is at the back 2020-06-28 09:16:43 +02:00
Daniel Eklöf
247e0c42d3
sixel: add local function sixel_insert()
Replace all tll_push_*() calls with calls to this function.
2020-06-28 08:37:25 +02:00
Lennard Hofmann
6b889564f7 Add logo, fixes #27
The SVG can be scaled to any size, thus we only provide the "minimum" of
PNGs as specified by XDG, see "Installing Application Icons" in
https://specifications.freedesktop.org/icon-theme-spec/
2020-06-27 21:23:50 +02:00
Daniel Eklöf
deb61d20d8
grid: reflow: delete sixels that end up crossing the scrollback wrap around
Our sixel handling code requires sixels to *not* cross the scrollback
wrap around.

Until we've fixes the reflow code that split up such sixels (much like
we do when we generate a sixel), simply delete it.
2020-06-27 20:16:39 +02:00
Daniel Eklöf
ad8f293d96
terminfo: add remaining keypad keys 2020-06-27 20:05:50 +02:00
Daniel Eklöf
26528f6a73
input: add key mapping for XKB_KEY_KP_Decimal 2020-06-27 20:03:41 +02:00
Daniel Eklöf
9f31cfa764
terminfo: add ka1, ka3, kc1 and kc3 (upper/lower left/right keypad keys) 2020-06-27 19:39:27 +02:00
Daniel Eklöf
851e99f9a5
terminfo: kb2 (center keypad key) should be \EOu, not \EOE 2020-06-27 19:38:53 +02:00
Daniel Eklöf
644c8ef879
grid: add TODO, and an assert, that sixels must not cross wrap-around 2020-06-27 15:34:54 +02:00
Daniel Eklöf
1915e53629
sixel: improve descriptions of sixel_delete_* and sixel_overwrite_* 2020-06-27 15:32:33 +02:00
Daniel Eklöf
186a07c364
sixel: split -> overwrite 2020-06-27 15:29:47 +02:00
Daniel Eklöf
ae727e372a
term: erasing characters now splits sixels instead of deleting them 2020-06-27 15:22:31 +02:00
Daniel Eklöf
0953ffd2d3
sixel: delete/split: early(ier) exit when there aren't in sixel images
Avoid unnecessary wrap checks if the sixel image list is empty.
2020-06-27 14:43:29 +02:00
Daniel Eklöf
a25ff1ed84
Merge branch 'sixel-split' 2020-06-27 14:28:26 +02:00
Daniel Eklöf
f976df6f4d
changelog: sixel images can now be printed on 2020-06-27 14:27:49 +02:00
Daniel Eklöf
8cdfd03c4b
sixel: split: make pixman instantiation generic 2020-06-27 14:26:13 +02:00
Daniel Eklöf
cc65002539
sixel: never generate scrollback wrapping sixel images
Instead, split them up into two (or more...).

This makes the intersection detection logic *much* simpler.
2020-06-27 14:19:08 +02:00
Daniel Eklöf
e896c2fa55
sixel: refactor handling of wrap-around delete- and split regions
Handle these on a higher abstraction level. The low level functions
that detect sixel intersections now assume the specified rectangle (or
line region) does *not* cross the wrap-around.

This is ensured by detecting a wrap-around region before hand, and
splitting it up into two, non wrapping regions.
2020-06-27 13:56:13 +02:00
Daniel Eklöf
3715a37be9
sixel: split_by_rectangle: bug: typo in boundary check 2020-06-27 13:19:19 +02:00
Daniel Eklöf
37ceb65729
sixel: split: make sure relative row/column values are bounded 2020-06-27 13:18:54 +02:00
Daniel Eklöf
d9b7a85722
sixel: split: push front instead of back
This reduces the burden on sixel_split_by_rectangle(), which would
otherwise consider the newly added/splitted sixels. Since we already
know they aren't covered by the specified rectangle, we can skip that.
2020-06-27 12:50:39 +02:00
Daniel Eklöf
dfc205e706
sixel: add sixel_split_by_rectangle()
This function splits a sixel image into up to four pieces. The four
pieces correspond to the relative complement (set difference) of the
sixel image and the specified rectangle.

Use this function when (possibly) overwriting existing sixel images
when generating a new one, i.e. in sixel_unhook().
2020-06-27 12:45:22 +02:00
Daniel Eklöf
f4fcdbf38b
sixel: hopefully fix erasing of scrollback wrap-around sixels
If a sixel image crossed the scrollback wrap around, the logic that
detected whether a row, or a row range, intersected with the sixel was
incorrect.
2020-06-27 11:00:28 +02:00