aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * readme, doc/foot.1: document shell-integration:command-output trackingDaniel Eklöf2024-02-06-0/+68
| |
| * changelog: pipe-command-outputDaniel Eklöf2024-02-06-0/+1
| |
| * doc: foot.ini: document pipe-command-outputDaniel Eklöf2024-02-06-7/+15
| |
| * foot.ini: add pipe-command-output key bindingDaniel Eklöf2024-02-06-0/+1
| |
| * config: add pipe-command-output key-bindingDaniel Eklöf2024-02-06-5/+99
| |
| * osc: store column of FTCS_COMMAND_{EXECUTED,FINISHED} in row structDaniel Eklöf2024-02-06-2/+16
| |
| * term: move row->prompt_marker into new struct, row->shell_integrationDaniel Eklöf2024-02-06-11/+12
|/
* Merge branch 'modifiers'Daniel Eklöf2024-02-06-229/+313
|\ | | | | | | Closes #1348
| * changelog: custom modifiers in key bindingsDaniel Eklöf2024-02-06-0/+4
| |
| * input: remove the concept of "significant" modifiersDaniel Eklöf2024-02-06-52/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the purpose of matching key bindings, "significant" modifiers are no more. We're really only interested in filtering out "locked" modifiers. We're already doing this, so there's no need to *also* match against a set of "significant" modifiers. Furthermore, we *never* want to consider locked keys (e.g. when emitting escapes to the client application), thus we can filter those out already when retrieving the set of active modifiers. The exception is the kitty keyboard protocol, which has support for CapsLock and NumLock. Since we're already re-retrieving the "consumed" modifiers (using the GTK style, rather than normal "XKB" style, to better match the kitty terminal), we might as well re-retrieve the effective modifiers as well.
| * input/config: support *all* modifier namesDaniel Eklöf2024-02-06-187/+291
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-55/+120
| | | | | ...to multiples of the cell size, and preserve grid size when changing fonts or display scales in floating windows.
* util: add streq() function and use in place of strcmp(...) == 0Craig Barnes2024-02-05-165/+172
|
* csi: simplify handling of Set/Reset Mode (SM/RM) sequencesCraig Barnes2024-01-27-32/+17
|
* Replace unchecked allocations with calls to xmalloc.h functionsCraig Barnes2024-01-25-7/+7
|
* wayland: 'mode' is unused when LOG_ENABLE_DBG is not setDaniel Eklöf2024-01-24-1/+1
|
* wayland: use wl_compositor version 6 when availableLeonardo Hernández Hernández2024-01-24-10/+66
|
* input: kitty: update to latest version of the specDaniel Eklöf2024-01-24-14/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with kitty 0.32.0, the modifier bits during modifier key events behave differently, compared to before. Or, rather, they have now been spec:ed; before, behavior was different on e.g. MacOS, and Linux. The new behavior is this: On key press, the modifier bits in the kitty key event *includes* the pressed modifier key. On key release, the modifier bits in the kitty key event does *not* include the released modifier key. In other words, The modifier bits reflects the state *after* the key event. This is the exact opposite of what foot did before this patch. The patch is really pretty small: in order to include the key in the modifier set, we simulate a key press to update the XKB state, using xkb_state_uppate_key(). For key pressed, we simulate an XKB_KEY_DOWN event, and for key releases we simulate an XKB_KEY_UP event. Then we re-retrieve the modifers, both the full set, and the consumed set. Closes #1561
* terminal: simplify some string-related code in reload_fonts()Craig Barnes2024-01-23-30/+20
|
* slave: fix typoArtturin2024-01-16-1/+1
| | | | | | | | | | | ``` ../slave.c: In function 'slave_spawn': ../slave.c:441:21: error: 'custom_envp' undeclared (first use in this function); did you mean 'custom_env'? 441 | add_to_env(&custom_envp, "TERMINFO", FOOT_TERMINFO_PATH); | ^~~~~~~~~~~ | custom_env ../slave.c:441:21: note: each undeclared identifier is reported only once for each function it appears in ```
* slave: don't skip setting environment variables when using a custom environmentDaniel Eklöf2024-01-11-18/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When launching footclient with -E,--client-environment the environment variables that should be set by foot, wasn't. Those variables are: * TERM * COLORTERM * PWD * SHELL and all variables defined by the user in the [environment] section in foot.ini. In the same way, we did not *unset* TERM_PROGRAM and TERM_PROGRAM_VERSION. This patch fixes it by "cloning" the custom environment, making it mutable, and then adding/removing the variables above from it. Instead of calling setenv()/unsetenv() directly, we add the wrapper functions add_to_env() and del_from_env(). When *not* using a custom environment, they simply call setenv()/unsetenv(). When we *are* using a custom environment, add_to_env() first loops all existing variables, looking for a match. If a match is found, it's updated with the new value. If it's not found, a new entry is added. del_from_env() loops all entries, and removes it when a match is found. If no match is found, nothing is done. The mutable environment is allocated on the heap, but never free:d. We don't need to free it, since it's only allocated after forking, in the child process. Closes #1568
* config: fix cloning of env_vars tllistDaniel Eklöf2024-01-10-0/+4
| | | | | | | | | When cloning a config struct, the env_vars tllist wasn't correctly copied. We did correctly iterate and duplicate all old entries, but we did *not* reset the list in the cloned struct before doing so. This meant the list contained entries shared with the original list, causing double free:s in --server mode.
* wayland: surface_scale_explicit_width_height(): dont assert width/height are valid for scale, take 2Daniel Eklöf2024-01-09-3/+16
| | | | | | | | | | | | | | | | | | | | | | | 764248bb0d846f65c20931024c1f4adca57aae29 modified wayl_surface_scale_explicit_width_height() to not assert the surface size is valid for the given scaling factor. This, since that function is only used when scaling a mouse pointer surface. However, that commit only updated the code path run when fractional scaling is available (i.e. when the compositor implements the fractional-scale-v1 protocol). The legacy code path, that does integer scaling, was still asserting the surface width/height were divisible with the scaling factor. For the same reasons this isn't true with fractional scaling available, it's not true with integer scaling. Fix by skipping the assertions. This patch also converts the assertions to more verbose BUG() calls, that prints more information on the numbers involved. Closes #1573
* slave: ignore return value of chdir()Daniel Eklöf2024-01-05-1/+1
| | | | | | | | | | | It's not critical. Fixes ../slave.c: In function ‘slave_spawn’: ../slave.c:410:9: error: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 410 | chdir("/"); | ^~~~~~~~~~
* slave: chdir to / after spawning the client applicationDaniel Eklöf2024-01-03-0/+13
| | | | | | | | | | | With this patch, the terminal process now changes PWD to / after spawning the client application. This ensures the terminal process itself does not "lock" a directory. For example, we may keep a mount point from being unmounted. Closes #1528
* Add poimandres themeLmbMaxim2024-01-03-0/+30
|
* changelog: formattingDaniel Eklöf2024-01-03-1/+3
|
* support numpad in unicode modeSivecano2024-01-03-0/+5
|
* appstream: update releases listCraig Barnes2023-12-06-4/+10
|
* theme: electrophoreticeugenrh2023-11-14-0/+35
| | | | | A theme for grayscale electrophoretic displays (e-ink), which aims to maximize the contrast between the text and the white background.
* terminfo: add terminator to conditional in SyncGregory Anders2023-11-14-1/+1
| | | | | | | | I'm not sure if this is _strictly_ necessary, but according to the terminfo specification [1] a conditional string should be terminated with `%;`. [1]: https://man7.org/linux/man-pages/man5/terminfo.5.html
* changelog: double close config file descriptorDaniel Eklöf2023-10-27-0/+4
|
* config: reset conf file descriptor after closing file streamJan Palus2023-10-27-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | conf file descriptor is closed once again during cleanup at the end of config_load() if descriptor >= 0. avoid double closing by assigning negative value to fd after first close. by the time second close happens some other descriptor might be opened reusing previous number ie it might happen during foot server startup when syslog message is logged between one close and the other. in this particular situation, as of this writing, it considers fd=3 for which following events apply: 1. conf file is opened and fclosed() 2. warning is logged with syslog which leads to opening socket to /dev/log which is kept open by glibc (gets fd=3) 3. second close during config_load() closes /dev/log socket descriptor 4. epoll_create() in fdm.c reuses fd=3 again 5. another message is being logged with syslog. glibc notices sendto() failure on saved /dev/log descriptor hence it closes it and opens new one Due to epoll descriptor closure foot starts a chain of errors that lead to startup failure. Fixes #1531
* main: correct short option case in help output for disabling syslogJan Palus2023-10-27-1/+1
|
* man foo.ini.5: Add 'Comma separated list of fonts' examplexnuk2023-10-27-0/+1
|
* config: improve validation of color values, default alpha to 0xffDaniel Eklöf2023-10-26-6/+34
| | | | | | | | | | | | Reject color values that aren't in either RGB, or ARGB format. That is, color values that aren't hexadecimal numbers with either 6 or 8 digits. Also, if a color value is allowed to have an alpha component, and the user left it out, default to 0xff (opaque) rather than 0x00 (fully transparent). Closes #1526
* add CCACHE_DISABLE=1 to pgo.sh to avoid errors when ccache is enabledFazzi2023-10-20-0/+1
|
* changelog: add new 'unreleased' sectionDaniel Eklöf2023-10-17-0/+12
|
* Merge branch 'releases/1.16'Daniel Eklöf2023-10-17-11/+4
|\
| * meson: bump version to 1.16.21.16.2releases/1.16Daniel Eklöf2023-10-17-1/+1
| |
| * changelog: prepare for 1.16.2Daniel Eklöf2023-10-17-10/+3
| |
| * Merge branch 'master' into releases/1.16Daniel Eklöf2023-10-17-1/+18
| |\ | |/ |/|
* | render: sixel: regression: wrong cell color behind opaque sixelsDaniel Eklöf2023-10-13-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | An opaque sixel that isn't a multiple of the cell size will have some cells partially visible (either the entire last row, the entire last column, or both). These must be rendered before blitting the sixel. f5f2f5a954ee6cf3532a6aba023860ada183d486 introduced a regression, where all such cells were rendered as if the cursor was there, giving them the wrong appearance. Closes #1520
* | changelog: add new 'unreleased' sectionDaniel Eklöf2023-10-12-0/+10
| |
* | Merge branch 'releases/1.16'Daniel Eklöf2023-10-12-11/+4
|\|
| * meson: bump version to 1.16.11.16.1Daniel Eklöf2023-10-12-1/+1
| |
| * changelog: prepare for 1.16.1Daniel Eklöf2023-10-12-10/+3
| |
| * Merge branch 'master' into releases/1.16Daniel Eklöf2023-10-12-16/+47
| |\ | |/ |/|
* | render: fix surface damage when rendering sixels.Daniel Eklöf2023-10-12-9/+13
| | | | | | | | | | | | | | | | | | | | Pass a damage region to render_row()/render_cell() when rendering partially visible cells underneath a sixel. This ensures the affected regions are later reported as 'damaged' to the Wayland compositor. Closes #1515
* | sixel: erase: fix clearing of cell->attrs.cleanDaniel Eklöf2023-10-12-1/+1
| | | | | | | | | | | | | | | | | | When erasing a sixel, the cells underneath it must be marked as 'dirty', in order to be re-rendered. This was not being done correctly; the for loop loops *from* the start col, meaning the *end* col is *not* sixel->pos.col, as that's the *number* of columns, not the *end* column.
* | shm: memfd_create: fallback to not using MFD_NOEXEC_SEALDaniel Eklöf2023-10-12-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFD_NOEXEC_SEAL was introduced in linux 6.3. Kernels before that will *reject* memfd_create() calls that set it. This caused foot to exit (i.e. not start at all), when compiled on linux >= 6.3, but run on linux < 6.3. We _do_ want to use MFD_NOEXEC_SEAL, since a) our memory mapped really shouldn't be executable, and b) to silence a warning on linux >= 6.3. To handle all cases, first try *with* MFD_NOEXEC_SEAL. If that fails with EINVAL, retry *without* it. Closes #1514
* | changelog: fix link to issue 1077Daniel Eklöf2023-10-11-1/+1
| |
* | changelog: add new 'unreleased' sectionDaniel Eklöf2023-10-11-0/+11
| |
* | Merge branch 'releases/1.16'Daniel Eklöf2023-10-11-6/+12
|\|
| * meson: bump version to 1.16.01.16.0Daniel Eklöf2023-10-11-1/+1
| |
| * changelog: prepare for 1.16.0Daniel Eklöf2023-10-11-5/+11
|/
* changelog: emphasize the new key bindings are for search modeDaniel Eklöf2023-10-11-1/+1
|
* Merge branch 'fix-font-baseline-calculation'Daniel Eklöf2023-10-11-12/+25
|\ | | | | | | | | Closes #1511 Closes #1463
| * term: cache font baselineDaniel Eklöf2023-10-10-9/+12
| | | | | | | | | | No need to redo the calculation for every single cell we render, every frame...
| * term_font_baseline(): only center glyph when a custom line-height is being usedDaniel Eklöf2023-10-10-2/+10
| | | | | | | | | | | | | | | | When using the font's own line-height, simply set the baseline 'descent' pixels above the bottom of the cell. This fixes an issue where some fonts appeared "glued" to the top of the cell, and sometimes getting partially clipped.
| * changelog: fixed font baseline calculationDaniel Eklöf2023-10-10-0/+2
| |
| * Revert "font baseline: use max(font->height, font->ascent + font->descent) when calculating font ↵Daniel Eklöf2023-10-10-1/+1
|/ | | | | | | | | | | | | height" This reverts commit fd813d0e6cfff57cf8a8f55e9a249ddb6fbdb6d6. The intent of the reverted commit was to align font height calculation with cell height calculation. However, it turns out this breaks some fonts. Typically those with large:ish differences in their 'height' attribute, and their ascent+descent value. Closes #1511
* render: better description of why we disable transparency in fullscreenDaniel Eklöf2023-10-10-13/+23
|
* Merge branch 'visual-bell-remastered'Daniel Eklöf2023-10-10-2/+49
|\ | | | | | | Closes #1337
| * changelog: fix issue number for visual bellDaniel Eklöf2023-10-10-2/+2
| | | | | | | | 1508 refers to the pull request, not the feature request.
| * doc: foot.ini.5: move flash{,-alpha} to the bottom of the 'colors' sectionDaniel Eklöf2023-10-10-7/+7
| |
| * doc: foot.ini.5: flash_alpha -> flash-alphaDaniel Eklöf2023-10-10-1/+1
| |
| * foot.ini: flash_alpha -> flash-alphaDaniel Eklöf2023-10-10-1/+1
| |
| * term: remove unneeded (and mostly unused) term->flash{,_alpha}Daniel Eklöf2023-10-10-6/+0
| |
| * doc: foot.ini: flash: tweak grammar, use consistent formattingDaniel Eklöf2023-10-10-10/+5
| |
| * Enable the use of flash as visual bellRaimund Sacherer2023-10-10-2/+60
|/ | | | | | 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.
* render: more fine-grained wayland surface damage trackingDaniel Eklöf2023-10-10-50/+75
| | | | | | | | | Before this patch. Wayland surface damage tracking was done on a per-row basis. That is, even if just one cell was updated, the entire row was "damaged". Now, damage is per cell. This hopefully results in lower latencies in many use cases, and especially on high DPI monitors.
* config: log_contextual_errno(): sync with log_contextual()Daniel Eklöf2023-10-08-3/+12
| | | | ... in terms of whether to print section/value separators
* shm: move definition of FOOT_MFD_FLAGS to the topDaniel Eklöf2023-10-08-5/+6
|
* Merge branch 'search-extend-selection'Daniel Eklöf2023-10-08-112/+615
|\
| * changelog: add the remaining scrollback-up/down bindingsDaniel Eklöf2023-10-08-1/+5
| |
| * config: add remaining search.scrollback key bindingsDaniel Eklöf2023-10-08-3/+91
| | | | | | | | All scrollback up/down key bindings are now available in search mode.
| * search: fix mixup in search_extend_find_line()Daniel Eklöf2023-10-08-59/+69
| | | | | | | | | | | | | | | | | | The has_wrapped_around_{right,left} functions were mixed up, causing false positives and false negatives, resulting in bad search matches. Also make all search_extend_find* functions return a boolean; false means no change in the selection. In this case, we can skip trying to extend the selection, and updating the UI.
| * foot.ini: document all the new search.extend* bindingsDaniel Eklöf2023-10-08-5/+33
| |
| * config: map ctrl+shift+right to extend-to-word-boundaryDaniel Eklöf2023-10-08-1/+1
| |
| * selection: find_word_boundary: ensure row number is boundedDaniel Eklöf2023-10-08-6/+8
| |
| * search: don't try to extend a search match when there is noneDaniel Eklöf2023-10-08-1/+16
| |
| * selection: selection_update() uses view-local coordinatesDaniel Eklöf2023-10-08-7/+12
| |
| * search: add more key bindings to extend the current matchDaniel Eklöf2023-10-08-102/+453
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the following new search key bindings: * extend-char (shift+right) * extend-line-down (shift+down) * extend-backward-char (shift+left) * extend-backward-to-word-boundary (ctrl+shift+left) * extend-backward-to-next-whitespace (ctrl+shift+alt+left) * extend-line-up (shift+up) They can be used to extend the search match (i.e. the selection). This patch also adds an initial set of key bindings to scroll in the scrollback history: * scrollback-up-page * scrollback-down-page These work just like the key bindings for the normal mode. Also note that it was already possible to scroll using the mouse. This patch also fixes a couple of search mode bugs: * crashing when a search match ends in the last column * grapheme clusters not being matched correctly * Search match not being "extendable" after a pointer leave event * A few others, related to either large matches, or extending matches after moving the viewport. There are still a couple of (known) issues: * A search match isn't correctly highlighted if its *starting* point is outside the viewport. * Extending the match to end of the scrollback (i.e. the most recent output) is simply buggy. Related to #419
* render: disable transparency in margins when in fullscreenDaniel Eklöf2023-10-07-2/+14
| | | | | | | This amends 899b768b744c74e88e54e6d8eb32f53accea79d8, where we started disabling transparency in fullscreen Closes #1503
* shm: if defined, set MFD_NOEXEC_SEAL flag for memfd_create6t8k2023-10-05-1/+6
| | | | | | | | | | Effective from Linux 6.3.0 onward, this creates the memfd without execute permissions and prevents that setting from ever being changed. This is a defense-in-depth security measure and prevents a respective kernel warning from being emitted. See https://lwn.net/Articles/918106/ for more information.
* term_reset: log hard vs. soft resetDaniel Eklöf2023-10-04-0/+2
|
* Codespell fixesDaniel Eklöf2023-10-03-1/+1
|
* Codespell fixesDaniel Eklöf2023-10-03-14/+14
|
* wayland: debug: log wm-capabilities as human-readable stringsDaniel Eklöf2023-10-02-4/+39
|
* term: get_font_dpi(): don't crash when there aren't any available monitorsDaniel Eklöf2023-10-01-2/+6
| | | | | | | | | | | | | Seen on plasma; monitor is turned off, and then back on again. Before the "new" output global is emitted, the compositor calls fractional_scale::preferred_scale(). This results in a call to get_font_dpi(), where we crash, since it assumes there is at least one monitor available. Fix by falling back to a DPI of 96. Hopefully closes #1498
* config: apply overrides even if there's no fileAlyssa Ross2023-09-25-22/+21
| | | | | | | | | Previously, foot -a test wouldn't actually set the app ID if there was no config file and the defaults were used, which was very counterintuitive. Now, load_config() will carry on until the end, even if there's no config file, so overrides still work.
* csi: decrqm: 2027: permanently disabled when grapheme-width-method != double-widthDaniel Eklöf2023-09-25-1/+3
|
* csi: implement DECSET/DECRST/DECRQM 2027 - grapheme cluster processingDaniel Eklöf2023-09-25-1/+21
| | | | | | | | | | | This implements private mode 2027 - grapheme cluster processing, as defined in the "Terminal Unicode Core"[1] specification. Internally, we just flip the already existing option "grapheme shaping". Since it's now runtime changeable, we need a copy of it in the terminal struct, rather than referencing the conf object. [1]: https://github.com/contour-terminal/terminal-unicode-core/blob/13fc5a8993a033ff10c1f3433d08cb618cde4ac2/spec/terminal-unicode-core.tex#L50-L53
* dcs: xtgettcap: ignore queries with invalid hex encodingsDaniel Eklöf2023-09-25-7/+6
| | | | | | | | When we receive an XTGETTCAP query, where the capability is not correctly hex encoded, ignore it. Before this patch, we echo:ed it back to the TTY inside an error resonse.
* url-mode: don't strip the file:// prefix from localhost URIsDaniel Eklöf2023-09-21-31/+5
| | | | | | | | | | | | | | | | | Before this patch, the file://<host> prefix was stripped from URIs, when the hostname matched the current host (that is, for "local" URLs). Unfortunately, the way this was done caused other parts of the URI to be stripped as well. For example, the 'query' and 'fragment' parts. This patch simply removes all special casing of file:// URIs. Since the URL is passed to a generic opener (i.e. we don't have a special opener application for file:// URIs), the opener helper must handle the file:// prefix anyway. Closes #1474
* changelog: crash when xdg token is set, but compositor does not support activationDaniel Eklöf2023-09-21-1/+4
|
* wayland: check activation supported before activatingAlyssa Ross2023-09-21-1/+1
| | | | | | | | It's possible for token to be set when the compositor doesn't support activation, and this caused a segfault. For example, this can happen when overriding WAYLAND_DISPLAY to point to a compositor that doesn't support activation, in a terminal running under one that does, and so has set XDG_ACTIVATION_TOKEN.
* doc: keybings default noneSertonix2023-09-20-11/+11
|
* selection: add support for selecting the contents of a quoteDaniel Eklöf2023-09-19-17/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the default of triple clicking, from selecting the current logical row, to first trying to select the contents of the quote under the cursor, and if failing to find a quote, selecting the current row (like before). This is implemented by adding a new key binding, 'select-quote'. It will search for surrounding quote characters, and if one is found on each side of the cursor, the quote is selected. If not, the entire row is selected instead. Subsequent selection operations will behave as if the selection is either a word selection (a quote was found), or a row selection (no quote found). Escaped quote characters are not supported: "foo \" bar" will match 'foo \', and not 'foo " bar'. Mismatched quotes are not custom handled. They will simply not match. Nested quotes ("123 'abc def' 456") are supported. Closes #1364