Commit graph

4149 commits

Author SHA1 Message Date
Daniel Eklöf
8cb95018c0
Merge branch 'fix-color-cube'
Closes #479
2021-05-06 14:06:43 +02:00
Daniel Eklöf
a720188b42
config: fix color cube generation
Closes #479
2021-05-06 12:39:30 +02:00
Daniel Eklöf
b712bd9c24
doc: foot.ini: update max-shm-pool-size-mb section
* less highlighting
* it’s ‘virtual *address space*’
* mention it’s only supported on Linux
* mention it’s only supported on 64-bit archs (but not necessarily x86_64)
2021-05-05 09:12:43 +02:00
Daniel Eklöf
f08f880911
Merge branch 'more-unicode-13-box-drawings'
Related to #471
2021-05-04 10:48:01 +02:00
Daniel Eklöf
9e5d740422
box-drawing: add Unicode 13 U+1FB70 - U+1FB8B
Part of #471
2021-05-04 10:47:36 +02:00
Daniel Eklöf
3595d95c27
Merge branch 'bg-alpha-on-default-bg-only' 2021-05-04 10:46:33 +02:00
Daniel Eklöf
b4c99f873f
render: only apply alpha when we’re using the default bg for background
In all other cases, alpha is disabled. This includes:

* Palette- or RGB-colors matching the default background color
* When any kind of reverse video is enabled (e.g. DECSCNM, or ANSI
  reverse)
2021-05-04 10:46:16 +02:00
Daniel Eklöf
107825ef29
Merge branch 'missing-xkb-build-dependency' 2021-05-04 10:45:31 +02:00
Daniel Eklöf
c7a149a7ea
Merge branch 'custom-exit-code'
Closes #466
2021-05-04 10:44:34 +02:00
Daniel Eklöf
1cbbb62da0
doc: foot.1 footclient.1: document exit status 2021-05-04 10:41:23 +02:00
Daniel Eklöf
da923100ca
main/client: change exit code
* foot exits with -26/230
* footclient exits with -36/220

This is to give each application a range of exit codes. Currently
unused, but we may want to change this in the future.
2021-05-04 10:41:22 +02:00
Daniel Eklöf
a1b41bd186
foot/footclient: use a custom exit code when foot/footclient fail to run
Normally, foot and footclient uses the exit code from the client
application (i.e. the shell).

However, foot (or footclient) itself may fail to run; if run outside
of a Wayland session, or no fonts are installed, or the client
application/shell cannot be found (“foot lsdjfldsjf”) etc.

Up until now, there has been no way to differentiate these kind of
failures from the client application exiting with code 1.

This patch changes foot’s failure exit code to -27/229, and
footclient’s to -28/228. Note that footclient will exit with foot’s
-27/229 if footclient ran successfully, but the foot server failed to
instantiate a new window.

Closes #466.
2021-05-04 10:40:38 +02:00
Daniel Eklöf
29b697a9af
Merge branch 'beam-thickness'
Closes #464
2021-05-04 10:38:03 +02:00
Daniel Eklöf
ca685c4c76
Merge branch 'add-truecolor-to-feature-list' 2021-05-02 10:33:52 +02:00
lord
259d6e26e1 Add TrueColors support to Readme 2021-05-02 09:57:01 +02:00
Daniel Eklöf
7edda924a0
meson: add ‘xkb’ as a dependency to vtlib, pgolib and pgo
All of these include wayland.h (either directly, or indirectly), which
pulls in xkbcommon.h.

Reported by swayyyy on IRC:

  FAILED: libvtlib.a.p/dcs.c.o

  In file included from ../../terminal.h:19,
                   from ../../dcs.h:4,
                   from ../../dcs.c:1:
  ../../wayland.h:9:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory
      9 | #include <xkbcommon/xkbcommon.h>
        |          ^
