aboutsummaryrefslogtreecommitdiff
path: root/config.h (follow)
Commit message (Collapse)AuthorAgeLines
* conf: pad: add center-when-fullscreen and center-when-maximized-and-fullscreenDaniel Eklöf2025-05-24-1/+9
| | | | | | | | | | | | | | | | | | | | 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
* render: refactor to allow setting only selection bg or fgDaniel Eklöf2025-05-05-1/+0
| | | | | | | | | | | | 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
* config: tweak.surface-bit-depth: add support for 16-bit surfacesDaniel Eklöf2025-05-03-1/+2
| | | | | | | | | 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.
* config: tweak.surface-bit-depth now defaults to 'auto'Daniel Eklöf2025-05-01-1/+7
| | | | | | | | | | | 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-3/+1
|
* config: add initial-color-theme=1|2Daniel Eklöf2025-04-26-0/+6
| | | | | | | | 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.
* config: add new section 'colors2'Daniel Eklöf2025-04-26-0/+1
| | | | | | | | 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-5/+7
|
* config: refactor: break out 'colors' to a color_theme structDaniel Eklöf2025-04-26-52/+54
|
* config+render: move alpha-mode to colors.alpha-mode, fix cursor handlingDaniel Eklöf2025-04-14-2/+6
| | | | | | | | | | 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.
* config: add alpha_mode optionFazzi2025-04-14-0/+2
|
* render: dim and brighten using linear rgb interpolationSam McCall2025-03-23-0/+4
| | | | | | Adds setting tweak.dim-amount, similar to bold-text-in-bright-amount. Closes #2006
* render: gamma-correct blendingDaniel Eklöf2025-03-05-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* config+render: allow cursor.style=hollowDaniel Eklöf2025-02-19-1/+1
| | | | Closes #1965
* config+url: add support for user-defined regex patternsDaniel Eklöf2025-02-05-0/+12
| | | | | | | | | | | | | | | | | | | | | 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).
* url-mode+config: wip: add url.regex optionDaniel Eklöf2025-02-05-1/+5
|
* config: remove url.{uri-characters,protocols}Daniel Eklöf2025-02-05-5/+0
|
* 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/+9
| | | | Closes #1867
* config: add color.sixelN optionsDaniel Eklöf2024-10-23-0/+1
| | | | These options allows you to configure the default sixel color palette.
* add setting for strikeout thicknessOleh Hushchenkov2024-08-26-0/+2
|
* feature: add resize-keep-grid to allow text reflow on font changesAndrew J. Hesford2024-08-20-0/+1
|
* osc: kitty notifications: buttons, icons, app-name, categories etcDaniel Eklöf2024-07-31-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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\\'
* osc: kitty notifications: implement focus|reportDaniel Eklöf2024-07-23-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* config: codespell: varios -> variousDaniel Eklöf2024-06-08-1/+1
|
* config: add cursor.blink-rate optionDaniel Eklöf2024-05-20-1/+4
| | | | | | The default is 500ms, which corresponds to the old, hardcoded default. Closes #1707
* config: add cursor.unfocused-styleDaniel Eklöf2024-04-10-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
* Don't use fancy Unicode quotes, stick to ASCIIDaniel Eklöf2024-02-06-1/+1
|
* input/config: support *all* modifier namesDaniel Eklöf2024-02-06-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* feature: add resize-by-cells option to constrain window sizes...Andrew J. Hesford2024-02-05-0/+3
| | | | | ...to multiples of the cell size, and preserve grid size when changing fonts or display scales in floating windows.
* 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 tweak.bold-text-in-bright-amountDaniel Eklöf2023-07-28-0/+1
| | | | | | | | 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
* 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
* input: add basic support for touchscreen inputCismonX2023-07-05-0/+4
| | | | 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.
* .desktop: remove StartupWMClass from server, use distinct StartupWMClass for foot and footclientjdevdevdev2023-05-22-1/+2
| | | | | | | | | | | | | | | 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/+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
* config: remove unused structDaniel Eklöf2023-01-15-5/+0
|
* config: add ‘font-size-adjustment=N[px|%]’ optionDaniel Eklöf2022-12-17-0/+6
| | | | | | | | | | | 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
* Add support for creating utmp recordsDaniel Eklöf2022-09-23-0/+2
| | | | | | | | | | | | | | | | | 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: 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
* config: add colors.search-box-{no-,}matchDaniel Eklöf2022-07-28-0/+14
| | | | Closes #1112
* config: add a new ‘environment’ sectionDaniel Eklöf2022-06-13-0/+8
| | | | | | | | This section allows the user to define custom environment variables to be set in the child process: [environment] name=value
* key-binding: new API, for handling sets of key bindingsDaniel Eklöf2022-04-17-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, our Wayland seats have been tracking key bindings. This makes sense, since the seat’s keymap determines how the key bindings are resolved. However, tying bindings to the seat/keymap alone isn’t enough, since we also depend on the current configuration (i.e. user settings) when resolving a key binding. This means configurations that doesn’t match the wayland object’s configuration, currently don’t resolve key bindings correctly. This applies to footclients where the user has overridden key bindings on the command line (e.g. --override key-bindings.foo=bar). Thus, to correctly resolve key bindings, each set of key bindings must be tied *both* to a seat/keymap, *and* a configuration. This patch introduces a key-binding manager, with an API to add/remove/lookup, and load/unload keymaps from sets of key bindings. In the API, sets are tied to a seat and terminal instance, since this makes the most sense (we need to instantiate, or incref a set whenever a new terminal instance is created). Internally, the set is tied to a seat and the terminal’s configuration. Sets are *added* when a new seat is added, and when a new terminal instance is created. Since there can only be one instance of each seat, sets are always removed when a seat is removed. Terminals on the other hand can re-use the same configuration (and typically do). Thus, sets ref-count the configuration. In other words, when instantiating a new terminal, we may not have to instantiate a new set of key bindings, but can often be incref:ed instead. Whenever the keymap changes on a seat, all key bindings sets associated with that seat reloads (re-resolves) their key bindings. Closes #931
* config: add [csd].hide-when-maximized=yes|noDaniel Eklöf2022-04-16-0/+2
| | | | | | | When enabled, the CSD titlebar will be hidden when the window is maximized. Closes #1019
* config: config_free(): pass conf struct by pointer, not by-valueDaniel Eklöf2022-04-12-1/+1
|
* config: add tweak option to allow disabling sixelsjvoisin2022-04-06-0/+1
| | | | Closes #950
* wip: map key combos to custom text strings (including escapes)Daniel Eklöf2022-02-16-0/+11
| | | | | | | | | | | | | 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
* config: rename csd.color.close -> quitDaniel Eklöf2022-02-09-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
* config: ‘pipe’ is now optional ‘aux’ data in the key-binding structDaniel Eklöf2022-02-09-3/+12
| | | | | This allows us to add helper functions that e.g. compare bindings’ aux data in a generic way.
* config: rename enum config_key_binding_type -> key_binding_typeDaniel Eklöf2022-02-09-1/+1
|
* config: move structs and enums used by config from terminal.h -> config.hDaniel Eklöf2022-02-09-2/+10
|
* fcft: adapt to API changes in fcft-3.xDaniel Eklöf2022-02-05-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* config: convert tweak.render_timer to an enumDaniel Eklöf2022-01-13-2/+6
|
* config: remove commented out struct definitionDaniel Eklöf2021-12-11-15/+0
|
* config: unify key- and mouse bindingsDaniel Eklöf2021-12-11-2/+21
| | | | | | | | | | | | | | With this patch, key- and mouse-bindings structs (the non-layout specific ones) are unified into a single struct. The logic that parses, and manages, the key- and mouse binding lists are almost identical. The *only* difference between a key- and a mouse binding is that key bindings have an XKB symbol, and mouse bindings a button and click-count. The new, unified, struct uses a union around these, and all functions that need to know which members to use/operate on now takes a ‘type’ parameter.
* config: do mouse binding collision detection after loading the confDaniel Eklöf2021-12-11-1/+5
|
* config: do key binding collision detection after loading the confDaniel Eklöf2021-12-11-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows the user to write, to swap two key bindings: [key-bindings] show-urls-launch=Control+Shift+r search-start=Control+Shift+u instead of: [key-bindings] search-start=none show-urls-launch=Control+Shift+r search-start=Control+Shift+u This should simplify the configuration for people who replace a lot of the default key bindings. This also simplifies the parsing somewhat, since we no longer has to parse a key-binding into a temporary list, ensure it doesn’t have any collisions, and then copy it into the actual key binding list. _While_ parsing a key-binding, we still need a temporary array (at least for the time being), but that temporary array is no longer visible outside the parsing function that allocates it.
* config, input: allow configuring select-override modifiersfeeptr@codeberg.org2021-12-02-0/+1
|
* config: add tweak.grapheme-width-method=maxDaniel Eklöf2021-11-23-1/+5
| | | | | | ‘max’ is a new value for ‘tweak.grapheme-width-method’. When enabled, the width of a grapheme cluster is that of the cluster’s widest codepoint.
* config: add [colors].dim0-7Daniel Eklöf2021-11-13-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* config: add value_to_dimensions()Daniel Eklöf2021-11-13-2/+2
|
* config: add {str,value}_to_uint{16,32}()Daniel Eklöf2021-11-13-10/+10
| | | | | This allows us to pass the final pointer directly to the conversion functions, as well as allowing us to print outside-range errors.
* csd: add support for a visible borderDaniel Eklöf2021-10-27-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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, render: scrollback indicator: allow configuring scrollback indicator colorsfeeptr@codeberg.org2021-10-09-0/+6
|
* notify: add the notify-focus-inhibit config optionMitja Horvat2021-10-06-0/+1
| | | | | | | | | | | | | | | foot doesn't show desktop notifications (via OSC777) if the current terminal has keyboard focus. This is probably a sane default, but there are use cases where showing a notification regardless of the focus status may be desired. For example, a completion notification of a long running task inside a non-focused tmux window. This PR adds the notify-focus-inhibit option which can be used to disable inhibition of notifications when the window has focus. The default value is `yes`, which retains the old behavior.
* server: no need to clone the config to handle -N,--no-waitDaniel Eklöf2021-09-05-1/+0
|
* main: verify primary font is monospaced at startupDaniel Eklöf2021-08-31-0/+4
| | | | | | | | | | Load a couple of ASCII glyphs and check if their advance widths matches. If not, warn the user that the font is probably not monospaced. This can be disabled by setting tweak.font-monospace-warn=no. Closes #704.
* terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRSDaniel Eklöf2021-08-17-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of 2021-07-31, ncurses ships its own version of foot’s terminfo. Since: * It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb capabilities. * It doesn’t set hs,fsl,dsl (statusbar). * We want to be able to update our termminfo without waiting for an ncurses release. * Foot should be installable and usable on Linux systems that doesn’t have the latest ncurses. we still want to ship our own version. We can however not install it to the default terminfo location (e.g. /usr/share/terminfo), since it will collide with the ncurses provided files. Our options are to either rename our terminfo to something else, or to keep the name, but install our terminfo files somewhere else. The first option would be the easy one. However, I think it makes sense to use the same name. For example, a user that SSH’s into a remote system that does *not* have our own version installed, but *does* have the ncurses one, will gracefully fall back to that one, which is better than manually having to set e.g. TERM=xterm-256color. Now, if we want to use the same name, we need to install it somewhere else. But where? And how do we ensure our version is preferred over the ncurses one? I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by default. It makes it namespaced to foot (i.e. we’re not introducing a new “standard” terminfo location), thus guaranteeing it wont collide with ncurses. To enable applications to find it, we export TERMINFO_DIRS. This is a list of *additional* directories to search for terminfo files. If it’s already defined, we *append* to it. The nice thing with this is, if there’s no terminfo in that location (e.g. when you SSH into a remote), the default terminfo location is *also* searched. But only *after* having searched through TERMINFO_DIRS. In short: our version is preferred, but the ncurses one (or an older version of our terminfo package!) will be used if ours cannot be found. To enable packagers full control over the new behavior, the existing meson command line options have been modified, and a new option added: -Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo files. -Dcustom-terminfo-install-location=<path>: *where* the terminfo files are expected to be found. This *needs* to be set *even* if -Dterminfo=disabled. For example, if the packaging script builds and packages the terminfo files separate from the regular foot build. The path is *relative to $prefix*, and defaults to $datadir/foot/terminfo. This is the value that will be appended to TERMINFO_DIRS. Note that you can set it to ‘no’, in which case foot will *not* set/modify TERMINFO_DIRS. Only do this if you don’t intend to package foot’s terminfo files at all (i.e. you plan on using the ncurses ones only). -Ddefault-terminfo=foot. Allows overriding the default TERM value. This should only be changed if the target platform doesn’t support terminfo files. Closes #671
* config: add url.uri-charactersDaniel Eklöf2021-08-09-0/+1
| | | | | | | | | | | | 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
* config: add csd.font optionDaniel Eklöf2021-07-24-0/+2
|
* render: Allow cells to bleed into their neighborTimur Celik2021-07-17-2/+1
| | | | | | | | | | | | | | | | This patch adds a `confined` flag to each cell to track if the last rendered glyph bled into it's right neighbor. To keep things simple, bleeding into any other neighbor cell than the immediate right one is not allowed. This should cover most use cases. Before rendering a row we now do a prepass and mark all cells unclean that are affected by a bleeding neighbor. If there are consecutive bleeding cells, the whole group must be re-rendered even if only a single cell has changed. The patch also deprecates both old overflowing glyph options *allow-overflowing-double-width-glyphs* and *pua-double-width* in favor of a single new one named *overflowing-glyphs*.
* config: add locked-title=no|yesDaniel Eklöf2021-07-04-0/+1
| | | | Closes #386
* config: rename at-most-2 (value for grapheme-width-method) to double-widthDaniel Eklöf2021-07-01-1/+1
|
* config: add tweak.grapheme-width-method=wcswidth|at-most-2Daniel Eklöf2021-07-01-0/+1
|
* wip: grapheme shapingDaniel Eklöf2021-06-24-0/+2
|
* config: add new function config_clone()Daniel Eklöf2021-06-23-3/+7
|
* tokenize: strdup() each individual argvDaniel Eklöf2021-06-20-1/+0
| | | | | Instead of referencing the un-tokenized “raw” command string, strdup() each argv. This way, the input string can be ‘const’.
* config: add csd.button-color optionDaniel Eklöf2021-06-20-0/+2
| | | | | | | | 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: don’t use tllist where it isn’t necessaryDaniel Eklöf2021-06-18-9/+15
| | | | | | | | | | | | | | | | tllists are great when dealing with dynamically changing lists. They are also very easy to use when building lists/arrays where the final size is unknown. However, this ease of use comes at a price: code size. tll-macros expand to a lot of code. Since things in the config are static, once the config has been loaded, using tllists for configuration data structures doesn’t make much sense. This patch replaces nearly all tllists used by the configuration, with dynamically allocated arrays.
* config: add underline-offset optionDaniel Eklöf2021-06-17-0/+3
| | | | | | | | 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
* Replace tab indents with spaces in config.hCraig Barnes2021-06-12-2/+2
|
* Override options from command lineRyan Farley2021-06-12-1/+6
| | | | | | | | | Allow any configuration option to be overridden with -o/--override 'section.key=value' arguments, as suggested in #554 update completitions for override slight refactoring to ease footclient support
* config: add boolean option tweak.pua-double-widthDaniel Eklöf2021-06-01-0/+1
| | | | | | | When enabled, PUA (Private Usage Area) codepoints are always treated as double-width glyphs, regardless of the actual glyph width. Requires allow-overflowing-double-width-glyphs=yes
* config: add url.protocolsDaniel Eklöf2021-05-22-0/+3
| | | | | | | This makes the protocols recognized by auto-detected URLs configurable. Closes #531
* config: move url-mode related options to a dedicated section, ‘url’Daniel Eklöf2021-05-22-7/+10
|
* config: add cursor.underline-thicknessDaniel Eklöf2021-05-22-0/+1
| | | | | | | | | | | | | Works in pretty much the same way as ‘beam-thickness’, except that the default value is “the font’s underline thickness”. This means, that when unset, the cursor underline thickness scales with the font size. But, when explicitly set, either to a point size value, or a pixel size, it remains fixed at that size. Closes #524
* config: add tweak.box-drawing-solid-shades=yes|noDaniel Eklöf2021-05-17-0/+1
| | | | | | | | | | When enabled, shades are rendered as solid blocks, using a darker variant of the current foreground color. When disabled, shades are instead rendered in a checker box pattern, using the foreground color unmodified. Default is enabled.
* config: avoid tll() code expansion when generating default bindingsDaniel Eklöf2021-05-07-1/+2
| | | | | | | | | | | | | tll_push_back() is a macro that results in quite a lot of instructions. Expanding this macro explicitly in many places thus causes code explosion. This is what happened in when we generate the default key/mouse bindings. Fix by calling tll_push_back() in a no-inline function. Reduces code size with ~4-5K
* enhanced bell configurationRyan Farley2021-05-07-6/+7
| | | | | | | | | | Add a separate section for bell configuration, with a bell-specific command option and a setting to allow that command to run without regard to keyboard focus (for those of us who enjoy being beeped at at all times, for example). The actions are also no longer mutually exclusive; this is primarily anticipating urgency support which cannot be replicated outside the process (in server mode anyway) and would thus be complementary to any notification or arbitrary command.
* config: add ‘beam-thickness’ optionDaniel Eklöf2021-04-30-0/+1
| | | | | | | | | | | * Rename cursor.style value ‘bar’ to ‘beam’. ‘bar’ remains recognized, but should eventually be deprecated and then removed. * Add ‘cursor.beam-thickness’ option, a pt-or-px value specifying the thickness of the beam cursor. Defaults to 1.5pt. * Rename (and export) pt_or_px_as_pixels() to term_pt_or_px_as_pixels() * Change term_pt_or_px_as_pixels() to round point values instead of truncating them.
* config: bold-text-in-bright: add ‘palette-based’ as a special valueDaniel Eklöf2021-04-17-1/+5
| | | | | | | | | When ‘bold-text-in-bright’ is set ‘to palette-based’, colors matching one of the 8 regular palette colors are brightened by using the corresponding bright palette color. Other colors, or all colors if ‘bold-text-in-bright’ is set to ‘yes|true’, are brightened by increasing the luminance.
* config: add box-drawings-uses-font-glyphs=no|yes optionDaniel Eklöf2021-04-09-0/+2
| | | | | | | | | When disabled, we render box drawing characters ourselves. This is the default. When enabled, we instead use font glyphs. I.e. no special treatment. Closes #430
* config/terminal: refactor: remove “default_*” color members from terminal structDaniel Eklöf2021-04-07-2/+1
| | | | Access the original colors in the configuration instead.
* term: increase/decrease custom line-height with font size changesDaniel Eklöf2021-03-21-6/+0
| | | | | | | | When the user has set a custom line-height, we now adjust it when increasing/decreasing (“zooming”) the font size at run-time. Previously, the line-height was fixed at the size specified in foot.ini.
* add option to detach the client process from the terminal instanceFelipe Trzaskowski2021-03-13-0/+1
|
* config: reuse HAVE_TERMINFO via DEFAULT_TERMChloe Kudryavtsev2021-02-26-0/+6
| | | | | add detection in --help output also make it more easily accessible for other locations to change
* urls: OSC-8 URLs can now optionally be underlined outside of url-modeDaniel Eklöf2021-02-21-0/+5
| | | | | | | | | | | | | | | | | | | | | This patch adds a new configuration option, ‘osc8-underline=url-mode|always’. When set to ‘url-mode’, OSC-8 URLs are only highlighted (i.e. underlined) in url-mode, just like auto-detected URLs. When set to ‘always’, they are always underlined, regardless of mode, and regardless of their other attributes. This is implemented by tagging collected URLs with a boolean, instructing urls_render() and urls_reset() whether they should update the cells’ ‘url’ attribute or not. The OSC-8 collecter sets this based on the value of ‘osc8-underline’. Finally, when closing an OSC-8 URL, the cells are immediately tagged with the ‘url’ attribute if ‘osc8-underline’ is set to ‘always’.
* config: add jump-label-letters optionDaniel Eklöf2021-02-13-0/+1
|