aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* meson: bump version to 1.17.21.17.2releases/1.17Daniel Eklöf2024-04-17-1/+1
|
* changelog: prepare for 1.17.2Daniel Eklöf2024-04-17-9/+3
|
* Merge branch 'master' into releases/1.17Daniel Eklöf2024-04-17-25/+110
|\
| * term: stash last known DPI, and use after a unmapped/mapped sequenceDaniel Eklöf2024-04-17-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A compositor may unmap, and then remap the window, for example when the window is minimized, or if the user switches workspace. With DPI aware rendering, we *need* to know on which output we're mapped, in order to use the correct DPI. This means the first frame we render, before being mapped, always guesses the DPI. In an unmap/map sequence, guessing the wrong DPI means the window will flicker. Fix by stashing the last used DPI value, and use that instead of guessing. This means the *only* time we _actually_ guess the DPI, is the very first frame, when starting up foot.
| * ci: set explicit 'event' filters an all 'when'-statementsDaniel Eklöf2024-04-17-12/+12
| | | | | | | | | | | | This should fix the CI warnings we've started to see lately: [bad_habit] Please set an event filter on all when branches
| * ci: explicitly install opensslDaniel Eklöf2024-04-17-0/+3
| | | | | | | | Let's see if this fixes the missing SSL module in Python...
| * sixel: don't allow pan/pad changes after sixel data has been emittedDaniel Eklöf2024-04-15-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing pan/pad changes the sixel's aspect ratio. While I don't know for certain what a real VT340 would do, I suspect it would change the aspect ratio of all subsequent sixels, but not those already emitted. The way we implement sixels in foot, makes this behavior hard to implement. We currently don't resize the image properly if the aspect ratio is changed, but not the RA area. We have code that assumes all sixel lines have the same aspect ratio, etc. Since no "normal" applications change the aspect ratio in the middle of a sixel, simply disallow it, and print a warning. This also fixes a crash, when writing sixels after having modified the aspect ratio.
| * sixel: also set 'alloc_height', when short-cutting a resize operationDaniel Eklöf2024-04-15-2/+8
| | | | | | | | | | | | | | | | | | | | In some cases, a sixel may be resized vertically, while still having a zero-width. In this case, the resize operations are short-cutted, and no actual allocations are done. However, we forgot to set 'alloc_height' when doing so. As a result, the trimming code (when the sixel is "done"), trimmed away the entire sixel.
| * term: don't print outside grid when printing multi-column charactersDaniel Eklöf2024-04-15-1/+7
| | | | | | | | | | | | | | | | | | | | When auto-wrap is disabled, a multi-column character may be printed on a line that doesn't fit the entire character. That is, the "spacers" we print, as place holders in the columns after the first one, may reach outside the grid. We did (try to) check for this, but the check was off by one. Meaning, we could, in some cases, print outside the grid.
| * osc: reject notifications with invalid UTF-8 stringsDaniel Eklöf2024-04-15-0/+17
| |
| * wayland: remove has_wl_compositor_v6Daniel Eklöf2024-04-12-4/+1
| | | | | | | | | | | | | | | | | | We deviate slightly from the specification, in that we don't assume a preferred buffer scale of 1. Instead, we "guess" the scale *until we receive a surface_preferred_buffer_scale event. Because of this, we don't need the has_wl_compositor_v6 member, as it's enough to check if we have a non-zero 'preferred buffer scale'.
| * changelog: add a new 'unreleased' sectionDaniel Eklöf2024-04-11-0/+11
| |
| * Merge branch 'releases/1.17'Daniel Eklöf2024-04-11-7/+9
| |\ | |/ |/|
* | meson: bump version to 1.17.11.17.1Daniel Eklöf2024-04-11-1/+1
| |
* | changelog: prepare for 1.17.1Daniel Eklöf2024-04-11-6/+8
| |
* | Merge branch 'master' into releases/1.17Daniel Eklöf2024-04-11-29/+341
|\|
| * config: add new key-binding 'quit', unbound by defaultDaniel Eklöf2024-04-11-1/+13
| | | | | | | | Closes #1475
| * Typo fixizmyname2024-04-11-1/+1
| |
| * Add noirblaze themeizmyname2024-04-10-0/+31
| |
| * code of conduct: initial code-of-conductDaniel Eklöf2024-04-10-0/+89
| | | | | | | | | | | | | | | | Based on [River's](https://codeberg.org/river/river) code of conduct, which is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
| * config: add cursor.unfocused-styleDaniel Eklöf2024-04-10-7/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option controls how we render the cursor when the terminal window is unfocused. Possible values are: * hollow: the default, and how we rendered the cursor before this patch. * unchanged: render the cursor exactly the same way as when the window is focused. * none: do not render any cursor at all Closes #1582
| * dcs: DECRQSS: fix off-by-one when checking for space in the DCS bufferDaniel Eklöf2024-04-10-1/+3
| |
| * themes: add dracula-itermMarcin Puc2024-04-07-0/+25
| |
| * themes: add xterm themeHolger Weiß2024-04-06-0/+22
| | | | | | | | | | Include a theme for using xterm’s default palette (based on the XTerm-col.ad file included with the xterm source code, version 390).
| * term: send SIGHUP before SIGTERM when shutting downDaniel Eklöf2024-04-05-13/+61
| | | | | | | | | | | | | | | | If we're the ones initiating shutdown, start by sending SIGHUP. Only if the client application does not terminate, send SIGTERM (and if it still refuses to terminate, send SIGKILL). Also reduce the timeout between the signals from 60s to 30s.
| * term: don't shutdown terminal when PTY is closed, unless --pty was usedDaniel Eklöf2024-04-05-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unless --pty has been used, we do *not* want to shutdown the terminal when the PTY is closed by the client application; we want to wait for the client application to actually terminate. This was the behavior before the --pty patch. This was changed in the --pty patch, since then, we don't *have* a client application. That is, foot has not forked+exec:ed anything. The only way to trigger a shutdown (from the client side) is to close the PTY. This patch restores the old behavior, when --pty is *not* used. Closes #1666
| * wayland: only use the surface preferred scale if set by the compositorDaniel Eklöf2024-04-05-5/+1
| | | | | | | | | | | | | | | | Before this patch, we would, in some cases, fallback to the surface preferred (not fractional) scaling, even though the compositor hadn't actually published a preferred buffer scale; the presence of a v6 compositor interface doesn't mean we've actually received a preferred scale yet.
| * log: fix syslog not respecting the configured log levelDaniel Eklöf2024-04-05-0/+7
| |
| * 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