aboutsummaryrefslogtreecommitdiff
path: root/foot.ini (follow)
Commit message (Collapse)AuthorAgeLines
* foot.ini: `color-theme-switch-1`, `color-theme-switch-2` -> `color-theme-switch-dark`, `color-theme-Arnaudv62026-09-06-2/+2
| | | | foot.ini: `color-theme-switch-1`, `color-theme-switch-2` -> `color-theme-switch-dark`, `color-theme-switch-light`
* config: update default URL regexDaniel Eklöf2026-07-26-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
* doc: add fyi example configuration, as an alternative to notify-sendDaniel Eklöf2026-07-26-0/+5
| | | | Closes #2401
* config: add url.style=none|single|double|curly|dotted|dashedDaniel Eklöf2026-04-06-0/+1
| | | | | | | | | | | 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
* config: add [colors-dark] and [colors-light], replacing [colors] and [colors2]Daniel Eklöf2025-12-20-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...)
* config: add colors.dim-blend-towards=black|whiteDaniel Eklöf2025-10-10-0/+3
| | | | | | | | | | | | 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
* config: add 'uppercase-regex-insert'Ryan Roden-Corrent2025-08-31-0/+2
| | | | | | | | | | 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.
* conf: pad: add center-when-fullscreen and center-when-maximized-and-fullscreenDaniel Eklöf2025-05-24-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* config: gamma-correct-blending: disable by defaultDaniel Eklöf2025-05-01-0/+1
|
* config: add initial-color-theme=1|2Daniel Eklöf2025-04-26-0/+1
| | | | | | | | 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.
* key-bindings: add bindings to switch between color themesDaniel Eklöf2025-04-26-0/+3
| | | | | | * 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/+3
| | | | | | | | 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: move cursor.color to colors.cursorDaniel Eklöf2025-04-26-1/+2
|
* foot.ini: move alpha-mode to colors sectionDaniel Eklöf2025-04-18-2/+1
| | | | This is where the config parser expects it
* config: add alpha_mode optionFazzi2025-04-14-0/+2
|
* config: update default URL regexDaniel Eklöf2025-04-07-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
* config: add search-bindings.delete-to-{start,end} key bindingsAdrian fxj9a2025-03-05-0/+2
| | | | | | Defaults to ctrl+u and ctrl+k respectively. Closes #1972
* doc: improve regex exampleDaniel Eklöf2025-02-05-1/+1
|
* spawn template variables are on the form ${}, not {}Daniel Eklöf2025-02-05-1/+1
|
* url-mode: use the first *sub* expression as URLDaniel Eklöf2025-02-05-1/+1
| | | | | | | | 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.
* foot.ini: improve documentation of custom regexDaniel Eklöf2025-02-05-0/+8
|
* config+url: add support for user-defined regex patternsDaniel Eklöf2025-02-05-1/+3
| | | | | | | | | | | | | | | | | | | | | Users can now define their own regex patterns, and use them via key bindings: [regex:foo] regex=foo(bar)? launch=path-to-script-or-application {match} [key-bindings] regex-launch=[foo] Control+Shift+q regex-copy=[foo] Control+Mod1+Shift+q That is, add a section called 'regex:', followed by an identifier. Define a regex and a launcher command line. Add a key-binding, regex-launch and/or regex-copy (similar to show-urls-launch and show-urls-copy), and connect them to the regex with the "[regex-name]" syntax (similar to how the pipe-* bindings work).
* foot.ini+doc: add default value of url.regexDaniel Eklöf2025-02-05-1/+2
|
* url-mode+config: wip: add url.regex optionDaniel Eklöf2025-02-05-0/+2
|
* config: remove url.{uri-characters,protocols}Daniel Eklöf2025-02-05-2/+0
|
* key-bindings: add keypad variants to existing default key-bindingsDaniel Eklöf2025-01-31-5/+5
|
* Add support for the new Wayland protocol xdg-system-bellDaniel Eklöf2025-01-17-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.
* osc: add option to disable OSC-52, partially or fullyDaniel Eklöf2024-12-22-0/+3
| | | | Closes #1867
* quit should be in key-bindingscy2024-12-08-1/+1
|
* config: add color.sixelN optionsDaniel Eklöf2024-10-23-0/+18
| | | | These options allows you to configure the default sixel color palette.
* add setting for strikeout thicknessOleh Hushchenkov2024-08-26-0/+1
|
* feature: add resize-keep-grid to allow text reflow on font changesAndrew J. Hesford2024-08-20-0/+1
|
* osc: kitty notifications: add support for XDG sound namesDaniel Eklöf2024-08-04-1/+1
|
* osc: kitty notifications: implement s=silentDaniel Eklöf2024-08-04-1/+1
| | | | | | | | 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}
* osc: kitty notifications: cleanup and update to latest version of specDaniel Eklöf2024-08-02-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* osc: kitty notifications: buttons, icons, app-name, categories etcDaniel Eklöf2024-07-31-1/+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.
* notify: ${icon}: don't fallback to app-idDaniel Eklöf2024-07-30-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
* osc: kitty notifications: implement the 'close' requestDaniel Eklöf2024-07-25-0/+1
| | | | | | | | | | | | | | | | 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\\'
* config: notify-send: it's "action=label", not "action,label"Daniel Eklöf2024-07-24-1/+1
|
* notify: split up the ${action} template parameterDaniel Eklöf2024-07-23-1/+1
| | | | | | | | | 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
* notify: don't focus/report on notification dismissalDaniel Eklöf2024-07-23-1/+1
| | | | | | | | | | | | | | | | 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.
* osc: kitty notifications: implement focus|reportDaniel Eklöf2024-07-23-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* osc/notify: add support for OSC-99, kitty desktop notificationsDaniel Eklöf2024-07-23-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/
* input: don't map wheel events to BTN_{BACK,FORWARD}Daniel Eklöf2024-07-13-2/+4
| | | | | | | | | | | | | | | | | | | | 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
* foot.ini: add missing option resize-by-cellsDaniel Eklöf2024-06-08-0/+1
| | | | Closes #1731
* foot.ini: add commented out 'blink-rate'Daniel Eklöf2024-05-20-0/+1
|
* config: add new key-binding 'quit', unbound by defaultDaniel Eklöf2024-04-11-0/+1
| | | | Closes #1475
* doc: better examples for pipe-* commandsDaniel Eklöf2024-02-07-1/+1
|
* foot.ini: add pipe-command-output key bindingDaniel Eklöf2024-02-06-0/+1
|
* foot.ini: flash_alpha -> flash-alphaDaniel Eklöf2023-10-10-1/+1
|
* Enable the use of flash as visual bellRaimund Sacherer2023-10-10-0/+3
| | | | | | With this patch we can configure flash in the bell section. The colors section allow now to configure the color and translucency of the flash.
* config: add remaining search.scrollback key bindingsDaniel Eklöf2023-10-08-0/+10
| | | | All scrollback up/down key bindings are now available in search mode.
* foot.ini: document all the new search.extend* bindingsDaniel Eklöf2023-10-08-1/+7
|
* selection: add support for selecting the contents of a quoteDaniel Eklöf2023-09-19-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the default of triple clicking, from selecting the current logical row, to first trying to select the contents of the quote under the cursor, and if failing to find a quote, selecting the current row (like before). This is implemented by adding a new key binding, 'select-quote'. It will search for surrounding quote characters, and if one is found on each side of the cursor, the quote is selected. If not, the entire row is selected instead. Subsequent selection operations will behave as if the selection is either a word selection (a quote was found), or a row selection (no quote found). Escaped quote characters are not supported: "foo \" bar" will match 'foo \', and not 'foo " bar'. Mismatched quotes are not custom handled. They will simply not match. Nested quotes ("123 'abc def' 456") are supported. Closes #1364
* input: make wheel events mappableDaniel Eklöf2023-09-18-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Un-grabbed wheel events are now passed through the mouse binding matching logic, instead of being hardcoded to scrolling the terminal contents. They are mappable through the BTN_BACK and BTN_FORWARD buttons. Since they're not actually button *presses*, they never generate a click count other than 1. This limitation is documented, but not checked in the config. This means it's possible to create bindings like "BTN_BACK+3" (i.e. triple "click"). They will however never trigger. The old, hardcoded logic is now accessible through the new scrollback-up-mouse and scrollback-down-mouse mouse bindings. They (obiously) default to BTN_BACK and BTN_FORWARD, respectively. Example usage: keep the default of scrolling terminal contents with the wheel, when used without modifiers, but map Control+wheel to font zoom in/out: [mouse-bindings] font-increase=Control+BTN_FORWARD font-decrease=Control+BTN_BACK (this also keeps the default key bindings to zoom in/out; ctrl-+ and ctrl+-) Closes #1077
* themes: starlight: update to V4Daniel Eklöf2023-07-18-17/+17
| | | | | | | This also updates the default theme in foot, as well as the documentation. Closes #1409
* config: add csd.double-click-to-maximize=no|yes optionDaniel Eklöf2023-07-14-0/+1
| | | | | | | | | 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
* bind control-shift-u to unicode-input, move urls to oAntoine Beaupré2023-07-10-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a keybinding to invoke arbitrary unicode characters is very useful. It's often used as a method of last resort to communicate with people outside of your main language. For example, if you want to type the last letter of my real name, you can invoke the latin-1 character 0xe9 or unicode 0x00e9. You can also use this to type special characters, for example, unicode U+1F4A9 is of course, the infamous PILE OF POO, which is sure to produce million laughs everywhere you go. In foot, there's no keybinding by default to invoke the very useful unicode-input command. There is no "standard" (as in "ISO") keybinding this either. But there *is* a de-facto standard currently deployed by *both* GTK and Qt (a rare feat) *and* Chrome OS (an even rarer feat) and it's control-shift-u. Alternatives include Control-x 8 (emacs), Control V u (vim), Alt (Windows, LibreOffice), or Option (Mac). I doubt we want to adopt any of those. So let's use control-shift-u for this. Unfortunately, it's currently assigned to show-urls-launch, which is unfortunate, but insurmountable. We can reassign this keybinding elsewhere. I have picked control-shift-o in my configuration, because "o" is a good mnemonic for "open URLs". Others have suggested "m" instead. Closes: #1183
* input: add basic support for touchscreen inputCismonX2023-07-05-0/+3
| | | | Closes #517
* config: dpi-aware: remove ‘auto’ value, and default to ‘no’Daniel Eklöf2023-06-29-1/+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.
* correct csd section entry: hide-when-maximizedVladimir Bauer2023-06-27-1/+1
|
* .desktop: remove StartupWMClass from server, use distinct StartupWMClass for foot and footclientjdevdevdev2023-05-22-1/+1
| | | | | | | | | | | | | | | For this to work, the default app-id of footclient has been changed from ‘foot’ to ‘footclient’. By using distinct StartupWMClasses, the compositor can connect a running foot/footclient instance to the correct .desktop-file. This ensures the correct icon is being used in e.g. docks, and that actions like “open another window” works correctly. Note that the user can override the app-id, either by setting app-id in foot.ini, or with the -a,--app-id command line option. Closes #1355
* utmp: rewrite utmp loggingDaniel Eklöf2023-05-22-1/+2
| | | | | | | | | | | | | | | | | | | | | | | 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
* foot.ini: add font-size-adjustmentDaniel Eklöf2022-12-17-0/+1
|
* foot.ini: use a quoted, empty string for “indicator-format”Daniel Eklöf2022-12-06-1/+1
| | | | We don’t allow empty values, but we do allow quoted, empty values.
* Add support for creating utmp recordsDaniel Eklöf2022-09-23-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.
* config: change default ‘pad’ to 0x0 (i.e. no padding)Daniel Eklöf2022-09-03-1/+1
|
* theme: change default color theme to solarized-dark-normal-brightsDaniel Eklöf2022-08-22-17/+17
| | | | | | | | | This is my variant of the solarized theme, were only the first eight colors (i.e. the "normal") colors are from the solarized theme. The remaining eight (the "bright" colors) are brightened versions of the "normal" colors. This results in a theme that is usually in all applications, not just those that are "aware" that the terminal color theme is "solarized".
* config: add setting for underline thicknessYorick Peterse2022-08-20-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
* input: add new Unicode input modeDaniel Eklöf2022-07-29-0/+2
| | | | | | | | | | | | | | This mode is activated through the new key-bindings.unicode-input and search-bindings.unicode-input key bindings. When active, the user can “build” a Unicode codepoint by typing its hexadecimal value. Note that there’s no visual feedback in this mode. This is intentional. This mode is intended to be a fallback for users that don’t use an IME. Closes #1116
* config: add colors.search-box-{no-,}matchDaniel Eklöf2022-07-28-2/+4
| | | | Closes #1112
* osc: add support for OSC 133;A (prompt markers)Daniel Eklöf2022-06-16-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the OSC-133;A sequence, introduced by FinalTerm and implemented by iTerm2, Kitty and more. See https://iterm2.com/documentation-one-page.html#documentation-escape-codes.html. The shell emits the OSC just before printing the prompt. This lets the terminal know where, in the scrollback, there are prompts. We implement this using a simple boolean in the row struct ("this row has a prompt"). The prompt marker must be reflowed along with the text on window resizes. In an ideal world, erasing, or overwriting the cell where the OSC was emitted, would remove the prompt mark. Since we don't store this information in the cell struct, we can't do that. The best we can do is reset it in erase_line(). This works well enough in the "normal" screen, when used with a "normal" shell. It doesn't really work in fullscreen apps, on the alt screen. But that doesn't matter since we don't support jumping between prompts on the alt screen anyway. To be able to jump between prompts, two new key bindings have been added: prompt-prev and prompt-next, bound to ctrl+shift+z and ctrl+shift+x respectively. prompt-prev will jump to the previous, not currently visible, prompt, by moving the viewport, ensuring the prompt is at the top of the screen. prompt-next jumps to the next prompt, visible or not. Again, by moving the viewport to ensure the prompt is at the top of the screen. If we're at the bottom of the scrollback, the viewport is instead moved as far down as possible. Closes #30
* config: add a new ‘environment’ sectionDaniel Eklöf2022-06-13-0/+3
| | | | | | | | This section allows the user to define custom environment variables to be set in the child process: [environment] name=value
* config: add ctrl+shift+v and XF86 paste to SEARCH_CLIPBOARD_PASTEDaniel Eklöf2022-04-26-1/+1
| | | | | | | | | | | | | We now bind ctrl+v, ctrl+shift+v, ctrl+y and XF86Paste to pasting from the clipboard into the scrollback search buffer. Why all these? Because we can, and because all are common shortcuts for pasting: * ctrl+v: “normal” apps use this by default * ctrl+shift+v: used in terminals (including foot) * ctrl+y: Emacs * XF86Paste: special keyboard key, for pasting
* url-mode: add a key binding that enables “persistent” URL modeDaniel Eklöf2022-04-17-0/+1
| | | | | | | This is an alternative to ‘show-urls-launch’, where we stay in URL mode after activating an URL. Closes #964
* config: add [csd].hide-when-maximized=yes|noDaniel Eklöf2022-04-16-0/+1
| | | | | | | When enabled, the CSD titlebar will be hidden when the window is maximized. Closes #1019
* Small clarification/rewording of default color valuesMerlin Büge2022-04-06-1/+1
| | | | | | | | | This makes the example config `foot.ini` and its man page slightly more coherent regarding the specification of default values. Note that the cursor color is not hardcoded like e.g. foreground or background, thus in the example config, `<inverse foreground/background>` makes more sense.
* foot.ini: fix default value of dpi-aware (it’s ‘auto’)Daniel Eklöf2022-04-05-1/+1
|
* doc: foot.ini: align documented default value of uri-characters with realityDaniel Eklöf2022-04-05-1/+1
| | | | Fixes #1000
* foot.ini: change vim modeline from ‘conf’ to ‘dosini’merkix2022-03-13-1/+1
|
* foot.ini: move [text-bindings] section, and update exampleDaniel Eklöf2022-02-16-3/+3
| | | | Use Super+c -> Ctrl+c as example
* wip: map key combos to custom text strings (including escapes)Daniel Eklöf2022-02-16-0/+3
| | | | | | | | | | | | | With this, it is now possible to map key combos to custom escapes. The new bindings are defined in a new section, “text-bindings”, on the form “string=key combo”. The string can consist of printable characters, or \xNN style hex digits: [text-bindings] abcd = Control+a \x1b[A = Control+b Control+c Control+d # map ctrl+b/c/d to UP
* foot.ini: add modeline so vim uses # comments instead of ;Johannes Altmanninger2022-02-09-0/+2
| | | | | | | | | | | | | | | | | Editors like Vim and Kakoune ship filetypes dosini and ini respectively. Both use ";" as comment character, which is used for example by Vim's "gq" command which wraps lines while preserving comment prefixes. foot only accepts # comments. I think it's desirable to stick to a single commenting style (easier to diff configs). Make Vim accept that by adding modeline to use the "conf" filetype, which is for "generic Unix config files". We already have an Emacs modeline at the top, but Vim seems to ignore it. Kakoune doesn't have that filetype, but a patch has been proposed to use # whenever it already occurs in the file, see https://github.com/mawww/kakoune/pull/4537
* Merge branch 'support-copy-paste-keybindings-by-default'Daniel Eklöf2022-01-25-2/+2
|\
| * config: support Copy and Paste keycodes by defaultMark Stosberg2022-01-25-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | These work as expected and don't interfere with anything else. They are useful on the increasing number of keyboards with custom firmware. The keycodes enable using the same key combination for terminals as other apps. For example: by holding down a layer-switching key with a thumb, the Copy and Paste key codes can be assigned to the C and V keys on a secondary layer, making for a natural universal copy/paste key combination.
* | foot.ini: remove deprecated "bell" option.Mark Stosberg2022-01-17-1/+0
|/ | | | | | | | | The "bell" option has been deprecated for 9 months. The shipped `foot.ini` is used as a reference for setting up new configs and deprecated options should not be used in new configs. Further, the "bell=" option is no longer documented in `man foot.ini`, creating confusion.
* config, doc, changelog: move selection-override-modifiers to [mouse-bindings] and validate other ↵feeptr@codeberg.org2021-12-02-1/+1
| | | | | | case specifically, check for conflicts both when mouse bindings are set and when the selection-override-modifiers setting itself is set
* doc: document select-override-modsfeeptr@codeberg.org2021-12-02-0/+1
|
* config: add [colors].dim0-7Daniel Eklöf2021-11-13-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | This allows you to configure custom colors to be used when colors are being dimmed (`\E[2m`). It is implemented by color matching (just like bold-text-in-bright=palette-based); the color-to-be-dimmed is matched against the current color palette. If it matches one of the regular colors (colors 0-7), the corresponding “dim” color will be used. If it matches one of the bright colors (colors 8-15), the corresponding “regular” color will be used (but *only* if the “dim” color has been set). Otherwise, the color is dimmed by reducing its luminance. The default behavior, i.e. when dim0-7 hasn’t been configured, is to dim by reducing luminance for *all* colors. I.e. we don’t do any color matching at all. In particular, this means that dimming a bright color will *not* result in the corresponding “regular” color. Closes #776
* foot.ini: csd.border-color: <color> -> <csd.color>Daniel Eklöf2021-10-29-1/+1
|
* csd: add support for a visible borderDaniel Eklöf2021-10-27-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | When we’re using CSDs, we’ve up until now rendered a 5px invisible border. This border handles interactive resizing. I.e. hovering it changes the mouse cursor, and mouse button events are used to start an interactive resize. This patch makes it possible to color part of (or the entire) border, with a configurable color. To facilitate this, two new options have been added: * csd.border-width * csd.border-color border-width defaults to 0, resulting in the look we’re used to. border-color defaults to the title bar color. If the title bar color hasn’t been set, it defaults to the default foreground color (just like the title bar color does). This means that, setting border-width but not border-color, results in a border that blends with the title bar.
* config: add [key-bindings].noop actionDaniel Eklöf2021-10-27-0/+1
| | | | | | | Key combinations assigned to this action will not be sent to the application. Closes #765
* foot.ini: add commented out default value of colors.scrollback-indicatorDaniel Eklöf2021-10-10-0/+1
|
* config: add url.uri-charactersDaniel Eklöf2021-08-09-1/+2
| | | | | | | | | | | | This option specifies the characters allowed in the auto-detected URLs. Any character not in this set constitutes an URL delimiter, and will never be included in auto-detected URLs. This option does not affect OSC-8 URLs. Closes #654
* foot.ini: add csd.fontDaniel Eklöf2021-07-24-0/+1
|
* config: add locked-title=no|yesDaniel Eklöf2021-07-04-0/+4
| | | | Closes #386
* foot.ini: mention Control+c in default "cancel" key bindingsCraig Barnes2021-07-02-2/+2
| | | | | This should have been done as part of commit 6eb6668c3ccb1f8a5921d938bd41722b11c82a7e.
* config: add csd.button-color optionDaniel Eklöf2021-06-20-0/+1
| | | | | | | | This option controls the foreground color of the minimize/maximize/close buttons. I.e. the color used to draw the minimize/maximize/close glyphs. It defaults to default background color.
* config: add underline-offset optionDaniel Eklöf2021-06-17-0/+1
| | | | | | | | This option allows the user to configure a custom underline offset. That is, use the user provided offset instead of the font provided one. Closes #490
* config: notify: change default value to use ${app-id}Daniel Eklöf2021-05-27-1/+1
| | | | | Make the default value of ‘notify’ use ${app-id} for icon and application name.