Commit graph

6448 commits

Author SHA1 Message Date
Daniel Eklöf
9b1c31ebcb
meson: bump version to 1.20.0 2025-01-01 09:21:51 +01:00
Daniel Eklöf
ded55b7276
changelog: prepare for 1.20.0 2025-01-01 09:21:26 +01:00
Daniel Eklöf
e851d44ac9
kitty kbd: don't generate release events for plain Enter+Tab+Backspace
From the specification:

    The Enter, Tab and Backspace keys will not have release events
    unless Report all keys as escape codes is also set, so that the
    user can still type reset at a shell prompt when a program that
    sets this mode ends without resetting it.

Closes #1892
2025-01-01 08:06:52 +01:00
Daniel Eklöf
e38ec79be1
osc: add option to disable OSC-52, partially or fully
Closes #1867
2024-12-22 07:16:12 +01:00
Daniel Eklöf
67bd5dd460
selection: fix crash when tripple clicking in a region containing NUL characters
If a cell contains a NUL character, it was incorrectly treated as a
quote, later triggering an assertion.

Patch by Johannes Altmanninger
2024-12-22 07:09:37 +01:00
Daniel Eklöf
3b0c2a3543
misc: add missing include stdlib.h (for free())
Closes #1887
2024-12-20 15:22:14 +01:00
Daniel Eklöf
d523e7a676
term: set_app_id() + set_window_title(): only allow printable characters 2024-12-17 11:01:17 +01:00
Daniel Eklöf
9a1b59adae
box-drawings: implement octants 2024-12-08 12:55:57 +01:00
heather7283
768f254286 pgo: prefer full-headless-sway over full-headless-cage 2024-12-08 14:02:11 +04:00
cy
5034209087
quit should be in key-bindings 2024-12-08 09:16:15 +01:00
Denis Zharikov
ca13c7b4f5
Update rose-pine, add theme variants 2024-12-08 09:15:19 +01:00
heather7283
7e88e0bfdc
pgo: explicitly set LLVM_PROFILE_FILE envvar
When building foot with pgo under gentoo's portage, LLVM tried to
generate profile data files directly under system root, triggering
sandbox violation and causing build to fail. Setting this envvar fixes
the issue by explicitly specifying profiling data location.

Reference: https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation
2024-12-08 09:10:43 +01:00
heather7283
de305a7e58
pgo: run sway with --unsupported-gpu flag
Sway refuses to run if it detects an nvidia GPU on the system,
causing pgo build to fail. Adding --unsupported-gpu flag disables
this behaviour.
2024-12-08 09:10:43 +01:00
Daniel Eklöf
256749c6d0
term: get_font_dpi(): remove invalid assertion
Closes #1874
2024-11-24 08:01:31 +01:00
Daniel Eklöf
b43f19cb50
vt: don't call fcft_precompose() if font is NULL
This fixes a crash when doing a partial PGO build (where we don't have
any fonts available).
2024-11-02 20:11:14 +01:00
Daniel Eklöf
d3cd4ad933
char32: use utf8proc_charwidth() instead of wcwidth(), when available
It appears to be slightly more up-to-date with recent Unicode
versions.

In particular, it handles the new "Symbols for Legacy Computing
Supplement" block, introduced in Unicode 16.

