aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * changelog: pgo helper binary build fix (missing key-binding stubs)Daniel Eklöf2022-04-22-0/+4
| |
| * Merge branch 'master' into releases/1.12Daniel Eklöf2022-04-22-200/+210
| |\ | |/ |/|
* | pgo: add missing stubs for key-binding functionsDaniel Eklöf2022-04-22-1/+11
| | | | | | | | | | * key_binding_new_for_term() * key_binding_unref_term()
* | changelog: convert all issue links to reference links in the 1.12.0 releaseDaniel Eklöf2022-04-22-33/+49
| |
* | Revert "changelog: convert all issue links to reference links in the 1.12.0 release"Daniel Eklöf2022-04-22-245/+229
| | | | | | | | | | | | | | This reverts commit 6652a836adb26ef55789bbd23113b158090451fd. We only added the actual links to the 1.12.0 release, meaning all other issue hyperlinks broke.
| * Merge branch 'master' into releases/1.12Daniel Eklöf2022-04-22-229/+256
| |\ | |/ |/|
* | changelog: convert all issue links to reference links in the 1.12.0 releaseDaniel Eklöf2022-04-22-229/+245
| |
* | changelog: replace all bug refs with markdown hyperlinksDaniel Eklöf2022-04-22-219/+219
| |
* | changelog: add new ‘unreleased’ sectionDaniel Eklöf2022-04-22-0/+11
| |
* | Merge branch 'releases/1.12'Daniel Eklöf2022-04-22-6/+13
|\|
| * meson: bump version to 1.12.01.12.0Daniel Eklöf2022-04-22-1/+1
| |
| * changelog: prepare for 1.12.0Daniel Eklöf2022-04-22-5/+12
|/
* meson: add -Dtests=false|true optionDaniel Eklöf2022-04-22-9/+20
| | | | | | | When set to false, no test binaries are neither built, nor executed (with “ninja test”). Closes #919
* doc + meson.build: update information about foot.ini, small cleanupMerlin Büge2022-04-22-36/+34
| | | | | | | | | | | | | | | | | | | - foot.ini.5: mention location of example config file - foot.1: replace outdated (or incomplete) information about the location of the config file with references to foot.ini.5 - foot.1 and foot.ini.5: conform to scdoc specification, thus surround each header with (at least) one blank line. additionally consistently use exactly one line before/after each header (was sometimes two before) - foot.1: some parts of the keybindings had their own section, move into KEYBOARD SHORTCUTS section - foot.1: move EXIT STATUS section to the end where it is commonly found - foot.1: copy information about config file handling from the beginning of foot.ini.5 into the CONFIGURATION section of foot.1 - INSTALL.md: foot.ini is no longer included in the documentation - meson.build: do not bundle foot.ini with documentation anymore, see also https://codeberg.org/dnkl/foot/pulls/1015 Closes #1002
* search: don't modify search.start coord *before* finding next matchDaniel Eklöf2022-04-21-55/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The match logic uses the last start coordinate to determine which end points in the selection to update. This sometimes fails when the start coordinate has been changed by e.g. a key binding - the new start coordinate is incorrectly matched against the old-but-modified start coordinate, causing foot to e.g. *not* upate the selection start coordinate. Example: $ echo 'test\n\test\ntest' Then do a scrollback search for 'test. The first match is found correctly (the last 'test'), but searching for the previous match (ctrl+r) does not select the middle 'test'. Fix by passing the search direction to search_find_next(), and have _it_ calculate the coordinate to start search. There are three possibilities: * forward * backward * "backward", but at the same position The first two are used when searching for next/prev match with ctrl+s and ctrl+r. The last one is used when the search criteria is updated. In this case, we don't want to move to the previous match, *unless* the current match no longer matches.
* url-mode: allow locked modifiers while handling label letter inputDaniel Eklöf2022-04-20-1/+1
| | | | | This fixes an issue where labels couldn’t be activated if e.g. NumLock was enabled.
* changelog: move “re-mapping input” from “changed” to “added”Daniel Eklöf2022-04-20-2/+2
|
* input: codespellDaniel Eklöf2022-04-20-1/+1
|
* input: copy libxkbcommon’s keysym_is_modifier()Daniel Eklöf2022-04-20-11/+13
| | | | | | | | | When determining whether a keysym is a modifier (to skip hiding the pointer when [mouse].hide-when-typing=yes), use the same matching logic xkbcommon does. This function, xkb_keysym_is_modifier() is unfortunately not part of the public API, which is why we copy it instead.
* csi: implement CSI > 4n (reset modifyOtherKeys)Daniel Eklöf2022-04-19-1/+29
|
* wayland: remove selection_override_modmask memberDaniel Eklöf2022-04-19-3/+25
| | | | | This member is no longer valid - we need to use one from the current key-binding set.
* search: add comment to ‘advance_pos()’ macroDaniel Eklöf2022-04-18-0/+2
|
* search: codespell: backards -> backwardsDaniel Eklöf2022-04-18-1/+1
|
* search: rename ‘newline’ -> ‘advance_pos’ macro, reverse return valueDaniel Eklöf2022-04-18-7/+7
|
* search: input: log consumed modifiersDaniel Eklöf2022-04-18-1/+2
|
* search: match iterator: wrap iterator’s row number, when neededDaniel Eklöf2022-04-18-0/+6
|
* search: find_next(): assert start/end coords are validDaniel Eklöf2022-04-18-0/+10
|
* search: find_next(): stop at the exact cell position specified by ‘end’Daniel Eklöf2022-04-18-22/+27
| | | | And not just when reaching end’s row.
* search: find_next(): prefix {start,end}_{row_col} with ‘match’Daniel Eklöf2022-04-18-21/+23
|
* search: find_next(): pass an ‘end’ coord, instead of a row countDaniel Eklöf2022-04-18-5/+31
|
* search: refactor: find_next(): pass start as a ‘coord’ structDaniel Eklöf2022-04-18-17/+16
|
* search: search_update_selection() no longer expects end coordinate to be exclusiveDaniel Eklöf2022-04-17-3/+0
|
* search: match iterator: handle overlapping matchesDaniel Eklöf2022-04-17-2/+2
|
* render: overlay: reset ‘start_col’ after handling the first rowDaniel Eklöf2022-04-17-0/+2
|
* search: match iterator: always return the primary matchDaniel Eklöf2022-04-17-17/+36
| | | | | | | Normally, the primary match is automatically included by the iterator, but if the secondary and primary matches overlap, it is possible we don’t return the _actual_ primary match. This lead to highlighting issues, where part of the primary match wasn’t highlighted correctly.
* search: fix next/prev not updating selection correctly when matches overlapDaniel Eklöf2022-04-17-3/+11
| | | | | When the new match overlapped with the old match, the selection wasn’t updated correctly.
* wayland: refactor: remove ‘struct config’ pointer from wayland structDaniel Eklöf2022-04-17-27/+30
| | | | | | | | | | | | | | The global config doesn’t necessarily reflect the correct configuration to use - we should *always* use the current terminal instance’s conf pointer. * Move selection override modifier mask to the key_binding_set struct * Always warn if XDG activation is unavailable, not just if bell.urgent is set (we no longer have access to this information) * Pass ‘bool presentation_timings’ as a parameter to wayl_init() * Remove ‘presentation_timings’ member from the ‘terminal’ struct Closes #932
* key-binding: NOINLINE a couple of functions, for a minor code size reductionDaniel Eklöf2022-04-17-4/+4
|
* changelog: key binding overrides having no effect with footclientDaniel Eklöf2022-04-17-0/+2
|
* key-binding: new API, for handling sets of key bindingsDaniel Eklöf2022-04-17-381/+732
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* meson: install foot.ini to /etc/xdg/foot/foot.iniDaniel Eklöf2022-04-17-1/+5
| | | | Closes #1001
* url-mode: add a key binding that enables “persistent” URL modeDaniel Eklöf2022-04-17-11/+37
| | | | | | | This is an alternative to ‘show-urls-launch’, where we stay in URL mode after activating an URL. Closes #964
* changelog: scrollback search mode highlights all matchesDaniel Eklöf2022-04-17-0/+1
|
* render: overlay: apply weston quirkDaniel Eklöf2022-04-17-0/+2
|
* search: refactor: search_update_selection() takes a ‘struct range’Daniel Eklöf2022-04-16-19/+18
|
* search: break out “find next match” logic to a new functionDaniel Eklöf2022-04-16-113/+101
|
* search/render: initial support for highlighting all visible matchesDaniel Eklöf2022-04-16-11/+117
| | | | | | | | | | | | | | | | | Before this patch, only the currently “selected” match was highlighted (by having the “selected” attribute, and by *not* dimming it, like the rest of the grid during a scrollback search). With this patch, we now highlight matches within the viewport. While searching, only the “primary” match is searched-for, and tracked. Then, when rendering a frame, we find all “secondary” matches as well. “holes” are added to the search-mode overlay by the means of an search-match iterator. The iterator’s text matching logic is *very* similar to what we do when the search criteria has been updated, and we re-search the scrollback. It should be possible to refactor this, and share code.
* render: implement ‘flash’ and search mode’s ‘dimming’ with a sub-surfaceDaniel Eklöf2022-04-16-48/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Search mode and ‘flash’ (OSC-555) both achieves similar visual effects: flash tints the entire window yellow, and search mode dims it (except the search match). But, they do so in completely different ways. Search mode is detected in render_cell(), and the colors are then dimmed there. Flash is implemented by blending a yellow, semi-transparent color on top of the rendered grid. This patch replaces those two implementations with a single one. We add a new sub-surface, called the ‘overlay’. In normal mode, it’s unmapped. When either search mode, or flash, is enabled, we enable it, and fill it with a semi-transparent color. Yellow for ‘flash’, and “black” (i.e. no color) for search mode. The compositor then blends it with the grid. Hopefully on the GPU, meaning it’ll be faster than if we blend in software. There are more performance benefits however. By using a separate surface, we can do much better damage tracking. The normal grid rendering code no longer have to care about neither search mode, nor flash. Thus, we get rid of a couple of ‘if’ statements in render_cell(), which is nice. But more importantly, we can drop full grid repaints in a couple of circumstances: * Entering/exiting search mode * Every frame while flash is active Now, when rendering the search mode overlay, we do want to do some damage tracking, also of the overlay. This, since search mode doesn’t dim the *entire* window. The search match is *not* dimmed. This is implemented by punching a hole in the overlay sub-surface. That is, we make part of it *fully* transparent. The basic idea is to set a clip region that excludes the search match, and then dim the rest of the overlay. It’s slightly more complicated than that however, if we want to reuse the last frame’s overlay buffer (i.e we don’t want to re-render the *entire* overlay every frame). In short, we need to: * Clear (punch hole) in areas that are part of this frame’s search match, but not the last frame’s (since those parts are _already_ cleared). * Dim the areas that were part of the last frame’s search match, but aren’t anymore (the rest of the overlay should already be dimmed). To do this, we save the last frame’s “holes” (as a pixman region). Then, when rendering the next frame, we first calculate the new frame’s “holes” region. The region to clear is “this frame’s holes minus last frame’s holes” The region to dim is “last frame’s holes minus this frames holes”. Finally, we compute the bounding box of all modified cells by taking the union of the two diff regions mentioned above. This allows us to limit the buffer damage sent to the compositor.
* shm: add shm_did_not_use_buffer()Daniel Eklöf2022-04-16-0/+9
| | | | | | | | This allows a caller to return a buffer (obtained with shm_get_buffer()) to the pool, The buffer must not have been used. I.e. it must not have been attached and committed to a wayland surface.
* wayland: optionally disable pointer input on subsurfacesDaniel Eklöf2022-04-16-49/+27
| | | | | | | | | | | | | | | | We have a number of sub-surfaces for which we are *not* interrested in pointer (or touch) input. Up until now, we’ve manually dealt with these, by recognizing these surfaces in all pointer events, and ignoring them. But, lo and behold, there are better ways of doing this. By clearing the subsurface’s input region, the compositor will do this for us - when a pointer is outside a surface’s input region, the event is passed to the next surface underneath it. This is exactly what we want! Do this for all subsurfaces, *except* the CSDs.
* changelog: [csd].hide-when-maximizedDaniel Eklöf2022-04-16-0/+2
|
* config: add [csd].hide-when-maximized=yes|noDaniel Eklöf2022-04-16-2/+19
| | | | | | | When enabled, the CSD titlebar will be hidden when the window is maximized. Closes #1019
* render: take (visible) CSD border size into account when setting initial sizeDaniel Eklöf2022-04-16-0/+5
|
* wayland: add helper functions wayl_win_csd_{titlebar,borders}_visible()Daniel Eklöf2022-04-16-20/+36
|
* wayland: take (visible) border width into account on configure eventsDaniel Eklöf2022-04-16-1/+9
| | | | | | | | | | | When the compositor is asking us to resize ourselves, take our (visible) CSD borders into account. This is similar to how we already take the titlebar size into account. This fixes an issue where the window size “jumps” when the user starts an interactive resize, when csd.border-width > 0. This as been observed in GNOME.
* render: take visible border width into account when setting window geometryDaniel Eklöf2022-04-16-5/+14
| | | | This fixes e.g. window snapping in GNOME.
* fix some small typosMerlin Büge2022-04-13-7/+7
|
* pgo: sync up stub version of slave_spawn()Daniel Eklöf2022-04-12-2/+2
|
* config: config_free(): pass conf struct by pointer, not by-valueDaniel Eklöf2022-04-12-49/+49
|
* config: simplify lookup of foot.iniDaniel Eklöf2022-04-12-144/+31
| | | | | | | | The old, complex, way of using a dynamic list to hold each path component made _some_ sense before, when we needed to support both ~/.config/foot.ini and ~/.config/foot/foot.ini. But now, it just over complicates things.
* Merge branch 'footclient-environ'Daniel Eklöf2022-04-12-48/+177
|\ | | | | | | Closes #1004
| * slave: roll our own ‘execvpe()’ on FreeBSDDaniel Eklöf2022-04-12-1/+58
| |
| * client/slave: explictly add ‘extern char **environ’Daniel Eklöf2022-04-12-0/+4
| | | | | | | | It’s not in any header files on FreeBSD.
| * client: refactor: add send_string_list() functionDaniel Eklöf2022-04-12-20/+20
| | | | | | | | Use it to send ‘overrides’ and ‘envp’
| * doc: footclient: codespellDaniel Eklöf2022-04-12-2/+2
| |
| * completions: footclient: add -E,--client-environmentDaniel Eklöf2022-04-12-0/+3
| |
| * doc: footclient: add -E,--client-environmentDaniel Eklöf2022-04-12-0/+4
| |
| * client: add -E,--client-environmentDaniel Eklöf2022-04-12-39/+100
|/ | | | | | | | | | | | | | | | | When this option is used, the child process in the new terminal instance will inherit its environment from the footclient process, instead of the foot server’s. Implemented by sending (yet another) dynamic string list as part of the client -> server setup packet. When the new option is *not* used, the setup packet is now 2 bytes larger than before. On the server side, the slave process now uses execvpe() instead of execvp(). There’s plumbing to propagate a new ‘envp’ argument from term_init() all the way down to slave_exec(). If ‘envp’ is NULL, we use ‘environ’ instead (thus matching the old behavior of execvp()). Closes #1004
* csi: reduce duplication in code handling SGR 38 and 48 sequencesCraig Barnes2022-04-11-85/+24
|
* doc: ctlseq: document XTMODKEYSDaniel Eklöf2022-04-10-0/+5
|
* changelog: improved compatibility with XTerm when modifyOtherKeys=2Daniel Eklöf2022-04-10-0/+2
|
* input: improve XTerm compatibility when modifyOtherKeys=2Daniel Eklöf2022-04-10-1/+50
| | | | | | | | | | | | | | | | | | | Before this, foot always emitted a CSI if _any_ modifier was active. XTerm doesn’t behave quite like this. Instead, it appears to special-case shift somewhat: If the generated symbol (e.g ‘A’) is the upper case version of the pressed key’s base symbol (‘a’), and is in the range a-z, emit a CSI. If not emit a plain symbol: Examples (Swedish layout): * shift-a (generated symbol is ‘A’) emits a CSI * shift-, (generated symbol is ‘;’) emits ‘;’ * shift-alt-, (generated symbol is ‘;’) emits a CSI Closes #1009
* pgo: fix selection.{start,end} initializersDaniel Eklöf2022-04-10-2/+4
| | | | | This fixes a regression introduced in 5b1f1602bccfb7c37e50a8509f44b24e9aa3b5d1
* search: use a local ‘grid’ variable to hold term->gridDaniel Eklöf2022-04-09-52/+60
|
* refactor: add a ‘range’ struct, grouping a start and end coord togetherDaniel Eklöf2022-04-09-96/+105
|
* config: use fallback when XDG_CONFIG_{HOME,DIRS} is set, but emptyDaniel Eklöf2022-04-07-2/+2
|
* config: fallback to /etc/xdg if XDG_CONFIG_DIRS is unsetDaniel Eklöf2022-04-07-5/+10
| | | | Closes #1008
* config: add tweak option to allow disabling sixelsjvoisin2022-04-06-2/+26
| | | | Closes #950
* osc: avoid unnecessary calls to strlen(3)Craig Barnes2022-04-06-5/+5
| | | | | | | | | | | | | | | | | Checking for specific strings of length 0 or 1 can be done with e.g.: if (str[0] == '\0') {...} if (str[0] == '?' && str[1] == '\0') {...} Doing it this way instead of using strlen(3) means we avoid the function call overhead and also avoid scanning through more of the string than is neceessary. A compiler could perhaps optimize away calls to strlen(3) when the result is compared to a small constant, but GCC 11.2 only seems to actually do this[1] for lengths of 0. [1]: https://godbolt.org/z/qxoW8qqW6
* render: ensure an underline cursor is not positioned too lowDaniel Eklöf2022-04-06-19/+24
| | | | | | | | The underline cursor is positioned just below regular underlines. A bug in the positioning logic related to this, sometimes resulted in the cursor being thinner than what it should be, or even invisible. Fixes #1005
* Small clarification/rewording of default color valuesMerlin Büge2022-04-06-7/+5
| | | | | | | | | 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.
* doc: fix some small typosMerlin Büge2022-04-06-17/+17
|
* doc: foot.ini: escape ‘-’ and ‘*’Daniel Eklöf2022-04-05-1/+1
|
* 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-2/+2
| | | | Fixes #1000
* Use circles for rendering light arc box-drawing characters.L3MON4D32022-04-03-114/+216
| | | | | | Ellipses can look weird when the font is narrow. Closes #988
* themes/material-design: add missing bright colorsMariusz Bialonczyk2022-03-29-0/+6
|
* dcs: don’t automatically buffer anythingDaniel Eklöf2022-03-21-5/+0
| | | | | | | | If a request handler doesn’t define its own put() handler, simply drop all DCS parameter data. This way, we won’t end up allocating potentially large buffers for unsupported/unimplemented DCS requests. Closes #959
* dcs: xtgettcap: use custom put() handlerDaniel Eklöf2022-03-21-5/+21
| | | | | Grow buffer exponentially, since XTGETTCAP requests can, theoretically, be very large.
* dcs: decrqss: use a custom put() handlerDaniel Eklöf2022-03-21-22/+36
| | | | | Only buffer up to two bytes, as that’s the largest DECRQSS request we support.
* dcs: map BSU/ESU unhook handlers directly to term_{enable,disable}_app_sync_upates()Daniel Eklöf2022-03-21-26/+7
| | | | That is, drop the local bsu() and esu() functions.
* vt: free OSC buffer after dispatch, if larger than 4KDaniel Eklöf2022-03-21-3/+12
|
* input: don’t allow non-significant modifiers when matching untranslated symbolsDaniel Eklöf2022-03-20-9/+33
| | | | | | | | | | | | | | | | | | When matching “untranslated” bindings (by matching the base symbol of the key, e.g. ctrl+shift+2 in US layout), require that no non-significant modifiers are active. This fixes an issue where AltGr was “ignored”, and would cause certain combinations to match a key binding. Example: ctrl+altgr+0, on many European layouts matched against the default ctrl+0 (reset the font size), instead of emitting ^] To make this work, we now need to filter out “locked” modifiers (e.g. NumLock and CapsLock). Otherwise having e.g. NumLock active would prevent *all* untranslated matching to fail. Closes #983
* char32: only include stdc-predef.h if it is availableDaniel Eklöf2022-03-19-1/+5
| | | | | | | | Use the (relatively new) macro __has_include() to check if stdc-predef.h exists, and only include it if it does. If stdc-predef.h does not exist, or if the compiler does not implement __has_include(), stdc-predef.h is *not* included.
* char32: add missing header to work with muslLeonardo Neumann2022-03-19-0/+1
|
* themes: add material-designMariusz Bialonczyk2022-03-19-0/+18
|
* selection: don’t translate \r to \n when pastingDaniel Eklöf2022-03-19-7/+4
| | | | | | | | | | | | | | | | | In non-bracketed paste mode, we translate \n to \r, and \r\n to \r. The latter matches XTerm, urxvt, alacritty and kitty. The former matches alacritty and kitty (xterm and urxvt just blindly replaces all \n occurrences with \r, meaning \r\n is translated to \r\r. For some reason, we then unconditionally translated all \r back to \n, regardless of whether bracketed paste was enabled or not. Unsure why/where this comes from, but it doesn't match any of the other terminal emulators I tested. One example where this caused issues is in older versions of nano (at least up to 2.9). Closes #980
* csi: add support for DECNKM private modeCraig Barnes2022-03-19-0/+17
| | | | | | | | | | | This is equivalent to DECKPAM/DECKPNM when enabled/disabled, but can also be saved/restored/queried with XTSAVE/XTRESTORE/DECRQM. See also: * https://vt100.net/docs/vt510-rm/DECNKM.html * https://vt100.net/docs/vt510-rm/DECKPAM.html * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-PC-Style-Function-Keys
* Merge branch 'nord-and-rezza-themes'Daniel Eklöf2022-03-13-0/+79
|\
| * add rezza themeMariusz Bialonczyk2022-03-11-0/+37
| |