2021-05-01 22:47:35 +02:00
Daniel Eklöf
7ce767ab87
config: add ‘beam-thickness’ option
* Rename cursor.style value ‘bar’ to ‘beam’. ‘bar’ remains recognized,
  but should eventually be deprecated and then removed.
* Add ‘cursor.beam-thickness’ option, a pt-or-px value specifying the
  thickness of the beam cursor. Defaults to 1.5pt.
* Rename (and export) pt_or_px_as_pixels() to
  term_pt_or_px_as_pixels()
* Change term_pt_or_px_as_pixels() to round point values instead of
  truncating them.
2021-04-30 20:36:16 +02:00
Daniel Eklöf
47c7665bd0
Merge branch 'bsu-esu-logging' 2021-04-26 19:44:07 +02:00
Craig Barnes
9026095a24 dcs: only log debug warnings in bsu() and esu() for unhandled params 2021-04-25 21:04:46 +01:00
Daniel Eklöf
4068e27938
Merge branch 'DECSET-2026'
Closes #459
2021-04-25 20:23:46 +02:00
Craig Barnes
f95d7d4684 csi: add support for DECSET 2026, as an alternative to BSU/ESU sequences
See: https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/2#note_847720
2021-04-25 18:35:46 +01:00
Daniel Eklöf
3131eb0288
Merge branch 'modify-bg-color-when-highlighted-text-has-same-fg-bg'
Closes #455
2021-04-24 13:37:11 +02:00
Daniel Eklöf
886160ba89
render: modify background color for highlighted text when fg == bg
When rendering a selected/highlighted cell where the foreground and
background colors are the same, invert the background color to make
the selected text legible.

Closes #455
2021-04-24 10:43:20 +02:00
Daniel Eklöf
a614c8f7a2
Merge branch 'reveal-concealed-text-when-highlighted' 2021-04-24 10:41:55 +02:00
Daniel Eklöf
1f807c6336
render: do render concealed text when it’s highlighted 2021-04-23 21:27:32 +02:00
Daniel Eklöf
1cb89fef9e
pkgbuild: run ‘ninja test’ in the PGO generate phase
This is needed when fcft/tllist are built as subprojects, since then
we must ensure their unit tests are executed, or we’ll get “profile
count data file not found” errors.
2021-04-22 11:28:04 +02:00
Daniel Eklöf
070f102605
Merge branch 'generate-alt-random-writes-fixes' 2021-04-22 11:27:36 +02:00
Daniel Eklöf
033e1bd6ae
changelog: generate-alt-random-writes.py --sixel fixes 2021-04-22 11:26:59 +02:00
Daniel Eklöf
a9236129f6
generate-alt-random: don’t run TIOCGWINSZ ioctl if --cols and --rows were used 2021-04-22 11:20:55 +02:00
Daniel Eklöf
fbe6d8b4d0
readme: s/if/is 2021-04-22 11:14:47 +02:00
Daniel Eklöf
10e512f14f
generate-alt-random: do ioctl(TIOCGWINSZ) on /dev/tty, not stdout 2021-04-22 11:00:31 +02:00
Daniel Eklöf
44b8bd2364
generate-alt-random: wait for SIGWINCH if width/height is 0
If width/height (that is, the *pixel* values) are 0, that means we are
early (or that foot is slow) - we’ve managed to reach this point
before the foot window has been mapped.

Or rather, before foot has loaded the primary fonts and calculated the
cell geometry. But that, and the initial mapping of the window is
tightly coupled.

