aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* | fix typo in READMEtunjan2024-04-05-1/+1
| |
* | changelog: add new 'unreleased' sectionDaniel Eklöf2024-04-02-0/+11
| |
* | Merge branch 'releases/1.17'Daniel Eklöf2024-04-02-6/+21
|\|
| * meson: bump version to 1.17.01.17.0Daniel Eklöf2024-04-02-1/+1
| |
| * changelog: prepare for 1.17.0Daniel Eklöf2024-04-02-5/+20
|/
* changelog: move DECRQM for private mode 67 from "added" to "changed"Daniel Eklöf2024-04-01-2/+2
|
* themes: add neon themeMatheus Afonso Martins Moreira2024-03-31-0/+27
| | | | | Add a neon theme file for foot, originally from xcolors.net/neon and also available at terminal.love.
* terminfo: tighten up the rv/xr regular expressionsDaniel Eklöf2024-03-29-2/+4
|
* terminfo: add 'nel' capabilityDaniel Eklöf2024-03-29-0/+2
|
* terminfo: add fe/fd (focus enable/disable)Daniel Eklöf2024-03-29-1/+8
| | | | | | These are new capabilities, recently added to ncurses. Applications are supposed to use these, instead of XM (to enable focus events). So, remove "CSI ? 1004h" from XM.
* sixel: abuse wmemset() when initializing a freshly allocated image bufferDaniel Eklöf2024-03-25-36/+76
| | | | | | | | wmemset() is heavily optimized, and in some cases, *much* faster than manually initializing the new image pixels. Furthermore, assume calloc() is better at initializing memory to zero, and use that when initializing new pixels in a transparent image.
* scripts: generate-alt-random: generate both opaque and transparent sixelsDaniel Eklöf2024-03-25-2/+3
|
* sixel: fix cursor positioning when image is split up into severalDaniel Eklöf2024-03-18-1/+6
|
* sixel: hopefully handle image height correctly when trimmingDaniel Eklöf2024-03-18-4/+16
| | | | | | | | | | | When trimming trailing empty rows from the final image, handle the RA region correctly: * If image is transparent, trim down to the last non-empty pixel row, regardless of whether it is inside or outside the RA region. * If image is opaque, trim down to either the last non-empty pixel row, or the RA region, whatever is the largest height.
* sixel: RA region does not affect the text cursor positionDaniel Eklöf2024-03-18-2/+85
| | | | | | | | | | | | | | | | | | | | | | | The raster attributes is, really, just a way to erase an area. And, if the sixel is transparent, it's a nop. The final text cursor position depends, not on our image size (which is based on RA), but on the final graphical cursor position. However, we do want to continue using it as a hint of the final image size, to be able to pre-allocate the backing buffer. So, here's what we do: * When trimming trailing transparent rows, only trim the *image*, if the graphical cursor is positioned on the last sixel row, *and* the sixel is transparent. * Opaque sixels aren't trimmed at all, since RA in this acts as an erase that fills the RA region with the background color. * The graphical cursor position is always adjusted (i.e. trimmed), since it affects the text cursor position. * The text cursor position is now calculated from the graphical cursor position, instead of the image height.
* sixel: trim trailing, fully transparent sixel rowsDaniel Eklöf2024-03-18-11/+41
| | | | See https://github.com/hpjansson/chafa/issues/192
* sixel: place cursor on the last character row touched by the sixelDaniel Eklöf2024-03-18-12/+8
| | | | | | | | | | | | | | | | After emitting a sixel, place the cursor on the character row touched by the last sixel. The last sixel _may_ not be a multiple of 6 pixels, *if* the sixel had an explicit width/height set via raster attributes. This is an intended deviation from the DEC cursor placement algorithm, where the cursor is placed on the character row touched by the last sixel's *upper* pixel. The adjusted algorithm implemented here makes it much easier for applications to handle text-after-sixels, since they can now simply assume a single text newline is required to move the cursor to a character row not touched by the sixel.
* base64: simplify lookup table initializerCraig Barnes2024-03-17-6/+3
|
* xmalloc: add xmemdup() and use to replace some uses of xmalloc+memcpyCraig Barnes2024-03-17-18/+14
|
* main/config: replace some uses of xasprintf() with xstrjoin()Craig Barnes2024-03-16-8/+8
|
* wayland: skip loading cursor theme when using server side cursorsDaniel Eklöf2024-03-16-1/+6
| | | | | We don't need the client side cursor theme when using server side cursors.
* csi: indicate "permanently reset" for DECRQM queries of mode 67 (DECBKM)Craig Barnes2024-03-16-4/+14
| | | | | This allows dynamic querying for the equivalent of terminfo's "kbs" capability.
* sixel: disable debug loggingDaniel Eklöf2024-03-16-1/+1
|
* sixel: initialize the color table to colors used by the VT340Daniel Eklöf2024-03-15-3/+40
|
* completions: fish: fix path completion for --ptyDaniel Eklöf2024-03-14-1/+1
|
* Add support for opening an existing PTYAlyssa Ross2024-03-14-32/+76
| | | | | | | | | | | | | | | | | Virtual machine monitor programs (e.g. QEMU, Cloud Hypervisor) expose guest consoles as PTYs. With this patch, foot can access these guest consoles. Usually, the program used for accessing these PTYs is screen, but screen is barely developed, doesn't support resizing, and has a bunch of other unrelated stuff going on. It would be nice to have a terminal emulator that properly supported opening an existing PTY. The VMM controls the master end of the PTY, so to the other end (in this case foot), it just behaves like any application running in a directly-opened PTY, and all that's needed is to change foot's code to support opening an existing PTY rather than creating one. Co-authored-by: tanto <tanto@ccc.ac>
* csi: the CSI-t family of queries now report unscaled pixel valuesDaniel Eklöf2024-03-14-9/+9
| | | | | | | | | | | Before this patch, we reported scaled pixel values. This was rather useless, since applications have no way of getting the scaling factor, to "scale up" e.g. images. Furthermore, the most common use of these queries are probably to calculate the dimensions to use when emitting sixels. Closes #1643
* Merge branch 'rectangular-edit'Daniel Eklöf2024-03-14-13/+320
|\ | | | | | | Closes #1633
| * csi: params_to_rectangular_area(): ensure left/right is within boundsDaniel Eklöf2024-03-10-2/+3
| |
| * changelog: rectangular functions: add bug refDaniel Eklöf2024-03-07-1/+2
| |
| * changeloge: move DECERA to the 'unreleased' sectionDaniel Eklöf2024-03-07-4/+3
| |
| * doc: ctlseq: DECCARA, DECRARA, DECCRA, DECFRA and DECERADaniel Eklöf2024-03-07-0/+25
| |
| * term_fill(): no need to set attrs.clean = 0Daniel Eklöf2024-03-07-2/+0
| | | | | | | | The VT state’s attribute is always 0
| * csi: DECCARA+DECRARA: dirty cellsDaniel Eklöf2024-03-07-0/+4
| |
| * foot.info: add non-standard capability ‘Rect’ (used by tmux)Daniel Eklöf2024-03-07-0/+2
| | | | | | | | This tells tmux it can use DECFRA to erase rectangular regions.
| * vt: DECALN: erase sixels, reset margins, home the cursorDaniel Eklöf2024-03-07-0/+8
| | | | | | | | | | | | | | | | | | https://vt100.net/docs/vt510-rm/DECALN.html: Notes on DECALN DECALN sets the margins to the extremes of the page, and moves the cursor to the home position.
| * csi: DECRARA: fix comment: DECCARA -> DECRARADaniel Eklöf2024-03-07-1/+1
| |
| * csi: DECCRA: no need for a counter hereDaniel Eklöf2024-03-07-1/+1
| |
| * term_fill(): change ‘character’ parameter from char -> uint8_tDaniel Eklöf2024-03-07-19/+20
| |
| * term_fill(): make sure the filled cells have their ‘clean’ bit resetDaniel Eklöf2024-03-07-1/+3
| |
| * vt: update DECALN to use term_fill()Daniel Eklöf2024-03-07-9/+3
| |
| * term: modify term_fill() to optionally reset the SGR attributesDaniel Eklöf2024-03-07-4/+10
| |
| * term: replace term_put_char() with term_fill()Daniel Eklöf2024-03-07-23/+22
| |
| * csi: rectangular: add helper function params_to_rectangular_area()Daniel Eklöf2024-03-07-81/+71
| | | | | | | | | | | | | | This functions reads the four top/left/bottom/right parameters, validates them, and converts relative row numbers to absolute. Returns true if the params are valid, otherwise false.
| * term: codespell: limitiations -> limitationsDaniel Eklöf2024-03-07-1/+1
| |
| * changelog: rectangular edit functionsDaniel Eklöf2024-03-07-0/+3
| |
| * csi: add ‘28’ (rectangular edit) to primary DA responseDaniel Eklöf2024-03-07-2/+2
| |
| * csi: implement rectangular edit escapesDaniel Eklöf2024-03-07-0/+237
| | | | | | | | | | | | | | | | | | | | | | | | * DECCARA - change attributes in rectangular area * DECRARA - reverse attributes in rectangular area * DECCRA - copy rectangular area * DECFRA - fill rectangular area * DECERA - erase rectangular area Not implemented: * DECSERA - selective erase rectangular area
| * put_char fixupDaniel Eklöf2024-03-07-0/+1
| |
| * grid: remove prototype for non-existing functionDaniel Eklöf2024-03-07-1/+0
| |
| * term: print: spacers may be printed all the way up to the last columnDaniel Eklöf2024-03-07-1/+1
| |
| * term: add term_put_char()Daniel Eklöf2024-03-07-0/+37
|/ | | | | | | | This function prints a single, non-double width, character to the grid. It handles OSC-8 hyperlinks, but does not: * update the cursor location * erase sixels
* sixel: don't try to emit a sixel if we're outside the image's boundariesDaniel Eklöf2024-03-07-0/+3
| | | | Closes #1634
* sixel: debug: sixel image _may_ be zero-sizedDaniel Eklöf2024-03-07-1/+2
| | | | | For example, and single GNL (Graphical New Line) will result in a sixel with a non-zero height, but a zero width.
* sixel: we no longer need the extra newlineDaniel Eklöf2024-03-07-3/+2
| | | | Since we never place the cursor *under* the sixel anymore.
* sixel: debug: fix logged width/height values when emitting sixelDaniel Eklöf2024-03-07-1/+1
| | | | | image.width and image.height are the scaled dimensions, and these haven't been set when the log message is printed.
* sixel: performance improvementsDaniel Eklöf2024-03-06-29/+61
| | | | | | | | | | | | | * Store pointer to current pixel (i.e. pixel we're about to write to), instead of a row-byte-offset. This way, we don't have to calculate the offset into the backing image every time we emit a sixel band. * Pass data pointer directly to sixel_add_*(), to avoid having to calculate an offset into the backing image. * Special case adding a single 1:1 sixel. This removes a for loop, and simplifies state (position) updates. It is likely LTO does this for us, but this way, we get it optimized in non-LTO builds as well.
* sixel: fix row height calculation in resize_vertically()Daniel Eklöf2024-03-06-1/+4
| | | | | | | | | In resize_vertically(), we assumed a sixel is 6 pixels tall. This is mostly true, but not for non-1:1 sixels. Or, to be more precise, not for sixels where 'pan' != 1. This caused us to allocate too little backing memory, resulting in a crash when we later tried to write to the image.
* kitty kbd: update handling of locked modifiersDaniel Eklöf2024-03-06-10/+28
| | | | | | | | | | | | | | | | The kitty keyboard specification has been updated/clarified yet again. Locked modifiers are to be ignored if the key event would result in plain text without the locked modifier being enabled. In short, locked modifiers are included in the set of modifiers reported in a key event. But having a locked modifier enabled doesn't turn all key events into CSIu sequences. For example, with only the disambiguate mode enabled, pressing 'a', or 'shift+a' results in a/A regardless of the state of Caps- or NumLock. But 'ctrl+a', which always results in a CSIu, will have a different modifier list, depending on whether Caps- or NumLock are enabled.
* kitty kbd: switch from GTK to XKB mode for 'consumed' modifiersDaniel Eklöf2024-03-02-14/+15
| | | | | | | | | | | This fixes an issue where some key combinations resulted in different output (e.g. escape code vs. plain text) depending on the state of e.g. the NumLock key. One such example is Shift+space. Another example is Shift+BackSpace. This patch also removes the hardcoded CapsLock filter, when determining whether a key combo produces text or not, and instead uses the locked modifiers as reported by XKB.
* cursor-shape: improve xcursor fallback support, and prefer CSS namesDaniel Eklöf2024-03-01-39/+46
| | | | | | | | | | | | | | Before this patch, we used legacy X11 xcursor names, and didn't really have any fallback handling in place (we only tried to fallback to "xterm", regardless of which cursor shape we were trying to load). This patch changes two things: 1. Improved fallback support. cursor_shape_to_string() now returns a list of strings. This allows us to have per-shape fallbacks, and any number of fallbacks. 2. We prefer CSS xcursor names over legacy X11 names.
* render: don't try to set a NULL xcursor imageDaniel Eklöf2024-02-29-2/+19
| | | | | | | | | | | | | | | | | | | render_xcursor_update() is called when we've loaded a new xcursor image, and needs to display it. The reason it's not pushed to the compositor immediately is to ensure we don't flood the Wayland socket with xcursor updates. Normally, it's only called when we *succeed* to load a new xcursor image. I.e. if we try to load a non-existing xcursor image, we never schedule an update. However, we _can_ still end up in render_xcursor_update() without a valid xcursor image. For example, we have loaded a valid xcursor image, and scheduled an update. But before the update runs, the user moves the cursor, and we try to load a new xcursor image. If it fails, we crash when the previously scheduled update finally runs. Closes #1624
* ci: run x86+x64 builds in parallelDaniel Eklöf2024-02-24-0/+2
| | | | ... by making them depend on the 'subprojects' step.
* config: don't try to free key combos we haven't allocatedDaniel Eklöf2024-02-24-2/+4
| | | | | | | | | When erroring out due to a key combo being "empty", we incorrectly tried to free one key binding. This is because 'used_combos' is initialized to '1'. And it should, but an empty key binding is a special case. Fixes a test failure, and closes #1620
* ci: remove deprecated 'group'Daniel Eklöf2024-02-24-2/+0
|
* ci: 'steps' is a listDaniel Eklöf2024-02-23-4/+4
|
* ci: rename .woodpecker.yml -> .woodpecker.yamlDaniel Eklöf2024-02-23-0/+0
| | | | | According to the latest woodpecker docs, this is the only supported extension.
* config: on error, correctly free partially parsed key combosDaniel Eklöf2024-02-23-6/+4
|
* changelog: kitty modifier no longer clears selection + viewportDaniel Eklöf2024-02-23-0/+2
|
* input: don't clear text selection on modifier keypressesTim Culverhouse2024-02-22-2/+2
| | | | | | | | | When kitty keyboard is enabled, pressing a modifier key will clear the text selection. This makes it difficult to copy text because the selection clears as soon as the user presses "ctrl". Tested-by: Robin Jarry <robin@jarry.cc> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
* shm: use XRGB surfaces when we know we wont be using transparencyDaniel Eklöf2024-02-21-28/+28
|
* input: improved debug logging of key press/releaseDaniel Eklöf2024-02-20-16/+63
| | | | | | * Log which it is: press or release * Include locked modifiers * Include human-readable names of the modifiers
* vt: ignore VS16 (U+FE0F) when grapheme clustering is disabledDaniel Eklöf2024-02-16-1/+7
| | | | | | | | | | This fixes: a) a compilation error with -Dgrapheme-clustering=disabled b) ensures U+FE0F does *not* allocate a two cells when grapheme clustering has been disabled (either compile time, in config, or run-time).
* vt: VS16 - variation selector 16 (emoji representation) should only affect emojisDaniel Eklöf2024-02-15-2/+10
|
* config: map Control+wheel to font increase/decreaseDaniel Eklöf2024-02-15-8/+44
| | | | | | This is in addition to the already existing keyboard shortcuts. Also add missing default keyboard/mouse bindings to readme + foot(1).
* term: erase-scrollback: handle non-existing scrollback historyDaniel Eklöf2024-02-15-0/+16
| | | | | | | | | | | | If scrollback.lines == 0, and the window size (number of rows) is a power of two, all rows are always visible. I.e. there is no scrollback history. This threw off the scrollback erase logic, causing visible rows to be erased, and set to NULL. This triggered a crash when trying to update the view. Closes #1610
* render: always center grid when fullscreened or maximizedDaniel Eklöf2024-02-15-1/+7
|
* csi: support DECRQM queries for ECMA-48 (SM/RM) modesCraig Barnes2024-02-11-5/+30
| | | | | This is in addition to the existing support for DECRQM queries of DEC private modes.
* pgo: render_resize_force() has been removed, adjust stub accordinglyDaniel Eklöf2024-02-08-1/+2
| | | | Closes #1601
* doc: better examples for pipe-* commandsDaniel Eklöf2024-02-07-7/+5
|
* wayland: regression: use correct scaling factor when calling render_resize()Daniel Eklöf2024-02-07-3/+5
| | | | | | | | | | | | When an output property (such as scaling factor) has changed, we need to call render_resize() to ensure the window surface is correct (for example, we may have to change its scale). The width/height parameters are in *logical* pixels (i.e. already scaled). For render_resize() to work correctly when the scale is being changed, it needs to be called with *current* logical size. This means we need to scale our current width/height using the *old* scaling factor.
* input: remove debug loggingDaniel Eklöf2024-02-06-3/+0
|
* pgo: add missing stub for render_refresh_app_id()Daniel Eklöf2024-02-06-0/+1
|
* pgo: fix function prototype for stub function get_current_modifiers()Daniel Eklöf2024-02-06-1/+2
|
* osc: 176 (app-id): implement query+replyDaniel Eklöf2024-02-06-0/+12
| | | | | | | | | | Applications can now query for the current app-id with: \E] 176 ; ? \E\\ The reply is \E] 176 ; <title> \E\\
* Merge branch 'app-id'Daniel Eklöf2024-02-06-2/+103
|\
| * changelog: OSC-176 - set app-idDaniel Eklöf2024-02-06-0/+2
| |
| * osc: add support for osc 176 (app ID)delthas2024-02-06-2/+101
|/ | | | | | | | | | This adds support for a new OSC escape sequence: OSC 176, that lets terminal programs tell the terminal the name of the app that is running. foot then sets the app ID of the toplevel to that ID, which lets the compositor know which app is running, and typically sets the appropriate icon, window grouping, ... See: https://gist.github.com/delthas/d451e2cc1573bb2364839849c7117239
* term: drop term->render.title.is_armedDaniel Eklöf2024-02-06-6/+0
| | | | | | | | | | | | | | | | | This boolean isn't needed. The idea was probably to not re-program the timer unnecessarily, or even to prevent it from being moved forward in time indefinitely. However, the logic has (probably) gone through some changes, that now makes it irrelevant. The timer isn't moved forward indefinitely; it is always set to 8ms from the last title update. The closer we get to that point in time, the smaller the timeout we set. Now, is_armed _did_ prevent the timer from being re-programmed. But that tiny performance tweak isn't really necessary, as the title should, in normal cases, not be set that often anyway.
* doc: foot-ctlseq: add OSC 133 C/D (command output start/end)Daniel Eklöf2024-02-06-0/+6
|
* term: ignore attempts to set a title that contains an invalid UTF-8 sequenceDaniel Eklöf2024-02-06-0/+10
| | | | | | | | | | Setting the title ultimately leads to a call to xdg_toplevel::set_title(). It is a protocol violation to try to set a title that contains an invalid UTF-8 sequence: The string must be encoded in UTF-8. Closes #1552
* changelog: smm+rmmDaniel Eklöf2024-02-06-0/+4
|
* terminfo: smm: enable 8-bit Meta modeDaniel Eklöf2024-02-06-0/+2
| | | | | | | | | | | To enable 8-bit meta mode, we need to: * disable "send ESC when meta modifies a key" (private mode 1036) * enable "8-bit meta mode" (private mode 1034) rmm reverses the above. Closes #1584
* Don't use fancy Unicode quotes, stick to ASCIIDaniel Eklöf2024-02-06-328/+328
|
* readme: shell integration: fix wiki linkDaniel Eklöf2024-02-06-1/+1
|
* readme: add "Piping last command's output" to indexDaniel Eklöf2024-02-06-0/+1
|
* Merge branch 'pipe-command-output'Daniel Eklöf2024-02-06-51/+246
|\
| * grid: resize with reflow: reflow FTCS_COMMAND_{EXECUTED,FINISHED}Daniel Eklöf2024-02-06-27/+29
| |
| * grid: resize without reflow: truncate shell_integration.cmd_{start,end}Daniel Eklöf2024-02-06-1/+3
| | | | | | | | This ensures the cmd start/end columns are valid in the new grid.
| * term: command_output_to_text(): don’t skip FTCS_COMMAND_FINISHED on last rowDaniel Eklöf2024-02-06-2/+6
| |