aboutsummaryrefslogtreecommitdiff
path: root/config.h (follow)
Commit message (Collapse)AuthorAgeLines
* 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
|
* key-bindings: refactor: use a single type for all key bindingsDaniel Eklöf2021-02-08-25/+12
| | | | | | | | | | | | | | | | Up until now, the various key binding modes (“normal”, “search” and “url”) have used their own struct definitions for their key bindings. The only reason for this was to have a properly typed “action” (using the appropriate “action” enum). This caused lots of duplicated code. This patch refactors this to use a single struct definition for the “unparsed” key bindings handled by the configuration, and another single definition for “parsed” bindings used while handling input. This allows us to implement configuration parsing, keymap translation and so on using one set of functions, regardless of key binding mode.
* config: use a bitfield for flags tracking whether to use custom colors for CSD or notDaniel Eklöf2021-02-07-4/+4
|
* config: add colors.jump_labels and colors.urlsDaniel Eklöf2021-02-07-0/+8
| | | | | | | | | | * colors.jump_labels configures the foreground and background colors used when rendering URL jump labels. Defaults to “regular0 regular3” (i.e. black on yellow). * colors.urls configures the color to use when highlighting URLs in URL mode. Note that we aren’t currently doing any highlighting... Defaults to regular3 (i.e. yellow).
* config: use a packed bitfield for “use custom color” flagsDaniel Eklöf2021-02-07-1/+4
|
* config: add ‘url-launch’ option, defaulting to “xdg-open ${url}”Daniel Eklöf2021-02-07-4/+7
|
* config: add infrastructure to handle URL mode specific key bindingsDaniel Eklöf2021-02-07-0/+9
| | | | | | * Add “show-urls” action to regular key bindings * Add url-bindings section to foot.ini * Add “cancel” action to URL mode key bindings
* config: promote tweak.resize-delay-ms to a real, supported optionDaniel Eklöf2021-01-26-1/+1
|
* render: delay TIOCSWINSZ while doing an interactive resizeDaniel Eklöf2021-01-26-0/+1
| | | | | | | | | | | | | | | | | | | Instead of disabling content centering, delay the TIOCSWINSZ (a.k.a delay sending the new dimensions to the client) by a small amount while doing an interactive resize. Non-interactive resizes are still immediate. For now, force a resize when the user stops the interactive resize. This ensures the client application receives the new dimensions immediately. It still works without the last, forced, resize, but there typically be a small delay until the client application receives the final dimensions. Closes #301 Closes #283
* config: add ‘none’ as a possible value for ‘selection-target’Daniel Eklöf2021-01-23-0/+1
| | | | | | | When ‘selection-target’ is set to ‘none’, selecting text does not copy the text to _any_ clipboard. This patch also refactors the value parsing to be data driven.
* config: add new option ‘selection-target’Daniel Eklöf2021-01-23-0/+5
| | | | | This option controls the clipboard target that selected text should be copied to.
* config: add temporary(?) tweak option for box drawing line thicknessDaniel Eklöf2021-01-12-0/+1
|
* config: pt_or_px cannot be a unionDaniel Eklöf2021-01-11-5/+5
|
* config: fix comment: -1 is a valid ‘px’ valueDaniel Eklöf2021-01-11-1/+1
|
* config: line-height, letter-spacing: values are in pt by default, but we allow pxDaniel Eklöf2021-01-11-4/+10
| | | | | | | | If the value is specified without a unit, then the value is assumed to be in points, subject to DPI scaling. The value can optionally have a ‘px’ suffix, in which case the value is treated as a raw pixel count.
* config: add line-height, letter-spacing, {horizontal,vertical}-letter-offsetDaniel Eklöf2021-01-11-0/+8
|
* config: add optional ‘center’ argument to ‘pad’Daniel Eklöf2021-01-06-0/+1
| | | | | | | | | | When set, the grid contents is centered in the window. I.e. the left/right and top/bottom margins are equal (+- 1px). This causes the content to “jump” while doing an interactive resize, but may still be preferred in e.g. a tiling WM. Closes #273
* fonts: size fonts using the scaling factor when output scaling is enabledDaniel Eklöf2020-12-17-1/+1
| | | | | | | | | | | | | | | | | | | This extends the new ‘dpi-aware’ option with a new default value, ‘auto’. When set to ‘auto’, fonts are sized using monitors’ DPI when output scaling is disabled. When output scaling is enabled, fonts are instead sized using the scaling factor. The reasoning here is that a user that has enabled output scaling is obviously *not* relying on DPI scaling. Output scaling can also be a way to compensate for different viewing distances, in which case we do *not* want to break that by using DPI scaling. Users can still force DPI-only font sizing by setting ‘dpi-aware=yes’, or disable it completely by setting ‘dpi-aware=no’.
* config_font_parse(): return fail/successDaniel Eklöf2020-12-15-1/+1
|
* config: add ‘notify’ to possible values for ‘bell’ in foot.iniDaniel Eklöf2020-12-10-1/+5
| | | | | When `bell=notify`, foot will trigger a desktop notification when it receives a BEL in an unfocused window.
* osc: implement urxvt’s “OSC 777;notify”Daniel Eklöf2020-12-09-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC 777 is URxvt’s generic escape to send commands to its perl extensions. The first parameter is the name of the extension, followed by its arguments. OSC 777;notify is a, if not well established, at least a fairly well known escape sequence to request a (desktop) notification. The syntax is: \e]777;notify;<title>;<body>\e\\ Neither title nor body is escaped in any way, meaning they should not contain a ‘;’. Foot will split title from body at the *first* ‘;’. Any remaining ‘;’ characters are treated as part of ‘body’. Instead of adding built-in support for the freedesktop notification specification (which would require us to link against at least dbus), add a new config option to foot.ini: ‘notify’. This option specifies the command to execute when a notification is received. ‘${title}’ and ‘${body}’ can be used anywhere, in any combination, and as many times as you want, in any of the command arguments. The default value is ‘notify-send -a foot -i foot ${title} ${body}’
* config: replace union in config struct with simple width/height membersCraig Barnes2020-11-30-10/+2
|
* config: add ‘dpi-aware’ option, defaulting to enabledDaniel Eklöf2020-11-19-0/+1
| | | | | | | | | | When disabled, foot no longers uses outputs’ DPI to scale the font. Instead, it uses the outputs’ scaling factor. That is, instead of appending “:dpi=123” to the fontconfig string, modify the “:pixelsize” or “:size” attribute. Closes #206
* config: add default.bold-text-in-bright optionDaniel Eklöf2020-11-14-0/+1
|
* config: add support for pipe-* actions in mouse bindingsDaniel Eklöf2020-11-06-0/+5
| | | | Closes #183
* config: add font-bold, font-italic and font-bold-italic optionsDaniel Eklöf2020-10-20-1/+2
| | | | | | | | | | These options lets the user configure custom fonts and styles, to use with the bold and italic cell attributes. By default, they are unset, meaning we use the bold/italic variants of the regular font. Closes #169.
* csi: implement ‘CSI ? 1042 h/l’ - enable/disable bell-is-urgentDaniel Eklöf2020-10-11-1/+1
|
* conf: csd.preferred can now be set to ‘none’Daniel Eklöf2020-10-10-1/+1
| | | | | | | | | | | When csd.preferred == none, we will request CSDs from the compositor, but internally render as if we are using SSDs. That is, we don’t render any window decorations at all. Note that some compositors may ignore our request to use CSDs, and still render SSDs for us. Closes #163
* config: add ‘[default].word-delimiters’Daniel Eklöf2020-10-09-0/+1
| | | | | | | | | | This option lets the user configure which characters act as word delimiters when selecting text. This affects both “double clicking”, and ‘ctrl-w’ in scrollback search mode. Closes #156
* bell: optionally render margins in red when receiving BELDaniel Eklöf2020-10-08-0/+2
| | | | | | | | | | | Add anew config option, ‘bell=none|set-urgency’. When set to ‘set-urgency’, the margins will be painted in red (if the window did not have keyboard focus). This is intended as a cheap replacement for the ‘urgency’ hint, that doesn’t (yet) exist on Wayland. Closes #157
* config: add mouse.alternate-scroll-mode optionDaniel Eklöf2020-09-15-0/+1
| | | | | This option controls the initial state of the Alternate Scroll Mode, and defaults to ‘enabled’.
* config: add tweak.scaling-filterDaniel Eklöf2020-09-13-0/+1
| | | | | | | | Use the new fcft_set_scaling_filter() API to use a non-default scaling filter. By default, we use lanczo3, the ‘best’ filter. This overrides the default in fcft, which is ‘cubic’ filtering.
* Add -W,--window-size-chars, and foot.ini:initial-window-size-charsDaniel Eklöf2020-09-08-3/+21
| | | | | | | | | | | * Add -W,--window-size-chars command line option * Add initial-window-size-chars foot.ini option * Add -w,--window-size-pixels command line option * Add initial-window-size-pixels foot.ini option * Deprecate -g,--geometry command line option in favor of -w,--window-size-pixels * Deprecate geometry option in foot.ini in favor of initial-window-size-pixels
* config: add tweak.damage-whole-windowDaniel Eklöf2020-09-06-0/+1
| | | | | | | | | | When enabled, foot will ‘damage’ the entire window, instead of just the modified/updated rows. This will force the compositor to redraw/blend the whole window. This can be used to workaround an issue with fractional scaling in Gnome, where random thin lines may appear.
* render: optionally enable heuristics that deal with private usage area charsDaniel Eklöf2020-09-03-0/+1
| | | | | | | | | | | | | | Try to detect double-width *glyphs* for single-width *characters*, and allow them to overflow into the next cell. This is only done for single-width chars with a glyph width that is at least 1.5 cells wide, but at most 3 cells. The feature is gated by the new ‘tweak.allow-overflowing-double-width-glyphs’, and is disabled by default. Closes #116
* config: key/mouse bindings: refactor: less parsing in keyboard_enter()Daniel Eklöf2020-08-13-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the handling of mouse and keyboard bindings. Before, the bindings where parsed *both* when loading the configuration, and then on every keyboard enter event. This was done since keys require a keymap to be decoded. Something we don't have at configuration time. The idea was that at config time, we used a default keymap just to verify the key combo strings were valid. The following has changed: * The bindings in the config struct is now *one* key combo per entry. Previously, it was one *action* per entry, and each entry had one or more key combos. Doing it this way makes it easier when converting the binding in the keyboard enter event (which previously had to expand the combos anyway). * The bindings in the config struct no longer contains any unparsed strings. A key binding contains a decoded 'modifier' struct (which specifies whether e.g. ctrl, or shift, or ctrl+shift must be pressed for the binding to be used). It also contains a decoded XKB keysym. * A mouse binding in the config struct is similar to a key binding, except it contains the button, and click count instead of the XKB key sym. * The modifiers in the user-specified key combo is decoded at config time, by using the pre-defined XKB constants XKB_MOD_NAME_<modifier>. The result is stored in a 'modifiers' struct, which is just a collection of booleans; one for each supported modifier. The supported modifiers are: shift, ctrl, alt and meta/super. * The key sym is decoded at config time using xkb_keysym_from_name(). This call does *not* depend on a keymap. * The mouse button is decoded at config time using a hardcoded mapping table (just like before). * The click count is currently hard-coded to 1. * In the keyboard enter event, all we need to do is pre-compute the xkb_mod_mask_t variable for each key/mouse binding, and find all the *key codes* that map to the (already decoded) symbol. For mouse bindings, the modifiers are the *only* reason we convert the mouse bindings at all. In fact, on button events, we check if the seat has a keyboard. If not, we use the mouse bindings from the configuration directly, and simply filter out those with a non-empty set of modifiers.
* config: wip: add support for modifiers in mouse bindingsDaniel Eklöf2020-08-13-3/+8
| | | | | | | Mouse bindings can now include modifiers. They are specified in pretty much the same way as in keyboard bindings: Control+BTN_LEFT
* config: add tweak.render-timer optionDaniel Eklöf2020-08-13-0/+2
| | | | | | | | | This can be set to 'none' (the default), 'osd', 'log' or 'both'. When 'osd' is enabled, we'll render the frame rendering time to a sub-surface after each frame. When 'log' is enabled, the frame rendering time is logged on stderr.
* config: make selection foreground/background colors configurableDaniel Eklöf2020-08-12-0/+3
| | | | | | | | | The default is still to inverse the regular foreground/background colors. If the user sets *both* of the new options, selection-foreground and selection-background, those colors will *always* be used for selected cells, instead of inverting the regular foreground/background colors.