aboutsummaryrefslogtreecommitdiff
path: root/tests (unfollow)
Commit message (Collapse)AuthorLines
2026-09-02config: remove support for the deprecated colors and colors2 sectionsDaniel Eklöf-2/+2
They were deprecated in 1.26.0, and replaced by colors-dark and colors-light.
2026-04-06config: add url.style=none|single|double|curly|dotted|dashedDaniel Eklöf-0/+4
This option allows you to configure which underline style to use with URLs. The default is dotted. Since before this patch, URL underlines were always plain underlines, this means the default URL underline style has changed, from single to dotted. Closes #2302
2026-03-02test: config: blur: fix test failure; use the correct parsing functionDaniel Eklöf-2/+2
2026-03-02Add support for background blurDaniel Eklöf-0/+4
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.
2025-12-20config: add [colors-dark] and [colors-light], replacing [colors] and [colors2]Daniel Eklöf-54/+142
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...)
2025-11-12config: add toplevel-tag=TAGDaniel Eklöf-0/+1
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
2025-10-10config: add colors.dim-blend-towards=black|whiteDaniel Eklöf-0/+5
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
2025-10-05config: add tweak.min-stride-alignmentDaniel Eklöf-0/+3
This allows the user to configure the value by which a surface buffer's stride must be an even multiple of. This can be used to ensure the stride meets the GPU driver's requirements for direct import. Defaults to 256. Set to 0 to disable. Closes #2182
2025-08-31config: add 'uppercase-regex-insert'Ryan Roden-Corrent-0/+1
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.
2025-05-01config: gamma-correct-blending: disable by defaultDaniel Eklöf-0/+1
2025-05-01config: gamma-correct-blending: disable by defaultDaniel Eklöf-0/+1
2025-04-26tests: config: colors: verify loaded color is correctDaniel Eklöf-0/+26
2025-04-14tests: config: test colors.alpha-modeDaniel Eklöf-0/+5
2025-03-17config: remove deprecated options 'notify' and 'notify-focus-inhibit'Daniel Eklöf-3/+0
They've been deprecated since 1.18.0
2025-02-05tests: config: handle regex key bindingsDaniel Eklöf-8/+28
2025-02-05config: remove url.{uri-characters,protocols}Daniel Eklöf-47/+0
2025-01-17Add support for the new Wayland protocol xdg-system-bellDaniel Eklöf-0/+1
From the release notes: system bell - allowing e.g. terminal emulators to hand off system bell alerts to the compositor for among other things accessibility purposes The new protocol is used when the new config option bell.system=yes (and the compositor implements the protocol, obviously). The system bell is rung independent of whether the foot window has keyboard focus or not (thus relying on compositor configuration to determine whether anything should be done or not in response to the bell). The new option is enabled by default.
2024-12-22osc: add option to disable OSC-52, partially or fullyDaniel Eklöf-0/+17
Closes #1867
2024-08-26add setting for strikeout thicknessOleh Hushchenkov-0/+1
2024-08-02osc: kitty notifications: cleanup and update to latest version of specDaniel Eklöf-1/+1
* Don't store a list of unfinished notifications. Use a single one. If the notification ID of the 'current' notification doesn't match the previous, unfinished one, the 'current' notification replaces the previous one, instead of updating it. * Update xstrjoin() to take an optional delimiter (for example ','), and use that when joining categories and 'alive IDs'. * Rename ${action-arg} to ${action-argument} * Update handling of the 'n' parameter (symbolic icon name); the spec allows it to be used multiple times, and the terminal is supposed to pick the first one it can resolve. Foot can't resolve icons at all, neither can 'notify-send' or 'fyi' (which is what foot typically executes to display a notification); it's the notification daemon that resolves icons. The spec _could_ be interpreted to mean the terminal should lookup .desktop files, and use the value of the 'Icon' key from the first matching .desktop files. But foot doesn't read .desktop files, and I don't intend to implement XDG directory scanning and parsing of .desktop files just to figure out which icon to use. Instead, use a simple heuristics; use the *shortest* symbolic names. The idea is pretty simple: plain icon names are typically shorter than .desktop file IDs.
2024-07-31osc: kitty notifications: buttons, icons, app-name, categories etcDaniel Eklöf-0/+2
First, icons have been finalized in the specification. There were only three things we needed to adjust: * symbolic names are base64 encoded * there are a couple of OSC-99 defined symbolic names that need to be translated to the corresponding XDG icon name. * allow in-band icons without a cache ID (that is, allow applications to use p=icon without having to cache the icon first). Second, add support for the following new additions to the protocol: * 'f': custom app-name, overrides the terminal's app-id * 't': categories * 'p=alive': lets applications poll for currently active notifications * 'id' is now 'unset' by default, rather than "0" * 'w': expire time (i.e. notification timeout) * "buttons": aka actions. This lets applications add additional (to the terminal defined "default" action) actions. The 'activated' event has been updated to report which button/action was used to activate the notification. To support button/actions, desktop-notifications.command had to be reworked a bit. There's now a new config option: desktop-notifications.command-action-arg. It has two template arguments ${action-name} and ${action-label}. command-action-arg gets expanded for *each* action. ${action-name} and ${action-label} has been replaced by ${action-arg} in command. This is a somewhat special template, in that it gets replaced by *all* instances of the expanded actions.
2024-07-23osc: kitty notifications: implement focus|reportDaniel Eklöf-2/+17
This patch adds support for window focusing, and sending events back to the client application when a notification is closed. * Refactor notification related configuration options: - add desktop-notifications sub-section - deprecate 'notify' in favor of 'desktop-notifications.command' - deprecate 'notify-focus-inhibit' in favor of 'desktop-notifications.inhibit-when-focused' * Refactor: rename 'struct kitty_notification' to 'struct notification' * Pass a 'struct notification' to notify_notify(), instead of many arguments. * notify_notify() now registers a reaper callback. When the notifier process has terminated, the notification is considered closed, and we either try to focus (activate) the window, or send an event to the client application, depending on the notification setting. * For the window activation, we need an XDG activation token. For now, assume *everything* written on stdout is part of the token. * Refactor: remove much of the warnings from OSC-99; we don't typically log anything when an OSC/CSI has invalid values. * Add icon support to OSC-99. This isn't part of the upstream spec. Foot's implementation: - uses the 'I' parameter - the value is expected to be a symbolic icon name - a quick check for absolute paths is done, and such icon requests are ignored. * Added ${icon} to the 'desktop-notifications.command' template. Uses the icon specified in the notification, or ${app-id} if not set.
2024-07-18meson/pgo: fix PGO build errors with recent meson(?) versionsDaniel Eklöf-2/+2
The back-reference to 'tokenize.c' in the parent directory causes PGO build failures, where gcc can't find the PGO data. Likely due to path/naming issues caused by meson's generated build directories.
2024-05-20config: add cursor.blink-rate optionDaniel Eklöf-1/+2
The default is 500ms, which corresponds to the old, hardcoded default. Closes #1707
2024-04-10config: add cursor.unfocused-styleDaniel Eklöf-0/+6
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
2024-02-06input/config: support *all* modifier namesDaniel Eklöf-10/+30
That is, allow custom modifiers (i.e. other than ctrl/shift/alt etc) in key bindings. This is done by no longer validating/translating modifier names to booleans for a pre-configured set of modifiers (ctrl, shift, alt, super). Instead, we keep the modifier *names* in a list, in the key binding struct. When a keymap is loaded, and we "convert" the key binding, _then_ we do modifier translation. For invalid modifier names, we print an error, and then ignore it. I.e. we no longer fail to load a config due to invalid modifier names. We also need to update how we determine the set of significant modifiers. Any modifier not in this list will be ignored when matching key bindings. Before this patch, we hardcoded this to shift/alt/ctrl/super. Now, to handle custom modifiers as well, we simply treat *all* modifiers defined by the current layout as significant. Typically, the only unwanted modifiers are "locked" modifiers. We are already filtering these out.
2024-02-05util: add streq() function and use in place of strcmp(...) == 0Craig Barnes-13/+11
2023-10-26config: improve validation of color values, default alpha to 0xffDaniel Eklöf-0/+4
Reject color values that aren't in either RGB, or ARGB format. That is, color values that aren't hexadecimal numbers with either 6 or 8 digits. Also, if a color value is allowed to have an alpha component, and the user left it out, default to 0xff (opaque) rather than 0x00 (fully transparent). Closes #1526
2023-07-31config: remove deprecated option 'utempter'Daniel Eklöf-1/+0
2023-07-28config: add tweak.bold-text-in-bright-amountDaniel Eklöf-3/+6
By how much to increase the luminance when brightening bold fonts. This was previously hard-coded to a factor of 1.3, which is now the default value of the new config option. Closes #1434
2023-07-14config: add csd.double-click-to-maximize=no|yes optionDaniel Eklöf-0/+2
When enabled, double-clicking the CSD titlebar will (un)maximize the window. Defaults to ‘yes’ (since this is the old hard-coded behavior). Closes #1293
2023-07-05input: add basic support for touchscreen inputCismonX-0/+16
Closes #517
2023-06-29config: dpi-aware: remove ‘auto’ value, and default to ‘no’Daniel Eklöf-11/+1
We now default to scaling fonts using the scaling factor, not monitor DPI. The ‘auto’ value for dpi-aware has been removed. Documentation (man pages and README) have been updated to reflect the new default.
2023-06-15test: config: add test for url.protocols optionDan Bungert-1/+45
2023-05-22test: config: add test for main.utmp-helper optionDaniel Eklöf-0/+1
2023-05-22utmp: rewrite utmp loggingDaniel Eklöf-1/+1
This patch generalizes the utmp support, to not only support libutempter, but also ulog (and in the future, even more interfaces). * Rename config option main.utempter to main.utmp-helper * Add meson option -Dutmp-backend=none|libutempter|ulog|auto * Rename meson option -Ddefault-utempter-path to -Dutmp-default-helper-path * utmp is no longer detected at compile time, but at runtime instead. Meson will configure the following pre-processor macros, based on the selected utmp backend: * UTMP_ADD - argument to pass to utmp helper when adding a record (starting foot) * UTMP_DEL - argument to pass to utmp helper when removing a record (exiting foot) * UTMP_DEL_HAVE_ARGUMENT - if defined, UTMP_DEL expects an extra argument ($WAYLAND_DISPLAY) * UTMP_DEFAULT_HELPER_PATH - path to the default utmp helper binary The documentation has been updated to mention which arguments are passed to the helper binary. Closes #1314
2023-03-31test: config: call FcIni() + FcFini()Daniel Eklöf-0/+2
Some of the config options we’re testing result in calls to FontConfig APIs. Without calling FcIni()+FcFini(), we leak memory: Direct leak of 768 byte(s) in 3 object(s) allocated from: #0 0x7f7e95cbfa89 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7f7e95bd1fe5 (/usr/lib/libfontconfig.so.1+0x20fe5) Indirect leak of 96 byte(s) in 3 object(s) allocated from: #0 0x7f7e95cbf411 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:77 #1 0x7f7e95bd63fd (/usr/lib/libfontconfig.so.1+0x253fd) Indirect leak of 19 byte(s) in 2 object(s) allocated from: #0 0x7f7e95c72faa in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:439 #1 0x7f7e95bd1898 in FcValueSave (/usr/lib/libfontconfig.so.1+0x20898)
2023-03-28fix typosHarri Nieminen-5/+5
2022-12-17config: add ‘font-size-adjustment=N[px|%]’ optionDaniel Eklöf-0/+1
This patch adds a new config option, font-size-adjustment. It lets you configure how much the font size should be incremented/decremented when zooming in or out (ctrl-+, ctrl+-). Values can be specified in points, pixels or percent. Closes #1188
2022-09-23Add support for creating utmp recordsDaniel Eklöf-0/+1
This patch adds support for creating utmp records using the ‘utempter’ helper binary from the ‘libutempter’ package. * New config option ‘main.utempter’ * New meson command line option, -Ddefault-utempter-path. Defaults to auto-detecting the path. The default value of the new ‘main.utempter’ config option depends on the meson command line option ‘-Ddefault-utempter-path’. If ‘main.utempter’ is *not* set to ‘none’, foot will try to execute the utempter helper binary to create utmp records when a new terminal is instantiated. The record is removed when the terminal instance is destroyed.
2022-08-20config: add setting for underline thicknessYorick Peterse-0/+1
This adds an "underline-thickness" setting to the "main" section, similar to the existing "underline-offset" setting. This setting is used to specify a custom height for regular (= non-cursor) underlines. Fixes #1136
2022-07-28config: add colors.search-box-{no-,}matchDaniel Eklöf-0/+6
Closes #1112
2022-07-28test: config: test colors.{jump-labels,scrollback-indicator}Daniel Eklöf-2/+52
2022-06-13test: config: new test for the new ‘environment’ sectionDaniel Eklöf-0/+37
2022-04-16config: add [csd].hide-when-maximized=yes|noDaniel Eklöf-0/+2
When enabled, the CSD titlebar will be hidden when the window is maximized. Closes #1019
2022-04-12config: config_free(): pass conf struct by pointer, not by-valueDaniel Eklöf-18/+18
2022-02-16tests: config: initial tests for text-bindingsDaniel Eklöf-0/+37
2022-02-09config: rename csd.color.close -> quitDaniel Eklöf-1/+1
This fixes a compilation error on FreeBSD: ../../foot/render.c:2055:45: error: no member named 'epoll_shim_close' in 'struct config::(anonymous at ../../foot/config.h:254:9)' conf_color = &term->conf->csd.color.close; ~~~~~~~~~~~~~~~~~~~~~ ^ /usr/local/include/libepoll-shim/epoll-shim/detail/common.h:8:15: note: expanded from macro 'close': #define close epoll_shim_close
2022-02-09config: ‘pipe’ is now optional ‘aux’ data in the key-binding structDaniel Eklöf-19/+21
This allows us to add helper functions that e.g. compare bindings’ aux data in a generic way.
2022-02-09config: rename enum config_key_binding_type -> key_binding_typeDaniel Eklöf-3/+3
2022-02-07tests: fix typo in error messageCraig Barnes-1/+1
2022-02-06meson: tests: config: add missing ‘wayland_client’ dependencyDaniel Eklöf-1/+1
Closes #918
2022-02-05fcft: adapt to API changes in fcft-3.xDaniel Eklöf-8/+9
Fcft no longer uses wchar_t, but plain uint32_t to represent codepoints. Since we do a fair amount of string operations in foot, it still makes sense to use something that actually _is_ a string (or character), rather than an array of uint32_t. For this reason, we switch out all wchar_t usage in foot to char32_t. We also verify, at compile-time, that char32_t used UTF-32 (which is what fcft expects). Unfortunately, there are no string functions for char32_t. To avoid having to re-implement all wcs*() functions, we add a small wrapper layer of c32*() functions. These wrapper functions take char32_t arguments, but then simply call the corresponding wcs*() function. For this to work, wcs*() must _also_ be UTF-32 compatible. We can check for the presence of the __STDC_ISO_10646__ macro. If set, wchar_t is at least 4 bytes and its internal representation is UTF-32. FreeBSD does *not* define this macro, because its internal wchar_t representation depends on the current locale. It _does_ use UTF-32 _if_ the current locale is UTF-8. Since foot enforces UTF-8, we simply need to check if __FreeBSD__ is defined. Other fcft API changes: * fcft_glyph_rasterize() -> fcft_codepoint_rasterize() * font.space_advance has been removed * ‘tags’ have been removed from fcft_grapheme_rasterize() * ‘fcft_log_init()’ removed * ‘fcft_init()’ and ‘fcft_fini()’ must be explicitly called
2022-01-13test: config: tweak.grapheme-shaping can’t be set when grapheme-clustering has been disabledDaniel Eklöf-0/+5
2022-01-13test: config: test ‘tweak’ sectionDaniel Eklöf-1/+70
2021-12-30test: config: colors: test ‘256’ is an invalid keyDaniel Eklöf-0/+2
2021-12-29test: config: test colors sectionDaniel Eklöf-1/+56
2021-12-29test: config: csd: test color optionsDaniel Eklöf-6/+12
2021-12-29test: config: add test_color() utility functionDaniel Eklöf-0/+34
2021-12-29test: config: test csd sectionDaniel Eklöf-0/+37
2021-12-29test: config: test mouse sectionDaniel Eklöf-0/+18
2021-12-29test: config: test cursor sectionDaniel Eklöf-0/+27
2021-12-29test: config: test URL sectionDaniel Eklöf-0/+24
2021-12-29test: config: rename ‘conf_ptr’ -> ‘ptr’Daniel Eklöf-21/+21
2021-12-29test: config: scrollback: test indicator-posititionDaniel Eklöf-1/+9
2021-12-29test: config: main: test dpi-aware, selection-target and initial-window-modeDaniel Eklöf-3/+27
2021-12-29test: config: add test_enum() utility functionDaniel Eklöf-0/+27
2021-12-26test: config: fix format specifier: uint32_t needs %u, not %huDaniel Eklöf-1/+1
2021-12-26test: config: test ‘scrollback’ sectionDaniel Eklöf-0/+20
2021-12-26test: config: add test_double() utility functionDaniel Eklöf-0/+37
2021-12-26test: config: add test_uint32() utility functionDaniel Eklöf-0/+37
2021-12-25test: config: bindings: verify pipe argvDaniel Eklöf-3/+39
2021-12-25test: config: test [bell].command (spawn template)Daniel Eklöf-2/+2
2021-12-25test: config: test [main].notify (spawn template)Daniel Eklöf-1/+2
2021-12-25test: config: add test_spawn_template() utility functionDaniel Eklöf-0/+42
2021-12-25test: config: ‘bell’ sectionDaniel Eklöf-0/+19
2021-12-18test: config: verify setting an empty key/mouse binding failsDaniel Eklöf-4/+10
2021-12-11test: config: verify collisions with the mouse override modifiers are detectedDaniel Eklöf-1/+11
2021-12-11test: config: port key/mouse binding tests to new APIDaniel Eklöf-217/+207
2021-12-11test: meson: add fontconfig to ‘test-config’ binary (fixes PGO builds)Daniel Eklöf-1/+1
2021-12-11test: config: mouse-bindingsDaniel Eklöf-4/+171
2021-12-11test: config: key-bindingsDaniel Eklöf-0/+218
This adds tests for all [key-bindings] options, as well as an invalid “action”. The tests also verify key combo collisions are detected correctly.
2021-12-11tests: meson: link with tllistDaniel Eklöf-1/+1
2021-12-11test: config: cover all basic (primitive) options in [main]Daniel Eklöf-14/+193
2021-12-11test: initial external unit test suite for ‘config.c’Daniel Eklöf-0/+101
This patch adds a separate (external) test binary with unit tests for config.c This is achieved by having the test’s source file include config.c (yes, the C file, not the header file). This allows us to call e.g. parse_section_*() directly, without having to go through config_load() (which requires having a readable file at “path”).
2020-10-10selection: use appropriate check for PRIMARY pasteSergey Nazaryev-1567/+0
Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD.