aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* changelog: kitty modifier no longer clears selection + viewportDaniel Eklöf2024-02-23-0/+2
|
* input: don't clear text selection on modifier keypressesTim Culverhouse2024-02-22-2/+2
| | | | | | | | | When kitty keyboard is enabled, pressing a modifier key will clear the text selection. This makes it difficult to copy text because the selection clears as soon as the user presses "ctrl". Tested-by: Robin Jarry <robin@jarry.cc> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
* shm: use XRGB surfaces when we know we wont be using transparencyDaniel Eklöf2024-02-21-28/+28
|
* input: improved debug logging of key press/releaseDaniel Eklöf2024-02-20-16/+63
| | | | | | * Log which it is: press or release * Include locked modifiers * Include human-readable names of the modifiers
* vt: ignore VS16 (U+FE0F) when grapheme clustering is disabledDaniel Eklöf2024-02-16-1/+7
| | | | | | | | | | This fixes: a) a compilation error with -Dgrapheme-clustering=disabled b) ensures U+FE0F does *not* allocate a two cells when grapheme clustering has been disabled (either compile time, in config, or run-time).
* vt: VS16 - variation selector 16 (emoji representation) should only affect emojisDaniel Eklöf2024-02-15-2/+10
|
* config: map Control+wheel to font increase/decreaseDaniel Eklöf2024-02-15-8/+44
| | | | | | This is in addition to the already existing keyboard shortcuts. Also add missing default keyboard/mouse bindings to readme + foot(1).
* term: erase-scrollback: handle non-existing scrollback historyDaniel Eklöf2024-02-15-0/+16
| | | | | | | | | | | | If scrollback.lines == 0, and the window size (number of rows) is a power of two, all rows are always visible. I.e. there is no scrollback history. This threw off the scrollback erase logic, causing visible rows to be erased, and set to NULL. This triggered a crash when trying to update the view. Closes #1610
* render: always center grid when fullscreened or maximizedDaniel Eklöf2024-02-15-1/+7
|
* csi: support DECRQM queries for ECMA-48 (SM/RM) modesCraig Barnes2024-02-11-5/+30
| | | | | This is in addition to the existing support for DECRQM queries of DEC private modes.
* pgo: render_resize_force() has been removed, adjust stub accordinglyDaniel Eklöf2024-02-08-1/+2
| | | | Closes #1601
* doc: better examples for pipe-* commandsDaniel Eklöf2024-02-07-7/+5
|
* wayland: regression: use correct scaling factor when calling render_resize()Daniel Eklöf2024-02-07-3/+5
| | | | | | | | | | | | When an output property (such as scaling factor) has changed, we need to call render_resize() to ensure the window surface is correct (for example, we may have to change its scale). The width/height parameters are in *logical* pixels (i.e. already scaled). For render_resize() to work correctly when the scale is being changed, it needs to be called with *current* logical size. This means we need to scale our current width/height using the *old* scaling factor.
* input: remove debug loggingDaniel Eklöf2024-02-06-3/+0
|
* pgo: add missing stub for render_refresh_app_id()Daniel Eklöf2024-02-06-0/+1
|
* pgo: fix function prototype for stub function get_current_modifiers()Daniel Eklöf2024-02-06-1/+2
|
* osc: 176 (app-id): implement query+replyDaniel Eklöf2024-02-06-0/+12
| | | | | | | | | | Applications can now query for the current app-id with: \E] 176 ; ? \E\\ The reply is \E] 176 ; <title> \E\\
* Merge branch 'app-id'Daniel Eklöf2024-02-06-2/+103
|\
| * changelog: OSC-176 - set app-idDaniel Eklöf2024-02-06-0/+2
| |
| * osc: add support for osc 176 (app ID)delthas2024-02-06-2/+101
|/ | | | | | | | | | This adds support for a new OSC escape sequence: OSC 176, that lets terminal programs tell the terminal the name of the app that is running. foot then sets the app ID of the toplevel to that ID, which lets the compositor know which app is running, and typically sets the appropriate icon, window grouping, ... See: https://gist.github.com/delthas/d451e2cc1573bb2364839849c7117239
* term: drop term->render.title.is_armedDaniel Eklöf2024-02-06-6/+0
| | | | | | | | | | | | | | | | | This boolean isn't needed. The idea was probably to not re-program the timer unnecessarily, or even to prevent it from being moved forward in time indefinitely. However, the logic has (probably) gone through some changes, that now makes it irrelevant. The timer isn't moved forward indefinitely; it is always set to 8ms from the last title update. The closer we get to that point in time, the smaller the timeout we set. Now, is_armed _did_ prevent the timer from being re-programmed. But that tiny performance tweak isn't really necessary, as the title should, in normal cases, not be set that often anyway.
* doc: foot-ctlseq: add OSC 133 C/D (command output start/end)Daniel Eklöf2024-02-06-0/+6
|
* term: ignore attempts to set a title that contains an invalid UTF-8 sequenceDaniel Eklöf2024-02-06-0/+10
| | | | | | | | | | Setting the title ultimately leads to a call to xdg_toplevel::set_title(). It is a protocol violation to try to set a title that contains an invalid UTF-8 sequence: The string must be encoded in UTF-8. Closes #1552
* changelog: smm+rmmDaniel Eklöf2024-02-06-0/+4
|
* terminfo: smm: enable 8-bit Meta modeDaniel Eklöf2024-02-06-0/+2
| | | | | | | | | | | To enable 8-bit meta mode, we need to: * disable "send ESC when meta modifies a key" (private mode 1036) * enable "8-bit meta mode" (private mode 1034) rmm reverses the above. Closes #1584
* Don't use fancy Unicode quotes, stick to ASCIIDaniel Eklöf2024-02-06-328/+328
|
* readme: shell integration: fix wiki linkDaniel Eklöf2024-02-06-1/+1
|
* readme: add "Piping last command's output" to indexDaniel Eklöf2024-02-06-0/+1
|
* Merge branch 'pipe-command-output'Daniel Eklöf2024-02-06-51/+246
|\
| * grid: resize with reflow: reflow FTCS_COMMAND_{EXECUTED,FINISHED}Daniel Eklöf2024-02-06-27/+29
| |
| * grid: resize without reflow: truncate shell_integration.cmd_{start,end}Daniel Eklöf2024-02-06-1/+3
| | | | | | | | This ensures the cmd start/end columns are valid in the new grid.
| * term: command_output_to_text(): don’t skip FTCS_COMMAND_FINISHED on last rowDaniel Eklöf2024-02-06-2/+6
| |
| * 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
| |