Closes #1865
2024-11-02 15:12:39 +01:00
Daniel Eklöf
f3e443ea47
osc: 9: ignore ConEmu/Windows Terminal sequences
OSC-9 sequences starting with "<number>;" are now ignored, as they are
ConEmu sequences, and not iTerm notifications.
2024-11-02 08:33:03 +01:00
Daniel Eklöf
ab3af2af37
unicode: update data files to 16.0
Yup, there's no _actual_ changes 🤷
2024-10-31 07:26:07 +01:00
Daniel Eklöf
4aae5222fe
changelog: osc-9/777 crash when body is empty 2024-10-31 07:03:12 +01:00
Jack Wilsdon
689549bb1f
osc: notify: fix crash with no message
Closes #1866
2024-10-31 07:03:04 +01:00
Mark Stosberg
813b514f63
docs: document more default bindings in search scrollback mode.
These were introduced by #1496 but not fully documented then.
2024-10-25 08:58:40 -04:00
Daniel Eklöf
8edf273f6e
changelog: add new 'unreleased' section 2024-10-23 13:55:10 +02:00
Daniel Eklöf
e1469ed057
Merge branch 'releases/1.19' 2024-10-23 13:54:49 +02:00
Daniel Eklöf
cb91fbb4b6
meson: bump version to 1.19.0 2024-10-23 13:51:15 +02:00
Daniel Eklöf
6d11e93e2f
changelog: prepare for 1.19.0 2024-10-23 13:50:54 +02:00
Daniel Eklöf
d68da27a7f
uri: skip query/fragment parsing when dealing with file:// URIs
Also, ignore invalid query/fragments (i.e. if the fragment comes
before the query).

Closes #1840
2024-10-23 08:47:21 +02:00
Daniel Eklöf
996e5fa630
Revert "url-mode: don't strip the file:// prefix from localhost URIs"
This reverts commit 54722369d8.
2024-10-23 08:46:30 +02:00
Daniel Eklöf
511aad419b
config: add color.sixelN options
These options allows you to configure the default sixel color palette.
2024-10-23 08:35:30 +02:00
Daniel Eklöf
e891abdd6a
render: remove unnecessary call to wl_surface_damage_buffer()
The damage region(s) are translated to wl_surface_damage_buffer()
calls after the entire frame has been rendered.
2024-10-06 11:26:35 +02:00
Daniel Eklöf
ce38f5b413
render: sixels: update damage region when rendering sixels
This fixes flickering when foot is forced to double-buffer (e.g when
running under KDE, or smithay based compositors).

Since the damage region isn't updated, the sixel images aren't
included in the memcpy that is done to transfer the last frame's
updated regions to the next frame.

As a result, every other frame will have the sixels, while the others
don't.

