aboutsummaryrefslogtreecommitdiff
path: root/doc (unfollow)
Commit message (Collapse)AuthorLines
2026-09-05doc: foot.ini: colors.cursor: tweak wording of the default valueDaniel Eklöf-1/+1
Try to make it clearer that it is the *current* fg/bg inversed, not the *default* fg/bg. Related: #2455
2026-09-02config: fix modifiers conflict checkCismonX-1/+1
Currently, if a mouse binding contains _any_ modifier key set in config 'selection-override-modifiers', it does not work since these modifiers get unset in function 'match_mouse_binding()'. Function 'resolve_key_binding_collisions()' is supposed to detect this and display an error message, however, it does not work unless the conflicting modifiers are identical. For example, given the following config options: selection-override-modifiers=Control+Shift select-begin-block=Control+BTN_LEFT Foot does not display an error message for this, but if you try to select text with 'Control+BTN_LEFT', it behaves as if only 'BTN_LEFT' is pressed. This is due to function 'modifiers_disjoint()' being implemented as "not equal" rather than "disjoint". Fixed by properly implementing this function. Also clarify the 'selection-override-modifiers' config option in the man page. As a side effect, this also fixes 'selection-override-modifiers=none' conflicting with mouse bindings that do not contain modifier keys (an empty set is disjoint with itself).
2026-07-30terminal: add visibility reportsTim Culverhouse-0/+12
Applications cannot infer whether their terminal view is observable from keyboard focus alone, so they may continue expensive rendering while the surface is hidden. Implement private mode 2033 and the one-shot visibility query. Report Wayland xdg_toplevel suspension as not visible and otherwise remain conservative by treating the terminal as potentially visible. Amp-Thread-ID: https://ampcode.com/threads/T-019fb2b7-f245-7124-a69a-1484812532bb Co-authored-by: Amp <amp@ampcode.com>
2026-07-26config: update default URL regexDaniel Eklöf-1/+1
* Allow single-quotes _inside_ URLs (but still not at the end) * Require at least one character inside balanced parenthesis or quotes. Closes #2417
2026-07-26doc: add fyi example configuration, as an alternative to notify-sendDaniel Eklöf-13/+29
Closes #2401
2026-06-20main/client: add --class, an alias for --app-idDaniel Eklöf-0/+6
This is to help e.g. scripts that wants to launch terminal instances in a terminal agnostic way. Many terminals were originally for X11, where the '--class' choice was obvious. When they were ported to Wayland, it made sense for them to keep the '--class' command line option, but have it set the application ID instead (since "class" is not a thing on Wayland). Let's add the alias, but minimally documented. We don't want to _encourage_ its use after all. Closes #2368
2026-04-06config: add url.style=none|single|double|curly|dotted|dashedDaniel Eklöf-0/+8
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-05doc: foot.ini: fix default value of initial-color-themeDaniel Eklöf-1/+1
Closes #2292
2026-03-02readme: update sixel screenshotDaniel Eklöf-0/+0
Closes #2215
2026-03-02Add support for background blurDaniel Eklöf-0/+8
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.
2026-03-02Spawning new terminal with --config from parent instanceStéphane Klein-0/+3
Reference: https://codeberg.org/dnkl/foot/issues/1622 Signed-off-by: Stéphane Klein <contact@stephane-klein.info>
2026-03-02support four-sided padding (left/top/right/bottom)pi66-2/+13
2026-03-02doc: foot.ini: mention titlebar text color in button-colornariby-2/+2
2026-03-02doc: fix typos in foot.ini.5.scdBarinderpreet Singh-21/+21
2025-12-20config: add [colors-dark] and [colors-light], replacing [colors] and [colors2]Daniel Eklöf-37/+28
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-12-01doc: remove duplicated ctrl+shift+w in foot(1)Whyme Lyu-3/+0
2025-11-12config: add toplevel-tag=TAGDaniel Eklöf-0/+15
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-24doc: foot.ini: fix typoAndrei-1/+1
2025-10-10config: add colors.dim-blend-towards=black|whiteDaniel Eklöf-2/+12
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-10render: when double-buffering, pre-apply previous frame's damage earlyDaniel Eklöf-0/+35
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
2025-10-05doc: foot.ini: document tweak.min-stride-alignmentDaniel Eklöf-0/+26
2025-08-31doc: foot.ini: typo: upppercase -> uppercaseDaniel Eklöf-1/+1
2025-08-31config: add 'uppercase-regex-insert'Ryan Roden-Corrent-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.
2025-08-01server/client: add support for sending SIGUSR to footclientDaniel Eklöf-3/+18
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
2025-07-30doc: foot.ini: mention SIGUSR1/SIGUSR2 and reference foot(1)Daniel Eklöf-1/+5
2025-07-30doc: foot: document SIGUSR1/SIGUSR2Daniel Eklöf-0/+15
2025-05-24conf: pad: add center-when-fullscreen and center-when-maximized-and-fullscreenDaniel Eklöf-8/+19
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
2025-05-05render: refactor to allow setting only selection bg or fgDaniel Eklöf-2/+1
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
2025-05-05doc: foot.ini: fix description of dark/light themesDaniel Eklöf-2/+2
2025-05-03config: tweak.surface-bit-depth: add support for 16-bit surfacesDaniel Eklöf-13/+16
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.
2025-05-01Paste URL/regex selection to prompt if key is uppercase.Ryan Roden-Corrent-3/+6
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.
2025-05-01config: tweak.surface-bit-depth now defaults to 'auto'Daniel Eklöf-19/+22
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
2025-05-01config: gamma-correct-blending: disable by defaultDaniel Eklöf-1/+1
2025-05-01config: tweak.surface-bit-depth now defaults to 'auto'Daniel Eklöf-19/+22
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
2025-05-01config: gamma-correct-blending: disable by defaultDaniel Eklöf-1/+1
2025-04-30doc: foot.ini: gamma-correct: tweak wording of 8- vs. 10-bit surfacesDaniel Eklöf-4/+5
2025-04-28doc: foot.ini: gamma-correct: tweak wording of 8- vs. 10-bit surfacesDaniel Eklöf-4/+5
2025-04-26config: add initial-color-theme=1|2Daniel Eklöf-0/+12
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.
2025-04-26csi: implement private mode 2031 (dark/light mode detection)Daniel Eklöf-0/+18
* 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
2025-04-26key-bindings: add bindings to switch between color themesDaniel Eklöf-0/+16
* 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
2025-04-26config: add new section 'colors2'Daniel Eklöf-0/+9
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'.
2025-04-26config: move cursor.color to colors.cursorDaniel Eklöf-9/+9
2025-04-19doc: foot.ini: add newish Unicode range to 'box-drawings-uses-font-glyphs'Daniel Eklöf-0/+1
2025-04-19doc: foot.ini: spaces -> tab (for indentation)Daniel Eklöf-1/+1
2025-04-19doc: foot.ini: gamma-correct-blending: mention colors being offDaniel Eklöf-7/+8
2025-04-18doc: foot.ini: key-bindings: untranslated symbols are tried before translatedDaniel Eklöf-8/+9
2025-04-14doc: foot.ini: add colors.alpha-modeDaniel Eklöf-0/+15
2025-04-14doc: foot.ini: workers: "if you have a ridiculous number of cores"Daniel Eklöf-0/+4
2025-04-07config: update default URL regexDaniel Eklöf-1/+1
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
2025-03-31doc: foot.ini: mention virtual modifiers are allowedDaniel Eklöf-1/+2
2025-03-23doc: foot.ini: gamma-correct: move sectionDaniel Eklöf-5/+5
2025-03-23render: dim and brighten using linear rgb interpolationSam McCall-4/+7
Adds setting tweak.dim-amount, similar to bold-text-in-bright-amount. Closes #2006
2025-03-17doc: foot.ini: codespell: shouuld -> should1.21.0releases/1.21Daniel Eklöf-1/+1
2025-03-17doc: foot.ini: codespell: shouuld -> shouldDaniel Eklöf-1/+1
2025-03-17doc: foot.init: surface-bit-depth: mention 10-bit surfaces are slowDaniel Eklöf-0/+3
2025-03-12fcft: require fcft >= 3.3.0, add support for new scaling-filtersDaniel Eklöf-3/+2
Update tweak.scaling-filter to recognize the new scaling filters added in fcft-3.3.0. Since fcft_set_scaling_filter() is deprecated in 3.3.0, don't use it anymore, and set the scaling filter via fcft_font_options instead.
2025-03-05render: gamma-correct blendingDaniel Eklöf-0/+46
This implements gamma-correct blending, which mainly affects font rendering. The implementation requires compile-time availability of the new color-management protocol (available in wayland-protocols >= 1.41), and run-time support for the same in the compositor (specifically, the EXT_LINEAR TF function and sRGB primaries). How it works: all colors are decoded from sRGB to linear (using a lookup table, generated in the exact same way pixman generates it's internal conversion tables) before being used by pixman. The resulting image buffer is thus in decoded/linear format. We use the color-management protocol to inform the compositor of this, by tagging the wayland surfaces with the 'ext_linear' image attribute. Sixes: all colors are sRGB internally, and decoded to linear before being used in any sixels. Thus, the image buffers will contain linear colors. This is important, since otherwise there would be a decode/encode penalty every time a sixel is blended to the grid. Emojis: we require fcft >= 3.2, which adds support for sRGB decoding color glyphs. Meaning, the emoji pixman surfaces can be blended directly to the grid, just like sixels. Gamma-correct blending is enabled by default *when the compositor supports it*. There's a new option to explicitly enable/disable it: gamma-correct-blending=no|yes. If set to 'yes', and the compositor does not implement the required color-management features, warning logs are emitted. There's a loss of precision when storing linear pixels in 8-bit channels. For this reason, this patch also adds supports for 10-bit surfaces. For now, this is disabled by default since such surfaces only have 2 bits for alpha. It can be enabled with tweak.surface-bit-depth=10-bit. Perhaps, in the future, we can enable it by default if: * gamma-correct blending is enabled * the user has not enabled a transparent background
2025-03-05config: add search-bindings.delete-to-{start,end} key bindingsAdrian fxj9a-0/+12
Defaults to ctrl+u and ctrl+k respectively. Closes #1972
2025-02-19config+render: allow cursor.style=hollowDaniel Eklöf-2/+2
Closes #1965
2025-02-16doc: foot.ini: font: add one more fontfeatures exampleDaniel Eklöf-0/+7
Add a fontfeatures example where we: * set multiple features * assign a value to the features (as opposed to just enabling a boolean feature)
2025-02-10doc: foot.ini: fix 'hashes' regex exampleDaniel Eklöf-2/+2
It's A-F, not A-f
2025-02-06doc: ctlseq: add OSC 66 (kitty text sizing)Daniel Eklöf-1/+4
2025-02-05doc: regex: custom regex's aren't URLsDaniel Eklöf-4/+4
2025-02-05doc: improve regex exampleDaniel Eklöf-9/+10
2025-02-05spawn template variables are on the form ${}, not {}Daniel Eklöf-2/+2
2025-02-05url-mode: use the first *sub* expression as URLDaniel Eklöf-4/+11
When auto-matching URLs (or custom regular expressions), use the first *subexpression* as URL, rather than the while regex match. This allows us to write custom regular expressions with prefix/suffix strings that should not be included in the presented match.
2025-02-05doc: foot.ini: document custom regular expressionsDaniel Eklöf-1/+57
2025-02-05foot.ini+doc: add default value of url.regexDaniel Eklöf-1/+1
2025-02-05url-mode+config: wip: add url.regex optionDaniel Eklöf-0/+5
2025-02-05config: remove url.{uri-characters,protocols}Daniel Eklöf-13/+0
2025-01-31key-bindings: add keypad variants to existing default key-bindingsDaniel Eklöf-5/+8
2025-01-27doc: foot.ini: describe key binding match logicDaniel Eklöf-2/+31
2025-01-18doc: ctlseqs: remove 'CSI 21 t'Daniel Eklöf-3/+0
2025-01-17Add support for the new Wayland protocol xdg-system-bellDaniel Eklöf-11/+18
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.
2025-01-07doc: ctlseqs: remove 'CSI 21 t'Daniel Eklöf-3/+0
2024-12-22osc: add option to disable OSC-52, partially or fullyDaniel Eklöf-0/+27
Closes #1867
2024-10-25docs: document more default bindings in search scrollback mode.Mark Stosberg-2/+56
These were introduced by #1496 but not fully documented then.
2024-10-23config: add color.sixelN optionsDaniel Eklöf-0/+6
These options allows you to configure the default sixel color palette.
2024-09-13toplevel-icon: implement OSC-1, CSI 20/21/22/23 tDaniel Eklöf-4/+18
* The toplevel icon is now set to the app-id, unless "overridden" by OSC-1 or OSC-0. * Implemented OSC-1 * OSC-0 extended to also set the icon * Implemented CSI 20 t - report window icon * Implemented CSI 21 t - report window title * Implemented CSI 22 ; 1 t - push window icon * Implemented CS 23 ; 1 t - pop window icon * Extended CSI 22/23 ; 0 t to also push/pop the icon * Verify app-id set by OSC-176 is valid UTF-8 * Verify icon set by OSC-0/1 is valid UTF-8
2024-08-26add setting for strikeout thicknessOleh Hushchenkov-0/+12
2024-08-20feature: add resize-keep-grid to allow text reflow on font changesAndrew J. Hesford-0/+12
2024-08-09doc: foot.ini: document the Unicode ranges covered by the builtin glyphsDaniel Eklöf-3/+11
2024-08-04osc: kitty notifications: add support for XDG sound namesDaniel Eklöf-0/+7
2024-08-04osc: kitty notifications: implement s=silentDaniel Eklöf-0/+6
This implements part of the new 's' (sound) parameter; the 'silent' value. When s=silent, we set the ${muted} template argument to "true". It is intended to set the 'suppress-sound' hint: notify-send --hint BOOLEAN:suppress-sound:${muted}
2024-08-02doc: foot.ini: codespell: furhermore -> furthermoreDaniel Eklöf-1/+1
2024-08-02osc: kitty notifications: cleanup and update to latest version of specDaniel Eklöf-25/+49
* 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-16/+104
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-30notify: ${icon}: don't fallback to app-idDaniel Eklöf-1/+1
* Revert --icon to ${app-id} * Use --hint STRING:image-path:${icon} instead * ${icon} no longer expands to ${app-id} if notification has no icon
2024-07-26notify: close notification by sending SIGINT to helperDaniel Eklöf-0/+5
If the user hasn't configured a custom 'desktop-notifications.close' command, try to close the notification by sending SIGINT to the notification helper. This is best-effort: * If there's no helper running, we do nothing (except warn) * We don't verify, in any way, the notification is actually closed * We don't send any other signals, under any circumstances. That is, no SIGTERM, no SIGKILL. Ever.
2024-07-25osc: kitty notifications: implement the 'close' requestDaniel Eklöf-0/+12
Add a new config option, desktop-notifications.close, defining what to execute to close a notification. It has a single template parameter, ${id}, that is expanded to the external notification ID foot may have picked up from the notification helper. notify-send does not support closing notifications, and it appears impossible to pass an *unsigned* integer as argument to gdbus. Hence no default value for the new 'close' option. Example: printf '\e]99;i=123;this is a notification\e\\' printf '\e]99;i=123:p=close;\e\\'
2024-07-24notify: try to read the daemon assigned notification ID from stdoutDaniel Eklöf-0/+15
And document the things we recognize in the notification helper's stdout.
2024-07-24config: notify-send: it's "action=label", not "action,label"Daniel Eklöf-1/+1
2024-07-23notify: split up the ${action} template parameterDaniel Eklöf-8/+6
Split it up into two, ${action-name} and ${action-label}. Dunstify, for example, has a different syntax compared to notify-send: notify-send: default=foobar dunstify: default,foobar
2024-07-23doc: foot.ini: desktop-notification: remove 'notification dismissal'Daniel Eklöf-16/+3
2024-07-23notify: don't focus/report on notification dismissalDaniel Eklöf-5/+26
Only do it when the notification was activated. Here, activated means the 'click to activate' notification action was triggered. How do we tie everything together? First, we add a new template parameter, ${action}. It's intended to be used with e.g. notify-send's --action option. When the action is triggered, notify-send prints its name on stdout, on a separate line. Look for this in stdout. Only if we've seen it do we focus/report the notification.
2024-07-23notify: XDG token is now expected to be prefixed with xdgtoken=Daniel Eklöf-5/+8
This patch modifies our stdout reader to consume input as we go, instead of all at once when stdout is closed. This will make it easier to add support for reading e.g. the daemon assigned notification ID in the future, and also ensures we see the XDG activation token "as soon as possible". Furthermore, to be more future proof, require the XDG activation token to be prefixed with 'xdgtoken=', and ignore other lines. Thus, instead of treating *all* of stdout as the XDG activation token, parse stdout line-by-line, and ignore everything that does not begin with 'xdgtoken='. Everything (on that line) following 'xdgtoken=' is treated as the activation token.
2024-07-23osc: kitty notifications: implement focus|reportDaniel Eklöf-30/+86
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-23osc/notify: add support for OSC-99, kitty desktop notificationsDaniel Eklöf-1/+1
This adds limited support for OSC-99, kitty desktop notifications[^1]. We support everything defined by the "protocol", except: * 'a': action to perform on notification activation. Since we don't trigger the notification ourselves (over D-Bus), we don't know a) which ID the notification got, or b) when it is clicked. * ... and that's it. Everything else is supported To be explicit, we *do* support: * Chunked notifications (d=0|1), allowing the application to append data to a notification in chunks, before it's finally displayed. * Plain UTF-8, or base64-encoded UTF-8 payload (e=0|1). * Notification identifier (i=xyz). * Payload type (p=title|body). * When to honor the notification (o=always|unfocused|invisible), with the following quirks: - we don't know when the window is invisible, thus it's treated as 'unfocused'. - the foot option 'notify-focus-inhibit' overrides 'always' * Urgency (u=0|1|2) [^1]: https://sw.kovidgoyal.net/kitty/desktop-notifications/
2024-07-19csi: in-band window resize notifications, private mode 2048Daniel Eklöf-0/+3
This implements https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83, in-band window resize notifications. When user enables private mode 2048 (in-band resize notifications), *always* send current size, even if the mode is already active. This ensures applications can rely on getting a reply from the terminal.
2024-07-13input: don't map wheel events to BTN_{BACK,FORWARD}Daniel Eklöf-10/+13
BTN_BACK and BTN_FORWARD are separate buttons. The scroll wheel don't have any button mappings in libinput/wayland, so make up our own defines. This allows us to map them in mouse bindings. Also expose BTN_WHEEL_{LEFT,RIGHT}. These were already defined, and used, internally, to handle wheel tilt events. With this, they can also be used in mouse bindings. Finally, fix encoding used for BTN_{BACK,FORWARD} when sending mouse button events to the client application. Before this, they were mapped to buttons 4/5. But, button 4/5 are for the scroll wheel, and as mentioned above, BTN_{BACK,FORWARD} are not the same as scroll wheel "buttons". Closes #1763