aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* config: tweak.surface-bit-depth: add 16f-bitpixman-16f-2Daniel Eklöf2025-05-03-10/+64
| | | | | | This adds support for 16-bit floating point surfaces, using the new PIXMAN_rgba_float16 image buffer type. This maps to WL_SHM_ABGR161616F.
* config: tweak.surface-bit-depth: add support for 16-bit surfacesDaniel Eklöf2025-05-03-25/+101
| | | | | | | | | 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-7/+15
| | | | | | 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.
* wayland: attempt to log protocol errors on failure to flushDaniel Eklöf2025-05-02-1/+8
| | | | | When failing to flush, and the error is EPIPE, attempt to read and dispatch events. This ensures protocol errors are logged.
* wayland: always call wl_display_dispatch_pending() at least once, after readingDaniel Eklöf2025-05-02-0/+2
| | | | | | | | | | | This fixes an issue where protocol errors aren't reported. I'm guessing the read succeeds, but that prepare_read() _also_ succeeds immediately, since there aren't any events to dispatch (only log the protocol error). By calling dispatch unconditionally, we ensure any error messages are printed. Then we proceed to loop prepare_read() + dispatch_pending() until the queue is empty.
* Paste URL/regex selection to prompt if key is uppercase.Ryan Roden-Corrent2025-05-01-5/+21
| | | | | | | | | | | | | | | | 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-10/+22
|\
| * meson: bump version to 1.22.31.22.3releases/1.22Daniel Eklöf2025-05-01-1/+1
| |
| * 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-71/+108
| | | | | | | | | | | | | | | | | | | | | | 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-21/+14
| |
| * 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-71/+105
| | | | | | | | | | | | | | | | | | | | | | 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-21/+11
| |
* | readme: add liberapay donation buttonDaniel Eklöf2025-04-30-0/+2
| |
* | Merge branch 'releases/1.22'Daniel Eklöf2025-04-30-8/+16
|\|
| * meson: bump version to 1.22.21.22.2Daniel Eklöf2025-04-30-1/+1
| |
| * changelog: prepare 1.22.2Daniel Eklöf2025-04-30-9/+3
| |
| * doc: foot.ini: gamma-correct: tweak wording of 8- vs. 10-bit surfacesDaniel Eklöf2025-04-30-4/+5
| |
| * scripts: srgb: use 2.2 gamma TF instead of piece-wise sRGB TFDaniel Eklöf2025-04-30-24/+20
| |
| * changelog: add new 'unreleased' sectionDaniel Eklöf2025-04-30-0/+11
| |
* | readme: donations: add liberapayDaniel Eklöf2025-04-30-0/+1
| |
* | doc: foot.ini: gamma-correct: tweak wording of 8- vs. 10-bit surfacesDaniel Eklöf2025-04-28-4/+5
| |
* | scripts: srgb: use 2.2 gamma TF instead of piece-wise sRGB TFDaniel Eklöf2025-04-28-24/+17
| |
* | config: parse_color_theme(): make NOINLINEDaniel Eklöf2025-04-27-1/+1
| |
* | changelog: mention the new combined dark/light theme filesDaniel Eklöf2025-04-26-0/+7
| |
* | themes: paper-color: add dark/light combined theme fileDaniel Eklöf2025-04-26-0/+49
| |
* | themes: nvim: add dark/light combined theme fileDaniel Eklöf2025-04-26-0/+56
| |
* | themes: gruvbox: add dark/light combined theme fileDaniel Eklöf2025-04-26-0/+42
| |
* | themes: selenized: add dark/light combined theme fileDaniel Eklöf2025-04-26-0/+48
| |
* | themes: solarized: add dark/light combined theme fileDaniel Eklöf2025-04-26-0/+101
| | | | | | | | | | These themes uses the 'colors' section to define the dark variant, and 'colors2' to define the light variant.
* | config: add initial-color-theme=1|2Daniel Eklöf2025-04-26-15/+58
| | | | | | | | | | | | | | | | 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/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-11/+102
| | | | | | | | | | | | * 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: add new section 'colors2'Daniel Eklöf2025-04-26-0/+21
| | | | | | | | | | | | | | | | This section defines an alternative color theme. The keys are the same as in the 'colors' section, as are the default values. Values are *not* inherited from 'colors'. That is, if you set a value in 'colors', but not in 'colors2', it is *not* inherited by 'colors2'.
* | config: refactor: break out color theme parsing to a separate functionDaniel Eklöf2025-04-26-38/+41
| |
* | tests: config: colors: verify loaded color is correctDaniel Eklöf2025-04-26-0/+26
| |
* | themes: cursor.color -> colors.cursorDaniel Eklöf2025-04-26-164/+55
| |
* | config: move cursor.color to colors.cursorDaniel Eklöf2025-04-26-31/+69
| |
* | config: refactor: break out 'colors' to a color_theme structDaniel Eklöf2025-04-26-52/+54
| |
* | changelog: add new 'unreleased' sectionDaniel Eklöf2025-04-26-0/+11
| |
* | Merge branch 'releases/1.22'Daniel Eklöf2025-04-26-8/+7
|\|
| * meson: bump version to 1.22.11.22.1Daniel Eklöf2025-04-26-1/+1
| |
| * changelog: prepare for 1.22.1Daniel Eklöf2025-04-26-7/+6
| |
| * Merge branch 'master' into releases/1.22Daniel Eklöf2025-04-26-22/+131
| |\ | |/ |/|
* | changelog: add missing bug refDaniel Eklöf2025-04-26-0/+1
| |
* | render: regression: alpha applied to inversed text/selectionsDaniel Eklöf2025-04-25-1/+3
| | | | | | | | | | | | 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-3/+3
| | | | | | | | This reverts commit 76503fb86a8b8a6b5c3ce1be87c15a55af38508d.
* | Revert "term: ignore LTR+RTL markers (U+200E + U+200F)"Daniel Eklöf2025-04-24-17/+0
| | | | | | | | This reverts commit 70b324b24c86473a99528feb6f1f91ca70e11a02.
* | term: ignore LTR+RTL markers (U+200E + U+200F)Daniel Eklöf2025-04-24-0/+17
| | | | | | | | | | | | | | | | | | 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
* | Add alacritty themevaloq2025-04-23-0/+59
| | | | | | | | This adds the default colors from alacritty as an additional theme
* | build: fix race when generating emoji-variation-sequences.hJan Palus2025-04-23-1/+2
| | | | | | | | | | | | | | d3f692990ef6 moved emoji-variation-sequences.h header inclusion from vt.c to terminal.c. these two files are part of different libraries hence target for generating emoji-variation-sequences.h needs to be moved too.
* | doc: foot.ini: add newish Unicode range to 'box-drawings-uses-font-glyphs'Daniel Eklöf2025-04-19-0/+1
| |
* | input: reset modifiers in keyboard_leave()Daniel Eklöf2025-04-19-0/+11
| | | | | | | | Closes #2034
* | csi: don't allow client app to enable grapheme-shaping when disabled at compile-timeDaniel Eklöf2025-04-19-0/+7
| | | | | | | | Closes #2039
* | render: fix colors.alpha-mode=matchingDaniel Eklöf2025-04-19-1/+12
| | | | | | | | | | | | 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.
* | doc: foot.ini: spaces -> tab (for indentation)Daniel Eklöf2025-04-19-1/+1
| |
* | doc: foot.ini: gamma-correct-blending: mention colors being offDaniel Eklöf2025-04-19-7/+8
| |
* | doc: foot.ini: key-bindings: untranslated symbols are tried before translatedDaniel Eklöf2025-04-18-8/+9
| |
* | foot.ini: move alpha-mode to colors sectionDaniel Eklöf2025-04-18-2/+1
| | | | | | | | This is where the config parser expects it
* | changelog: add new 'unreleased' sectionDaniel Eklöf2025-04-17-0/+11
| |
* | Merge branch 'releases/1.22'Daniel Eklöf2025-04-17-6/+12
|\|
| * meson: bump version to 1.22.01.22.0Daniel Eklöf2025-04-17-1/+1
| |
| * changelog: prepare for 1.22.0Daniel Eklöf2025-04-17-5/+11
|/
* themes: add "Night Owl" themedatsudo2025-04-15-0/+30
|
* doc: foot.ini: add colors.alpha-modeDaniel Eklöf2025-04-14-0/+15
|
* tests: config: test colors.alpha-modeDaniel Eklöf2025-04-14-0/+5
|
* config+render: move alpha-mode to colors.alpha-mode, fix cursor handlingDaniel Eklöf2025-04-14-77/+73
| | | | | | | | | | Move main.alpha-mode to colors.alpha-mode. Fix (inverted) cursor handling, by always using the bg color without alpha. Do a minor optimization, where we don't even lock at colors.alpha-mode if there's no transparency configured.
* changelog: move 'alpha-mode' to next-releaseDaniel Eklöf2025-04-14-3/+5
|
* config: add alpha_mode optionFazzi2025-04-14-0/+38
|
* doc: foot.ini: workers: "if you have a ridiculous number of cores"Daniel Eklöf2025-04-14-0/+4
|
* url-mode: fix double-width characters not being handled correctlyDaniel Eklöf2025-04-13-2/+9
| | | | | | | | | 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-30/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* wayland: handle xdg-shell edge constraintsDominique Martinet2025-04-07-0/+6
| | | | | | | | | | | | | | | | | | | wayland-protocols commit 86750c99ed06 ("xdg-shell: Add edge constraints") added a few more enums to handle, making the build fail with -Werror: ../wayland.c: In function ‘xdg_toplevel_configure’: ../wayland.c:878:9: error: enumeration value ‘XDG_TOPLEVEL_STATE_CONSTRAINED_LEFT’ not handled in switch [-Werror=switch] 878 | switch (*state) { | ^~~~~~ ../wayland.c:878:9: error: enumeration value ‘XDG_TOPLEVEL_STATE_CONSTRAINED_RIGHT’ not handled in switch [-Werror=switch] ../wayland.c:878:9: error: enumeration value ‘XDG_TOPLEVEL_STATE_CONSTRAINED_TOP’ not handled in switch [-Werror=switch] ../wayland.c:878:9: error: enumeration value ‘XDG_TOPLEVEL_STATE_CONSTRAINED_BOTTOM’ not handled in switch [-Werror=switch] (This is not part of any release yet, but can be used when building with the submodule) From a quick look it sounds like the meaning is the same as tiling as far as we are concerned so handle these as we do of tiling.
* xkbcommon: require libxkbcommon >= 1.8.0Dominique Martinet2025-04-07-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to build with an older libxkbcommon fails as follow: ``` ../input.c: In function ‘keyboard_keymap’: ../input.c:648:82: error: ‘XKB_VMOD_NAME_ALT’ undeclared (first use in this function); did you mean ‘XKB_MOD_NAME_ALT’? 648 | xkb_mod_index_t alt = xkb_keymap_mod_get_index(seat->kbd.xkb_keymap, XKB_VMOD_NAME_ALT); | ^~~~~~~~~~~~~~~~~ | XKB_MOD_NAME_ALT ../input.c:648:82: note: each undeclared identifier is reported only once for each function it appears in ../input.c:649:83: error: ‘XKB_VMOD_NAME_META’ undeclared (first use in this function); did you mean XKB_MOD_NAME_ALT’? 649 | xkb_mod_index_t meta = xkb_keymap_mod_get_index(seat->kbd.xkb_keymap, XKB_VMOD_NAME_META); | ^~~~~~~~~~~~~~~~~~ | XKB_MOD_NAME_ALT ../input.c:650:84: error: ‘XKB_VMOD_NAME_SUPER’ undeclared (first use in this function); did you mean ‘XKB_MOD_NAME_NUM’? 650 | xkb_mod_index_t super = xkb_keymap_mod_get_index(seat->kbd.xkb_keymap, XKB_VMOD_NAME_SUPER); | ^~~~~~~~~~~~~~~~~~~ | XKB_MOD_NAME_NUM ../input.c:651:84: error: ‘XKB_VMOD_NAME_HYPER’ undeclared (first use in this function); did you mean ‘XKB_MOD_NAME_CAPS’? 651 | xkb_mod_index_t hyper = xkb_keymap_mod_get_index(seat->kbd.xkb_keymap, XKB_VMOD_NAME_HYPER); | ^~~~~~~~~~~~~~~~~~~ | XKB_MOD_NAME_CAPS ../input.c:652:87: error: ‘XKB_VMOD_NAME_NUM’ undeclared (first use in this function); did you mean ‘XKB_MOD_NAME_NUM’? 652 | xkb_mod_index_t num_lock = xkb_keymap_mod_get_index(seat->kbd.xkb_keymap, XKB_VMOD_NAME_NUM); | ^~~~~~~~~~~~~~~~~ | XKB_MOD_NAME_NUM ../input.c:653:90: error: ‘XKB_VMOD_NAME_SCROLL’ undeclared (first use in this function); did you mean ‘XKB_LED_NAME_SCROLL’? 653 | xkb_mod_index_t scroll_lock = xkb_keymap_mod_get_index(seat->kbd.xkb_keymap, XKB_VMOD_NAME_SCROLL); | ^~~~~~~~~~~~~~~~~~~~ | XKB_LED_NAME_SCROLL ../input.c:654:90: error: ‘XKB_VMOD_NAME_LEVEL3’ undeclared (first use in this function); did you mean ‘XKB_MOD_NAME_CTRL’? 654 | xkb_mod_index_t level_three = xkb_keymap_mod_get_index(seat->kbd.xkb_keymap, XKB_VMOD_NAME_LEVEL3); | ^~~~~~~~~~~~~~~~~~~~ | XKB_MOD_NAME_CTRL ../input.c:655:89: error: ‘XKB_VMOD_NAME_LEVEL5’ undeclared (first use in this function); did you mean ‘XKB_MOD_NAME_CTRL’? 655 | xkb_mod_index_t level_five = xkb_keymap_mod_get_index(seat->kbd.xkb_keymap, XKB_VMOD_NAME_LEVEL5); | ^~~~~~~~~~~~~~~~~~~~ | XKB_MOD_NAME_CTRL ```
* Themes: Add 'Molokai' themeŁukasz Wojniłowicz2025-04-07-0/+23
|
* config: update default URL regexDaniel Eklöf2025-04-07-33/+45
| | | | | | | | | | | | | | | | | | | 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
* Merge branch 'kbd-no-virtual-modifiers'Daniel Eklöf2025-03-31-8/+151
|\ | | | | | | Closes #2009
| * changelog: reword, and remove section that no longer appliesDaniel Eklöf2025-03-31-7/+2
| |
| * doc: foot.ini: mention virtual modifiers are allowedDaniel Eklöf2025-03-31-1/+2
| |
| * key-binding: recognize virtual modifiers, and translate to the corresponding real modifier.Daniel Eklöf2025-03-31-9/+90
| |
| * input: xkb: ignore virtual modifiersDaniel Eklöf2025-03-31-0/+66
|/ | | | | | | | | | | | | | | | | | | | | | | | 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-4/+5
| | | | | | | 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-1/+2
| | | | | | | otherwise, depending on ninja dependency resolution order and parallel build, srgb.h may not be built in time Fixes: ccf625b991 ("render: gamma-correct blending")
* doc: foot.ini: gamma-correct: move sectionDaniel Eklöf2025-03-23-5/+5
|
* render: dim and brighten using linear rgb interpolationSam McCall2025-03-23-66/+51
| | | | | | Adds setting tweak.dim-amount, similar to bold-text-in-bright-amount. Closes #2006
* changelog: url-mode: show-urls-persistent regression fixDaniel Eklöf2025-03-20-0/+7
|
* url-mode: fix crash when opening multiple urls with persist modellyyr2025-03-20-2/+0
| | | | | Fixes: 051cd6ecfc8b98e1d80b399ebea40207fe040750 Closes #2000
* vt: utf8: insert a REPLACEMENT CHARACTER when an invalid UTF-8 sequence is detectedDaniel Eklöf2025-03-18-6/+6
|
* vt: utf8: don't discard current byte when an invalid UTF-8 sequence is detectedDaniel Eklöf2025-03-18-6/+10
| | | | | | | | | | | | | | | | Example: printf "pok\xe9mon\n" would result in 'pokon' - the 'm' has been discarded along with E9. While correct, in some sense, it's perhaps not intuitive. This patch changes the VT parser to instead discard everything up to the invalid byte, but then try the invalid byte from the ground state. This way, invalid UTF-8 sequences followed by both plain ASCII, or longer (and valid) UTF-8 sequences are printed as expected instead of being discarded.
* changelog: add new 'unreleased' sectionDaniel Eklöf2025-03-17-0/+11
|
* Merge branch 'releases/1.21'Daniel Eklöf2025-03-17-5/+14
|\
| * doc: foot.ini: codespell: shouuld -> should1.21.0releases/1.21Daniel Eklöf2025-03-17-1/+1
| |
| * meson: bump version to 1.21.0Daniel Eklöf2025-03-17-1/+1
| |
| * changelog: prepare for 1.21.0Daniel Eklöf2025-03-17-4/+13
| |
* | doc: foot.ini: codespell: shouuld -> shouldDaniel Eklöf2025-03-17-1/+1
|/
* config: remove deprecated options 'notify' and 'notify-focus-inhibit'Daniel Eklöf2025-03-17-27/+2
| | | | They've been deprecated since 1.18.0
* doc: foot.init: surface-bit-depth: mention 10-bit surfaces are slowDaniel Eklöf2025-03-17-0/+3
|