aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md (follow)
Commit message (Collapse)AuthorAgeLines
* changelog: prepare for 1.26.0Daniel Eklöf2026-03-03-3/+15
|
* Add support for background blurDaniel Eklöf2026-03-02-0/+6
| | | | | | | | | This patch adds a new config option: colors{,2}.blur=no|yes. When enabled, transparent background are also blurred. Note that this requires the brand new ext-background-effect-v1 protocol, and specifically, that the compositor implements the blur effect.
* Spawning new terminal with --config from parent instanceStéphane Klein2026-03-02-0/+3
| | | | | Reference: https://codeberg.org/dnkl/foot/issues/1622 Signed-off-by: Stéphane Klein <contact@stephane-klein.info>
* support four-sided padding (left/top/right/bottom)pi662026-03-02-0/+2
|
* wayland: wait for pre-apply damage thread before destroying a terminal instanceDaniel Eklöf2026-02-02-0/+3
| | | | | | | | | | | | | | | | It's possible, but unlikely, that we've pushed a "pre-apply damage" job to the renderer thread queue (or that we've pushed it, and the a thread is now working on it) when we shutdown a terminal instance. This is sometimes caught in an assertion in term_destroy(), where we check the queue length is 0. Other times, or in release builds, we might crash in the thread, or in the shutdown logic when freeing the buffer chains associated with the terminal instance. Fix by ensuring there's no pre-apply damage operation queued, or running, before shutting down a terminal instance. Closes #2263
* sixel: force a height of at least one sixel when explicitly resizingDaniel Eklöf2026-01-28-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Applications often prefix the sixel with a raster attributes (RA) sequence, where they tell us how large the sixel is. Strictly speaking, this just tells us the size of the area to clear, but we use it as a hint and pre-allocates the image buffer. It's important to stress that it is valid to emit a MxN RA, and then write sixel data outside of that area. Foot handles this, in _most_ cases. We didn't handle the corner case Mx0. I.e. a width > 0, but height == 0. No image buffer was allocated, and we also failed to detect a resize was necessary when the application started printing sixel data. Much of this is for performance reason; we only check the minimum necessary. For example, we only check if going outside the pre-allocated *column* while printing sixels. *Rows* are checked on a graphical newline. In other words, the *current* row has to be valid when writing sixels. And in case of Mx0, it wasn't. Fix by forcing a height of at least one sixel (typically 6 pixels). Closes #2267
* input: ignore release events after a keyboard shortcut was triggeredDaniel Eklöf2026-01-28-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue with the kitty keyboard protocol, where 'release' events associated with a shortcut was sent to the client application. Example: user triggers "scroll up". We scroll up. No key event(s) are sent to the client application. Then the user releases the keys. we don't do any shortcut handling on release events, and so we continue with the normal input processing. If the kitty keyboard protocol has been enabled (and specifically, release event reporting has been enabled), then we'll emit a 'release' escape sequence. This in itself is wrong, since the client application never saw the corresponding press event. But we _also_ reset the viewport. The effect (in this example), is that it's impossible to scroll up in the scrollback history. Note that we don't ignore _any_ release event, only the release event for the (final) symbol that triggered the shortcut. This should allow e.g. modifier keys release events to be processed normally, if released before the shortcut key. This is somewhat important, since the client application will have received press events for the modifier keys leading up to the shortcut (if modifier press/release events have been enabled in the kitty keyboard protocol - _Report all keys as escape codes_). Closes #2257
* shm: don't bother with xrgb surfaces, always use argbDaniel Eklöf2026-01-04-0/+5
| | | | | | | | | | | | | | | Before this patch, foot used xrgb surfaces for all fully opaque surfaces, and only used argb surfaces for the main window when the user enabled translucency. However, several compositors have damage-like issues when we switch between opaque and non-opaque surfaces (for example, when switching color theme, or when toggling fullscreen). Since the performance benefit of using non-alpha aware surfaces are likely minor (if there's any measurable performance difference at all!), lets workaround these compositor issues by always using argb surfaces.
* builtin terminfo: add custom 'query-os-name'Daniel Eklöf2025-12-20-0/+3
| | | | | | | | | | | | | | Inspired by Kitty's 'kitty-query-os_name'. Notable changes: * Drop kitty prefix * os_name -> os-name * Use "uname -s" without any transformations (e.g. no lower-casing) $ ./utils/xtgettcap query-os-name reply: (44 chars): <ESC>P1+r71756572792d6f732d6e616d65=4C696E7578<ESC>\ query-os-name=Linux Closes #2209
* config: remove deprecated config option cursor.colorDaniel Eklöf2025-12-20-0/+5
| | | | | This option was deprecated in 1.23.0. Use colors-{dark,light}.cursor instead.
* config: add [colors-dark] and [colors-light], replacing [colors] and [colors2]Daniel Eklöf2025-12-20-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reason for having two color sections is to be able to switch between dark and light. Thus, it's better if the section names reflect this, rather than the more generic 'colors' and 'colors2' (which was the dark one and which was the light one, now again?) When the second color section was added, we kept the original name, colors, to make sure we didn't break existing configurations, and third-party themes. However, in the long run, it's probably better to be specific in the section naming, to avoid confusion. So, add 'colors-dark', and 'colors-light'. Keep 'colors' and 'colors2' as aliases for now, but mark them as deprecated. They WILL be removed in a future release. Also rename the option values for initial-color-theme, from 1/2, to dark/light. Keep the old ones for now, marked as deprecated. Update all bundled themes to use the new names. In the light-only themes (i.e. themes that define a single, light, theme), use colors-light, and set initial-color-theme=light. Possible improvements: disable color switching if only one color section has been explicitly configured (todo: figure out how to handle the default color theme values...)
* shm: revert part of 299186a6547f6e038ee6f3822caf9a0fdfabceefDaniel Eklöf2025-12-17-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 299186a6547f6e038ee6f3822caf9a0fdfabceef introduced a regression, where we don't handle SHM buffer "hiccups" correctly. If foot, for some reason is forced to render a frame "too soon", we might end up having multiple buffers "in flight" (i.e. committed to the compositor). This could happen if the compositor pushes multiple configure events rapidly, for example. Or anything else that forces foot to render something "immediately", without waiting for a frame callback. The compositor typically releases both buffers at the same time (or close to it), so the _next_ time we want to render a frame, we have *two* buffers to pick between. The problem here is that after 299186a6547f6e038ee6f3822caf9a0fdfabceef, foot no longer purges the additional buffer(s), but keeps all of them around. This messes up foot's age tracking, and the _next_ time we're forced to pull two buffers (without the compositor releasing the first one in between), we try to apply damage tracking that is no longer valid. This results in visual glitches. This never self-repairs, and we're stuck with visual glitches until the window is resized, and we're forced to allocate completely new buffers. It is unclear why 299186a6547f6e038ee6f3822caf9a0fdfabceef stopped removing the buffers. It was likely done early in the development, and is no longer needed. So far, I haven't noticed any bugs by re-introducing the buffer purging, but further testing is needed.
* term: mouse SGR mode: don't emit negative CSI valuesDaniel Eklöf2025-12-13-0/+3
| | | | | | | | | | | | | | | | | | When reporting the column/row pixel value in mouse SGR mode, we emitted negative values when the cursor was being dragged outside the window. Unfortunately, negative values aren't allowed in CSI parameters, as '-' is an intermediate value. It was done this way, to be consistent with XTerm behavior. Allegedly, XTerm has changed its behavior in patch 404. With that in mind, and seeing that foot has never emitted negative values in any other mouse mode, let's stop emitting negative values in SGR mode too. Closes #2226
* term: reverse-scroll: fix crash when viewport ends up outside the (new) scrollbackDaniel Eklöf2025-12-13-0/+4
| | | | | | | | | | | | | | | | | | | | | | If the viewport has been scrolled up, it is possible for a reverse-scroll (rin) to cause the viewport to point to lines outside the scrollback. This is an issue if the scrollback isn't full, since in that case, the viewport will contain NULL lines. This will potentially trigger assertions in a couple of different places. Example backtrace: #2 0x555555cd230c in bug ../../debug.c:44 #3 0x555555ad485e in grid_row_in_view ../../grid.h:83 #4 0x555555b15a89 in grid_render ../../render.c:3465 #5 0x555555b3b0ab in fdm_hook_refresh_pending_terminals ../../render.c:5165 #6 0x555555a74980 in fdm_poll ../../fdm.c:435 #7 0x555555ac2b85 in main ../../main.c:676 Detect when this happens, and force-move the viewport to ensure it is valid. Closes #2232
* config: add toplevel-tag=TAGDaniel Eklöf2025-11-12-0/+9
| | | | | | | | | | | Add support for the new xdg-toplevel-tag-v1 Wayland protocol, by exposing a new config option, `toplevel-tag`, and a corresponding command option, `--toplevel-tag` (in both `foot` and `footclient`). This can help the compositor with session management, or custom window rules. Closes #2212
* changelog: triple-click when there's a quote in the last columnDaniel Eklöf2025-11-12-0/+2
|
* changelog: case sensitive scrollback search: move to correct releaseDaniel Eklöf2025-11-01-2/+2
|
* csi: focus mode (private mode 1004): send focus event immediate, when enabledDaniel Eklöf2025-11-01-0/+8
| | | | | | | This lets the application now the current state, without having to wait for the user to switch focus. Fixes #2202
* search: do not emit composing keysRonan Pigott2025-11-01-0/+4
| | | | | When we are in the composing state for XCompose key sequences, we should not add the compose component keys to the search buffer.
* search: use case insensitive search only if there's no uppercase in searchc4llv07e2025-10-30-0/+2
|
* changelog: add new 'unreleased' sectionDaniel Eklöf2025-10-16-0/+11
|
* changelog: prepare for 1.25.0Daniel Eklöf2025-10-16-5/+6
|
* wayland: always render a new frame after a fullscreen changeDaniel Eklöf2025-10-15-0/+4
| | | | | | | | | | | This is needed, since we disable alpha in fullscreen, and since we use different image buffer formats (XRGB vs. ARGB) when we have alpha vs. when we don't (and fullscreen always disables alpha). Normally, this happens anyway, as the window is resized when going in or out from fullscreen. But, it's technically possible for a compositor to change an application's fullscreen state without resizing the window.
* extract: number of spaces after the tab shouldn't include the tab cell itselfDaniel Eklöf2025-10-11-0/+3
| | | | | | | | This fixes an off by one, where we sometimes "ate" an extra space when extracting contents with tabs. This happened if the tab (and its subsequent spaces) were followed by an additional space. Closes #2194
* config: add colors.dim-blend-towards=black|whiteDaniel Eklöf2025-10-10-0/+4
| | | | | | | | | | | | Before this patch, we always blended towards black when dimming text. However, with light color themes, it usually looks better if we dim towards white instead. This option allows you to choose which color to blend towards. The default is 'black' in '[colors]', and 'white' in '[colors2]'. Closes #2187
* changelog: updated jump label colors in modus-operandiDaniel Eklöf2025-10-10-0/+2
|
* render: when double-buffering, pre-apply previous frame's damage earlyDaniel Eklöf2025-10-10-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Foot likes it when compositor releases buffer immediately, as that means we only have to re-render the cells that have changed since the last frame. For various reasons, not all compositors do this. In this case, foot is typically forced to switch between two buffers, i.e. double-buffer. In this case, each frame starts with copying over the damage from the previous frame, to the new frame. Then we start rendering the updated cells. Bringing over the previous frame's damage can be slow, if the changed area was large (e.g. when scrolling one or a few lines, or on full screen updates). It's also done single-threaded. Thus it not only slows down frame rendering, but pauses everything else (i.e. input processing). All in all, it reduces performance and increases input latency. But we don't have to wait until it's time to render a frame to copy over the previous frame's damage. We can do that as soon as the compositor has released the buffer (for the frame _before_ the previous frame). And we can do this in a thread. This frees up foot to continue processing input, and reduces frame rendering time since we can now start rendering the modified cells immediately, without first doing a large memcpy(3). In worst case scenarios (or perhaps we should consider them best case scenarios...), I've seen up to a 10x performance increase in frame rendering times (this obviously does *not* include the time it takes to copy over the previous frame's damage, since that doesn't affect neither input processing nor frame rendering). Implemented by adding a callback mechanism to the shm abstraction layer. Use it for the grid buffers, and kick off a thread that copies the previous frame's damage, and resets the buffers age to 0 (so that foot understands it can start render to it immediately when it later needs to render a frame). Since we have certain way of knowing if a compositor releases buffers immediately or not, use a bit of heuristics; if we see 10 consecutive non-immediate releases (that is, we reset the counter as soon as we do see an immediate release), this new "pre-apply damage" logic is enabled. It can be force-disabled with tweak.pre-apply-damage=no. We also need to take care to wait for the thread before resetting the render's "last_buf" pointer (or we'll SEGFAULT in the thread...). We must also ensure we wait for the thread to finish before we start rendering a new frame. Under normal circumstances, the wait time is always 0, the thread has almost always finished long before we need to render the next frame. But it _can_ happen. Closes #2188
* changelog: shm buffer stride alignmentDaniel Eklöf2025-10-05-0/+10
|
* term: osc8: tag *all* cells in a multi-column character as an URIDaniel Eklöf2025-10-04-0/+7
| | | | | | | | | | | | | When we print a character to the grid, we must also update its OSC-8 state if an OSC-8 URI is currently active. For double-width characters, this was only being done for the first cell. This causes the labels in URL mode to be off, as the link was effectively chopped up into multiple pieces. Closes #2179
* changelog: add new 'unreleased' sectionDaniel Eklöf2025-09-12-0/+11
|
* changelog: prepare for 1.24.0Daniel Eklöf2025-09-12-5/+6
|
* meson: utempter del has no argumentDaniel Eklöf2025-09-09-1/+2
| | | | | This fixes an issue where we didn't record a logout record when using the libutempter backend.
* config: add 'uppercase-regex-insert'Ryan Roden-Corrent2025-08-31-0/+7
| | | | | | | | | | This makes the "uppercase hint character inserts selected text" behavior added in #1975 configurable, as it can have unexpected behavior for some users. It defaults to "on", preserving the new behavior of `foot`, after Fixes #2159.
* config: value_to_*(): don't overwrite result variable on errorDaniel Eklöf2025-08-25-1/+6
| | | | | | | | | | | Some of the value_to_*() functions wrote directly to the output variable, even when the value was invalid. This often resulted in the an actual configuration option (i.e. a member in the config struct) to be overwritten by an invalid value. For example, -o initial-color-theme=0 would set conf->initial_color_theme to -1, resulting in a crash later, when initializing a terminal instance.
* server/client: add support for sending SIGUSR to footclientDaniel Eklöf2025-08-01-0/+4
| | | | | | | | | | | This patch adds the IPC infrastructure necessary to propagate SIGUSR1/SIGUSR2 from a footclient process to the server process. By targeting a particular footclient instance, only that particular instance changes theme. This is different from when targeting the server process, where all instances change theme. Closes #2156
* changelog: SIGUSR changes in the serverDaniel Eklöf2025-07-30-0/+3
|
* url-mode: for some reason we sorted the label letters before assigning themDaniel Eklöf2025-07-29-0/+5
| | | | | | | Don't do this. Now that we **don't** sort them, the first letter chosen by the user is always assigned to the bottom most URL. Closes #2140 (again)
* changelog: add new 'unreleased' sectionDaniel Eklöf2025-07-23-0/+11
|
* changelog: prepare for 1.23.1Daniel Eklöf2025-07-23-9/+3
|
* osc: color reset: read default color from currently active themeDaniel Eklöf2025-07-22-0/+2
|
* shm: don't set pixman_fmt_without_alpha twiceDaniel Eklöf2025-07-21-0/+4
| | | | | | | | When selecting 16-bit surfaces, we set pixman_fmt_without_alpha twice, and never set pixman_fmt_with_alpha. This caused 10-bit surfaces to be used instead, since it checks if pixman_fmt_with_alpha has been overridden or not.
* main: SIGUSR1 selects the first color theme, SIGUSR2 the secondDaniel Eklöf2025-07-18-0/+4
| | | | | | | | | | Before this patch, SIGUSR1 toggled between [colors] and [colors2]. Now, SIGUSR1 changes to [colors], regardless of what the current color theme is, and SIGUSR2 changes to [colors2]. Closes #2144
* url-mode: assign label keys in reverse orderDaniel Eklöf2025-07-17-0/+8
| | | | | | | The _last_ URL is often the one you are interested in, and with this change, it is always assigned the first (and thus the same) key. Closes #2140
* changelog: add new 'unreleased' sectionDaniel Eklöf2025-07-16-0/+11
|
* changelog: prepare for 1.23.0Daniel Eklöf2025-07-16-3/+8
|
* csi: add '52' to the DA reply, to indicate PSC-52 supportDaniel Eklöf2025-06-10-0/+3
| | | | | | Note: only *copy* is required to be enabled in security.osc52; paste is optional, see https://github.com/contour-terminal/contour/issues/1761#issuecomment-2944492097
* osc: 52: clear selection if the payload is the empty stringDaniel Eklöf2025-06-10-0/+1
|
* main: do a theme toggle upon receiving SIGUSR1Daniel Eklöf2025-06-10-0/+2
| | | | Caveat: in server mode, *all* instances toggle their themes.
* quirks: remove subsurface unmap quirk for SwayDaniel Eklöf2025-06-09-0/+5
| | | | | | | | Sway used to have an issue where unmapping a subsurface did not damage the surface below (https://github.com/swaywm/sway/issues/6960). This has been fixed for quite some time now, so let's remove the quirk.
* conf: pad: add center-when-fullscreen and center-when-maximized-and-fullscreenDaniel Eklöf2025-05-24-0/+4
| | | | | | | | | | | | | | | | | | | | Before this patch, the grid content was *always* centered when the window was maximized or fullscreened, regardless of how the user had configured padding. Now, the behavior is controlled by the 'pad' option. Before this patch, the syntax was pad MxN [center] Now it is pad MxN [center|center-when-fullscreen|center-when-maximized-and-fullscreen] The default is "pad 0x0 center-when-maximized-and-fullscreen", to match current behavior. Closes #2111
* cursor-shape: add 'dnd-ask' and 'all-resize'Daniel Eklöf2025-05-22-0/+1
| | | | | | | | | | | | | | | | | | | | These (non-css) cursor shapes were added to the cursor-shape-v1 protocol in wayland-protocols 1.42. We don't need (or use them at all) internally, but add them to the list we use to translate from shape names to shape enums. This allows users to set a custom shape (via OSC-22), while still using server side cursors (i.e. no need to fallback to client-side cursors). If we try to set a shape not implemented by the server, we get a protocol error and foot exits. This is bad. So, make sure we don't do that: 1. First, we need to explicitly bind v2 if implemented by the server 2. Track the bound version number in the wayland struct 3. When matching shape enum, skip shapes not supported in the currently bound version of the cursor-shape protocol
* wayland: configure: don't commit if we have a pending refreshDaniel Eklöf2025-05-21-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, if the following occurs: 1. foot has AxB size 2. Compositor sends CxD size 3. foot detects a resize, acks and saves CxD, but doesn't redraw immediately 4. Compositor sends CxD size again (due to a toplevel state array change, for example) Then foot will detect no resize occurred, and will do an "empty" commit immediately. In this particular case that's wrong, since we're effectively acking+committing the initial AxB size. Fix by only doing the immediate commit if there's no size change **and** there's no pending refresh. Note: normally, we'd resize and refresh+commit immediately, but if we're waiting for a frame callback, then the refresh+commit will be delayed (i.e. scheduled). This is what we're checking here. Closes #2105
* libxkbcommon: don't require 1.8.0Daniel Eklöf2025-05-18-0/+3
| | | | | | | | | | The version bump was done since we now use XKB_VMOD_NAME_*; macros added in libxkbcommon 1.8.0. Not all distros have updated libxkbcommon yet (read: Debian). Since it's fairly easy to work around, let's do that. Closes #2103
* csi: when REP:ing a "combining" character, use correct widthDaniel Eklöf2025-05-16-0/+4
| | | | | | | | | | Before this patch, we just called c32width(), which only works on actual codepoints. If the last printed character is a "combining" character, i.e. a key into our lookup table for multi-codepoint graphemes, we need to lookup the grapheme and pick the width from there. See https://gitlab.com/AutumnMeowMeow/jexer/-/issues/119#note_2499712901
* render: refactor to allow setting only selection bg or fgDaniel Eklöf2025-05-05-0/+4
| | | | | | | | | | | | Before this, we only applied custom selection colors, if *both* the selection bg and fg had been set. Since the options are already split up into two separate options, and since it makes sense to at least be able to keep the foreground colors unchanged (i.e. only setting the selection background), let's allow only having one of the selection colors set. Closes #1846
* config: tweak.surface-bit-depth: add support for 16-bit surfacesDaniel Eklöf2025-05-03-0/+5
| | | | | | | | | This adds supports for 16-bit surfaces, using the new PIXMAN_a16b16g16r16 buffer format. This maps to WL_SHM_FORMAT_ABGR16161616 (little-endian). Use the new 16-bit surfaces by default, when gamma-correct-blending=yes.
* osc: restore configured alpha if OSC-11 has no alpha valueDaniel Eklöf2025-05-02-0/+3
| | | | | | When parsing an OSC-11 without an alpha value (i.e. standard OSC-11, not rxvt's extended variant), restore the alpha value from the configuration, rather than keeping whatever the current alpha is.
* Paste URL/regex selection to prompt if key is uppercase.Ryan Roden-Corrent2025-05-01-0/+3
| | | | | | | | | | | | | | | | In copy-regex/show-urls-copy mode, if the last input character was uppercase, copy the selection to the clipboard _and_ paste it. This is useful for taking a file path from a command output:(log, git, test failure, etc.) and using it in another command. This is inspired by the behavior of copy mode in wezterm: https://wezterm.org/quickselect.html I could have made it check every character in the hint, but it seemed fine to assume that if the last character was uppercase, the user wanted this behavior. Closes #1975.
* Merge branch 'releases/1.22'Daniel Eklöf2025-05-01-9/+21
|\
| * changelog: prepare for 1.22.3Daniel Eklöf2025-05-01-8/+3
| |
| * config: tweak.surface-bit-depth now defaults to 'auto'Daniel Eklöf2025-05-01-0/+13
| | | | | | | | | | | | | | | | | | | | | | When set to 'auto', use 10-bit surfaces if gamma-correct blending is enabled, and 8-bit surfaces otherwise. Note that we may still fallback to 8-bit surfaces (without disabling gamma-correct blending) if the compositor does not support 10-bit surfaces. Closes #2082
| * config: gamma-correct-blending: disable by defaultDaniel Eklöf2025-05-01-0/+4
| |
| * changelog: add new 'unreleased' sectionDaniel Eklöf2025-05-01-0/+11
| |
* | config: tweak.surface-bit-depth now defaults to 'auto'Daniel Eklöf2025-05-01-0/+10
| | | | | | | | | | | | | | | | | | | | | | When set to 'auto', use 10-bit surfaces if gamma-correct blending is enabled, and 8-bit surfaces otherwise. Note that we may still fallback to 8-bit surfaces (without disabling gamma-correct blending) if the compositor does not support 10-bit surfaces. Closes #2082
* | config: gamma-correct-blending: disable by defaultDaniel Eklöf2025-05-01-0/+1
| |
* | Merge branch 'releases/1.22'Daniel Eklöf2025-04-30-7/+15
|\|
| * changelog: prepare 1.22.2Daniel Eklöf2025-04-30-9/+3
| |
| * scripts: srgb: use 2.2 gamma TF instead of piece-wise sRGB TFDaniel Eklöf2025-04-30-0/+15
| |
| * changelog: add new 'unreleased' sectionDaniel Eklöf2025-04-30-0/+11
| |
* | scripts: srgb: use 2.2 gamma TF instead of piece-wise sRGB TFDaniel Eklöf2025-04-28-0/+12
| |
* | changelog: mention the new combined dark/light theme filesDaniel Eklöf2025-04-26-0/+7
| |
* | config: add initial-color-theme=1|2Daniel Eklöf2025-04-26-0/+2
| | | | | | | | | | | | | | | | This option selects which color theme to use by default. I.e. at startup, and after a reset. This is useful with combined theme files, where a single file defines e.g. both a dark and light version of the theme.
* | csi: implement private mode 2031 (dark/light mode detection)Daniel Eklöf2025-04-26-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Recognize 'CSI ? 996 n', and respond with - 'CSI ? 997 ; 1 n' if the primary theme is active - 'CSI ? 997 ; 2 n' if the alternative theme is actice * Implement private mode 2031, where changing the color theme (currently only possible via key bindings) causes the terminal to send the same CSI sequences as above. In this context, foot's primary theme is considered dark, and the alternative theme light (since the default theme is dark). Closes #2025
* | key-bindings: add bindings to switch between color themesDaniel Eklöf2025-04-26-0/+10
| | | | | | | | | | | | * color-theme-switch-1: select the primary color theme * color-theme-switch-2: select the alternative color theme * color-theme-toggle: toggle between the primary and alternative color themes
* | config: move cursor.color to colors.cursorDaniel Eklöf2025-04-26-0/+8
| |
* | changelog: add new 'unreleased' sectionDaniel Eklöf2025-04-26-0/+11
|/
* changelog: prepare for 1.22.1Daniel Eklöf2025-04-26-7/+6
|
* changelog: add missing bug refDaniel Eklöf2025-04-26-0/+1
|
* render: regression: alpha applied to inversed text/selectionsDaniel Eklöf2025-04-25-0/+2
| | | | | | Introduced by 5f83278afd0530c323d4192e1095b3d1dea644c9 Closes #2073
* changelog: zero-width grapheme breaking codepoints causing fallback font to be usedDaniel Eklöf2025-04-24-0/+4
|
* Revert "term: append zero-width grapheme breaking characters to previous cell"Daniel Eklöf2025-04-24-2/+2
| | | | This reverts commit 76503fb86a8b8a6b5c3ce1be87c15a55af38508d.
* Revert "term: ignore LTR+RTL markers (U+200E + U+200F)"Daniel Eklöf2025-04-24-9/+0
| | | | This reverts commit 70b324b24c86473a99528feb6f1f91ca70e11a02.
* term: ignore LTR+RTL markers (U+200E + U+200F)Daniel Eklöf2025-04-24-0/+9
| | | | | | | | | Foot doesn't implement RTL, and explicit LTR markers is neither needed, nor used in anyway. In fact, they cause issues with font lookup, as fcft often fails to find the marker codepoint in the primary font, causing a fallback font to be used instead. Closes #2049
* input: reset modifiers in keyboard_leave()Daniel Eklöf2025-04-19-0/+3
| | | | Closes #2034
* csi: don't allow client app to enable grapheme-shaping when disabled at compile-timeDaniel Eklöf2025-04-19-0/+5
| | | | Closes #2039
* render: fix colors.alpha-mode=matchingDaniel Eklöf2025-04-19-0/+4
| | | | | | Before this patch, it only matched RGB color sources. It did not match the default bg color, or indexed colors. That is, e.g. CSI 43m didn't apply alpha, even if the color3 matched the default background color.
* changelog: add new 'unreleased' sectionDaniel Eklöf2025-04-17-0/+11
|
* changelog: prepare for 1.22.0Daniel Eklöf2025-04-17-5/+11
|
* changelog: move 'alpha-mode' to next-releaseDaniel Eklöf2025-04-14-3/+5
|
* config: add alpha_mode optionFazzi2025-04-14-0/+3
|
* url-mode: fix double-width characters not being handled correctlyDaniel Eklöf2025-04-13-0/+3
| | | | | | | | | When a regex matches a string containing double-width characters, the CELL_SPACER values were included in the URL string. This meant the final URL (either launched, or copied) weren't handled correctly, as invalid UTF-8 sequences were inserted in the middle of the string. Closes #2027
* changelog: move vmod support in config from "changed" to "added"Daniel Eklöf2025-04-10-4/+4
|
* wayland+input: add support for toplevel edge constraintsDaniel Eklöf2025-04-07-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Edge constraints are new (not yet available in a wayland-protocols release) toplevel states, acting as a complement to the existing tiled states. Tiled tells us we shouldn't draw shadows etc *outside our window geometry*. Constrained tells us the window cannot be resized in the constrained direction. This patch does a couple of things: * Recognize the new states when debug logging * Change is_top_left() etc to look at the new constrained state instead of the tiled state. These functions are used when both choosing cursor shape, and when determining if/how to resize a window on a CSD edge click-and-drag. * Update cursor shape selection to use the default (left_ptr) shape when on a constrained edge (or corner). * Update CSD resize triggering, to not trigger a resize when attempted on a constrained edge (or corner). See https://gitlab.freedesktop.org/wayland/wayland-protocols/-/commit/86750c99ed062c306e837f11bb9492df572ad677: An edge constraint is an complementery state to the tiled state, meaning that it's not only tiled, but constrained in a way that it can't resize in that direction. This typically means that the constrained edge is tiled against a monitor edge. An example configuration is two windows tiled next to each other on a single monitor. Together they cover the whole work area. The left window would have the following tiled and edge constraint state: [ tiled_top, tiled_right, tiled_bottom, tiled_left, constrained_top, constrained_bottom, constrained_left ] while the right window would have the following: [ tiled_top, tiled_right, tiled_bottom, tiled_left, constrained_top, constrained_bottom, constrained_right ] This aims to replace and deprecate the `gtk_surface1.configure_edges` event and the `gtk_surface1.edge_constraint` enum.
* config: update default URL regexDaniel Eklöf2025-04-07-0/+5
| | | | | | | | | | | | | | | | | | | The old one is in some cases too liberal. The new one is stricter in two ways: 1. The protocol list is now explicit, rather than matching anything:// 2. Allowed characters are now limited to the "safe character set", the "reserved character set", and some from the "unsafe character set" Furthermore, some of the characters are restricted in how/when they are allowed: 1. Periods, commas, question marks etc are allowed inside an URL, but not at the end. 2. [ ], ( ), " " and ' ' are allowed but only when balanced. This allows us to match e.g. [http://foo.bar/foo[bar]] correctly. Closes #2016
* changelog: reword, and remove section that no longer appliesDaniel Eklöf2025-03-31-7/+2
|
* key-binding: recognize virtual modifiers, and translate to the corresponding real modifier.Daniel Eklöf2025-03-31-2/+7
|
* input: xkb: ignore virtual modifiersDaniel Eklöf2025-03-31-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Some compositors (mutter/GNOME is one) adds _virtual_ modifiers to the set of active modifiers when e.g. Alt, Meta, Super or Hyper is pressed. For example, pressing Alt+b would result in *both* the Alt *and* the Mod1 modifier being set. Since foot makes close to zero assumptions on how the modifiers should be interpreted, this causes various breakages. For example, a foot shortcut defined as Mod1+b will not match, since the Alt modifiers is also set. This has forced users to redefine/override some of the default key bindings to include the additional modifiers. It also causes issues with the kitty keyboard protocol, for some key combinations. Mainly whether or not to use unshifted key or not, resulting in incorrect escape sequences. Since all the "real" modifiers are always set as well, we can safely ignore the virtual modifiers. Closes #2009
* grid: reflow: fix empty line coalescingDaniel Eklöf2025-03-29-0/+3
| | | | | | | If a range of empty lines ended with a non-empty line at the very bottom of the to-be-resized grid, all those empty lines were removed. Closes #2011
* meson: add foot (render.c) -> srgb.h depAlex Xu (Hello71)2025-03-26-0/+1
| | | | | | | otherwise, depending on ninja dependency resolution order and parallel build, srgb.h may not be built in time Fixes: ccf625b991 ("render: gamma-correct blending")
* render: dim and brighten using linear rgb interpolationSam McCall2025-03-23-0/+6
| | | | | | Adds setting tweak.dim-amount, similar to bold-text-in-bright-amount. Closes #2006