To handle this case, detect when width or height is 0, an then wait
for SIGWINCH before trying again.
2021-04-22 10:57:43 +02:00
Daniel Eklöf
da5a3bae3e
generate-alt-random: assert that lines/cols/width/height are > 0 2021-04-22 10:57:27 +02:00
Daniel Eklöf
17bc2f5070
generate-alt-random: use {width,height} + 1 in randrange()
When randomizing the sixel width and height, use width/height + 1 in
the call to randrange(). This ensures the width/height is never 0, and
that the maximum width/height is half the window size, not slightly
less than that.
2021-04-22 10:56:03 +02:00
Daniel Eklöf
4044b6fa99
Merge branch 'releases/1.7' 2021-04-18 20:16:48 +02:00
Daniel Eklöf
0d4e61bbe8
meson/pkgbuild: bump version to 1.7.2 2021-04-18 20:12:40 +02:00
Daniel Eklöf
7e2e9d4de8
changelog: prepare for 1.7.2 2021-04-18 20:12:26 +02:00
Daniel Eklöf
2f8ee9e61d
changelog: add cglogic to ‘contributors’ 2021-04-18 20:12:02 +02:00
Daniel Eklöf
b8f2c3b784
changelog: add cglogic to ‘contributors’ 2021-04-18 20:11:27 +02:00
Daniel Eklöf
1df48fcb33
config: bold-text-in-bright: add ‘palette-based’ as a special value
When ‘bold-text-in-bright’ is set ‘to palette-based’, colors matching
one of the 8 regular palette colors are brightened by using the
corresponding bright palette color.

Other colors, or all colors if ‘bold-text-in-bright’ is set to
‘yes|true’, are brightened by increasing the luminance.
2021-04-18 20:09:10 +02:00
Daniel Eklöf
11e8ff9dc5
render: brighten: use corresponding bright palette color for base 8 colors
When brightening one of the 8 base (“regular”) colors, use the
corresponding bright palette color, instead of increasing the
luminance.

Closes #449
2021-04-18 20:09:07 +02:00
Oleh Hushchenkov
a2251a399c
Fix comment 2021-04-18 20:09:02 +02:00
Oleh Hushchenkov
98db408e1a
term: stop reading on eof 2021-04-18 20:09:01 +02:00
Daniel Eklöf
e85c19d546
term: attributes struct: use ‘bool’ instead of ‘uint32_t’ for 1-bit members 2021-04-18 20:08:58 +02:00
Daniel Eklöf
f62ac3d683
render: no need to blend fully opaque sixel images - just blit them 2021-04-18 20:08:46 +02:00
Daniel Eklöf
8561fdb004
render: don’t let URL jump label sub-surfaces extend outside window geometry
We have no guarantee that sub-surfaces extending outside the window
geometry are rendered correctly (if at all).

For example, both Sway and River will render the window border on top
of the sub-surface.

Future versions of Sway may clip the sub-surface.

Since jump-labels are positioned slightly above, and to the left of
the URLs first character, having a label on either the top row, or on
the first column, will likely position it outside the window. This is
handled by simply setting x/y to 0 (or, to -margin, since the label
coordinate is later offsetted with the window margins).

Second, if the label is very long, it may extend outside the
window. This is very unusual for labels only showing the key, and not
the URL itself, but could happen in this case too, if e.g. the user
has configured double-width key characters.

This is handled by calculating its maximum width, and then truncating
the label.

Although very unlikely, it is possible for a label to also extend
outside the window’s vertical size. This could happen for very small
font sizes, where the label’s own margins are large, relative to the
font size. This case is currently not handled.

Closes #443
2021-04-18 20:08:41 +02:00
Daniel Eklöf
4325d5a4ab
doc: foot.ini: re-phrase the box-drawings-uses-font-glyphs section 2021-04-18 20:08:35 +02:00
Daniel Eklöf
39d65bf083
doc: foot.ini: codespell: antaliasing -> antialiasing 2021-04-18 20:08:32 +02:00
Daniel Eklöf
ce321e663e
config: add box-drawings-uses-font-glyphs=no|yes option
When disabled, we render box drawing characters ourselves. This is the
default.

When enabled, we instead use font glyphs. I.e. no special treatment.

Closes #430
2021-04-18 20:08:30 +02:00
Daniel Eklöf
2efd1016ce
render: draw underline cursor below text underline
This ensures the cursor is visible on cells where the text is
underlined.

Closes #415
2021-04-18 20:08:21 +02:00