Closes #1851
2024-10-05 08:55:48 +02:00
Daniel Eklöf
4afb94687c
changelog: #1715: "ghost" lines when selecting text 2024-09-21 09:17:38 +02:00
Daniel Eklöf
6ad84dab2d
render: do dirty/clean consistency check before rendering sixels
Since the sixels may render some of the cells, we want the check to
happen before the sixels.
2024-09-21 09:11:28 +02:00
Daniel Eklöf
49ed8b5e21
selection: set row->dirty when clearing the cell->attrs.clean bit
Closes #1715
2024-09-21 09:11:07 +02:00
Daniel Eklöf
798b44934f
render: double-buffer: optimization: skip clean rows
When scanning the grid for all-dirty rows (that we can remove from the
damage region we're about to memcpy from the old frame), check the
row->dirty bit, and skip scanning the cells of that row altogether.

We're only looking for rows where all cells are dirty - those rows can
be removed from the region we copy from the old frame, since the
entire row will be re-rendered anyway.

If a row is clean, it *must* be copied from the old frame.
2024-09-21 09:11:07 +02:00
Daniel Eklöf
a9fefcf58b
render: (debug): assert row->dirty vs. cell->attrs.clean consistency 2024-09-21 09:11:07 +02:00
Daniel Eklöf
046d959657
shm: fix compilation when FORCED_DOUBLE_BUFFERING is enabled 2024-09-21 09:11:07 +02:00
Daniel Eklöf
e2aeb7f336
render: xcursor_is_valid(): don't crash when there's no theme loaded
When trying to set a custom cursor shape, we first validate it. This
is done by checking against known server-side names, and then trying
to load the cursor from the client side cursor theme.

But, if we're using server side names, there is no theme loaded, and
foot crashed.

Fix by checking if we have a theme loaded, and if not, fail the cursor
shape name validation.
2024-09-21 09:10:48 +02:00
Daniel Eklöf
297cb370aa
render: add missing include, limits.h 2024-09-15 09:56:41 +02:00
Daniel Eklöf
33f3818520
Merge branch 'toplevel-icon' 2024-09-13 09:20:50 +02:00
Daniel Eklöf
76b58b5663
changelog: remove escape sequences we've reverted 2024-09-13 09:04:18 +02:00
Daniel Eklöf
9151685d04
csi: revert implementation of CSI 20 t 2024-09-13 09:04:18 +02:00
Daniel Eklöf
7984f08925
osc: OSC-1 does not set the icon, it sets the icon _label_
In fact, there appears there *is* no escape sequence to set the icon.

Keep most of the logic in place, but in practice, we'll always set the
icon to the app-id. That is, at startup, we set it to the configured
app-id (either from config, or the command line).

OSC-176, which sets the app-id, also updates the icon (to the app-id).
2024-09-13 09:04:18 +02:00
Daniel Eklöf
c6208a98c8
main: include toplevel-icon support in --version output 2024-09-13 09:04:18 +02:00
Daniel Eklöf
f5caa2d265
pgo: add missing stub for render_refresh_icon() 2024-09-13 09:04:18 +02:00
Daniel Eklöf
97ec375c67
toplevel-icon: implement OSC-1, CSI 20/21/22/23 t
* The toplevel icon is now set to the app-id, unless "overridden" by
  OSC-1 or OSC-0.
* Implemented OSC-1
* OSC-0 extended to also set the icon
* Implemented CSI 20 t - report window icon
* Implemented CSI 21 t - report window title
* Implemented CSI 22 ; 1 t - push window icon
* Implemented CS 23 ; 1 t - pop window icon
* Extended CSI 22/23 ; 0 t to also push/pop the icon
* Verify app-id set by OSC-176 is valid UTF-8
* Verify icon set by OSC-0/1 is valid UTF-8
2024-09-13 09:04:17 +02:00
Daniel Eklöf
3f8a1fc85b
changelog: xdg-toplevel-icon-v1 2024-09-13 09:04:17 +02:00
Daniel Eklöf
b34137dde3
toplevel-icon: set to app-id, instead of hardcoding to "foot"
And, special case "footclient", and map it to "foot".
2024-09-13 09:04:17 +02:00
Daniel Eklöf
0cb07027f2
wayland: set toplevel icon
If the xdg-toplevel-icon-v1 protocol is available, and we have the
corresponding manager global, set the toplevel icon to "foot".

Note: we do *not* provide any pixel data. This is by design; we want
to keep things simple.

To be able to provide pixel data, we would have to either:

* embed the raw pixel data in the foot binary
* link against either libpng or/and e.g. nanosvg, locate, at run-time,
  the paths to our own icons, and load them at run-time.
* link against either libpng or/and e.g. nanosvg, and, at run-time, do
  a full icon lookup. This would also require us to add a config option
  for which icon theme to use.

Of the two, I would prefer the first option. But, let's skip this
completely for now.

By providing the icon as a name, the compositor will have to lookup
the icon itself. Compositors supporting icons is likely to already
support this.

So what do we gain by implementing this protocol? Compositors no
longer has to parse .desktop files and map our app-id to find the icon
to use.

There's one question remaining. With this patch, the icon name is
hardcoded to "foot", just like our .desktop files. But, perhaps we
should use the app-id instead? And if so, should we also change the
icon when the app-id changes?

My gut feeling is, yes, we should use the app-id instead, and yes, we
should update the icon when the app-id is changed at run-time.
2024-09-13 09:04:17 +02:00
Daniel Eklöf
28a1c67dd5
wayland: bind the xdg-toplevel-icon manager global 2024-09-13 09:04:17 +02:00
Daniel Eklöf
5ef69fc591
meson: detect wayland-protocols >= 1.37, and conditionally enable xdg-toplevel-icon-v1 2024-09-13 09:04:17 +02:00