aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* meson/pkgbuild: bump version to 1.6.01.6.0Daniel Eklöf2020-12-18-2/+2
|
* changelog: prepare for 1.6.0Daniel Eklöf2020-12-18-6/+2
|
* changelog: move entry for dpi-aware up, to make it more visibleDaniel Eklöf2020-12-18-7/+7
|
* changelog: use code/monospace highlighting for foot.ini config optionsDaniel Eklöf2020-12-18-17/+17
|
* Merge branch 'dpi-aware-when-scaling-factor-is-one'Daniel Eklöf2020-12-18-37/+84
|\
| * readme: describe the new font sizing behaviorDaniel Eklöf2020-12-17-2/+6
| |
| * fonts: size fonts using the scaling factor when output scaling is enabledDaniel Eklöf2020-12-17-35/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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’.
* | Merge branch 'statusline-terminfo-caps'Daniel Eklöf2020-12-18-0/+7
|\ \ | | | | | | | | | Closes #242
| * | terminfo: add status line capabilities: hs, dsl, fsl and tslDaniel Eklöf2020-12-18-0/+7
|/ / | | | | | | | | | | | | | | | | * hs - boolean, signals status line availability * tsl - to_status_line: begin an OSC 2 sequence (set window title) * fsl - from_status_line: OSC terminator * dsl - disable status line: \E]2;\E\\ - clears the window title Closes #242
* | Merge branch 'gruvbox-light'Daniel Eklöf2020-12-17-0/+21
|\ \ | |/ |/|
| * Add a gruvebox-light themeAdrienLeGuillou2020-12-17-0/+21
|/
* vt: codespell: ony -> onlyDaniel Eklöf2020-12-16-1/+1
|
* vt: don’t ignore extra private/intermediate charactersDaniel Eklöf2020-12-16-58/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take ‘\E(#0’ for example - this is *not* the same as ‘\E(0’. Up until now, foot has however treated them as the same escape, because the handler for ‘\E(0’ didn’t verify there weren’t any _other_ private characters present. Fix this by turning the ‘private’ array into a single 4-byte integer. This allows us to match *all* privates with a single comparison. Private characters are added to the LSB first, and MSB last. This means we can check for single privates in pretty much the same way as before: switch (term->vt.private) { case ‘?’: ... break; } Checking for two (or more) is much uglier, but foot only supports a *single* escape with two privates, and no escapes with three or more: switch (term->vt.private) { case 0x243f: /* ‘?$’ */ ... break; } The ‘clear’ action remains simple (and fast), with a single write operation. Collecting privates is potentially _slightly_ more complex than before; we now need mask and compare, instead of simply comparing, when checking how many privates we already have. We _could_ add a counter, which would make collecting privates easier, but this would add an additional write to the ‘clean’ action which is really bad since it’s in the hot path.
* csi: implement DECRQM (DEC modes), for realDaniel Eklöf2020-12-16-1/+46
| | | | | Previously, we always returned ‘2 - reset’, instead of the actual state of the requested mode.
* changelog: ECMA-4*8*Daniel Eklöf2020-12-16-1/+1
|
* changelog: group ‘bell’ entries togetherDaniel Eklöf2020-12-16-3/+3
|
* readme: add link to IRC channel logDaniel Eklöf2020-12-16-1/+2
|
* config_font_parse(): return fail/successDaniel Eklöf2020-12-15-11/+35
|
* csi: SGR 21 is “double underline”, not “disable bold” (according to ECMA-48)Daniel Eklöf2020-12-14-1/+4
|
* term: enabling application synchronized updates clear pending grid refreshDaniel Eklöf2020-12-14-10/+15
| | | | | | | | | | | This fixes issues with de-synchronized frames being rendered; we may have scheduled a redraw earlier, that hasn’t yet triggered (probably because we’re waiting for a frame callback), when we enable application synchronized updates. This means we risk rendering a partially updated state when the frame callback finally arrives, if the application hasn’t yet ended its synchronized update.
* input: make sure ‘surf_kind’ is not uninitializedDaniel Eklöf2020-12-12-1/+1
|
* csi: fix sub-parameter versions of 38/48 SGR escapesDaniel Eklöf2020-12-12-78/+80
| | | | | | | | | | | | | | | | | | | Well this is embarrassing; the sub-parameter versions of the 38/48 SGR escapes all required an extra ‘:2’ that wasn’t supposed to be there, causing all the other sub-parameters to be shifted one step to the right. That is, foot expected e.g. 38:2:2:r:g:b, or 38:2:5:idx when the correct sequences are 38:2:cs:r:g:b and 38:5:idx. I.e. I mixed up the color-space ID (cs) of 38:2 with *type* of color: RGB or indexed. In addition to fixing this, this patch also adds support for a “bastard” version of the sub-parameter based RGB escapes, where the color-space identifier has been left out: e.g. 38:2:r:g:b. This sequence is invalid, but applications tend to “forget” the color-space ID...
* input: rework mouse button/motion handlingDaniel Eklöf2020-12-12-105/+135
| | | | | | | | | | | | | | | | | | | Store a list of currently pressed buttons, and which surface they belong to (i.e. which surface that received the press). Then, in motion events (with a button pressed, aka drag operations), send the event to the “original” surface (that received the press). Also send release events to the originating surface. This means a surface receiving a press will always receive a corresponding release. And no one will receive a release event without a corresponding press event. Motion events with a button pressed will *always* use the *first* button that was pressed. I.e. if you press a button, start dragging, and then press another button, we keep generating motion events for the *first* button.
* input: report mouse drag events also when the pointer is outside the gridDaniel Eklöf2020-12-11-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as the mouse button was *pressed* while the pointer was inside the grid, we want to keep reporting motion events until the button is released. Even when the pointer moves outside the grid (but in this case, the reported coordinates are bounded by the grid size). This patch also tries to improve multi-button handling (i.e. multiple buttons pressed at the same time), and the events we report to the client for these, in the following ways: * Motion events now report the *initial* button. That is, if you start a drag operation with the LEFT button, then press RIGHT (before releasing LEFT), keep reporting LEFT in the motion events. * Mouse release events are reported for *any* button, as long as the pointer is *inside* the grid, *or*, the button released was the button used to start a drag operation. The last point is important; if we have reported a button press followed by motion events (i.e. a drag operation), we need to report the button release, *even* if the pointer is outside the grid. Note that the client may receive unbalanced button press/release events in the following ways if the user pressed one, and then a second button *inside* the grid, then releases the *first* button (possibly outside the grid), and finally releases the *second* button *outside* the grid. In this case, both buttons will report press events. The first button will report a release event since it is the initial button in the drag operation. However, we don’t track the fact that the second button is being pressed, and thus if it is released outside the grid, it wont generate a release event.
* csi: ‘CSI s’ and ‘CSI u’ now saves/restores attributes and charsetsDaniel Eklöf2020-12-11-0/+6
|
* Merge branch 'osc777-notify'Daniel Eklöf2020-12-11-31/+262
|\ | | | | | | Closes #224
| * config: add ‘notify’ to possible values for ‘bell’ in foot.iniDaniel Eklöf2020-12-10-17/+45
| | | | | | | | | | When `bell=notify`, foot will trigger a desktop notification when it receives a BEL in an unfocused window.
| * notify: don’t emit notification when we’re focusedDaniel Eklöf2020-12-10-0/+5
| |
| * notify: break out desktop notifications from osc.cDaniel Eklöf2020-12-10-91/+117
| |
| * osc: implement urxvt’s “OSC 777;notify”Daniel Eklöf2020-12-09-12/+184
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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}’
* Merge branch 'remove-deprecated-things'Daniel Eklöf2020-12-09-116/+11
|\
| * config: remove support for scrollback-up and scrollback-downDaniel Eklöf2020-12-08-51/+3
| |
| * config: remove support for default.geometryDaniel Eklöf2020-12-08-16/+2
| |
| * config: remove support for default.scrollbackDaniel Eklöf2020-12-08-22/+1
| |
| * config: remove support for loading configuration from footrcDaniel Eklöf2020-12-08-26/+4
| |
| * completions: zsh: foot: fix default path of foot.iniDaniel Eklöf2020-12-08-1/+1
| |
* | changelog: don’t repeat ‘IME’Daniel Eklöf2020-12-08-1/+1
| |
* | changelog: add missing space in escape sequenceDaniel Eklöf2020-12-08-1/+1
| |
* | changelog: consistently use ‘CSI ? X h/l’ instead of `\E[?Xh/l`Daniel Eklöf2020-12-08-5/+5
| |
* | Merge branch 'input-method-editor'Daniel Eklöf2020-12-08-83/+1085
|\ \ | |/ |/| | | Closes #134
| * install: simplify sentenceDaniel Eklöf2020-12-08-1/+1
| |
| * render: ime: ensure cursor is visibleDaniel Eklöf2020-12-08-13/+41
| |
| * changelog: DECSET 737769 - enable/disable IMEDaniel Eklöf2020-12-07-0/+3
| |
| * render: search: render IME pre-edit text correctly, hopefullyDaniel Eklöf2020-12-07-61/+116
| |
| * ime: don’t underline characters inside the cursor-boxDaniel Eklöf2020-12-07-117/+123
| |
| * search: reset IME state when entering/exiting search modeDaniel Eklöf2020-12-07-0/+12
| |
| * render: ime: adjust cursor cell index when adjusting glyph offsetDaniel Eklöf2020-12-07-1/+4
| |
| * render: ime: wip: pre-editDaniel Eklöf2020-12-07-22/+75
| |
| * ime: call render_refresh_search() instead of render_refresh()Daniel Eklöf2020-12-07-2/+8
| | | | | | | | When scrollback search is active
| * ime: store wchar version of pre-edit string in terminal structDaniel Eklöf2020-12-07-4/+8
| |
| * render: search: don’t access term->search.buf[] directlyDaniel Eklöf2020-12-07-8/+11
| |
| * render: codespell: cound -> countDaniel Eklöf2020-12-07-1/+1
| |
| * render: search: glyph_offset is in *cells*, cursor position in *characters*Daniel Eklöf2020-12-07-18/+70
| | | | | | | | | | | | When calculating the offset into the search string, from where to start rendering, take into account that the cursor position is in *characters*, and the glyph-offset is in *cells*.
| * render: search: wcsnlen() -> wcswidth()Daniel Eklöf2020-12-07-1/+1
| |
| * render: search: handle multi-column charactersDaniel Eklöf2020-12-07-2/+3
| |
| * render: search: render colorized glyphs (emojis) correctlyDaniel Eklöf2020-12-07-5/+13
| |
| * ime: commit text using search_add_chars() while in scrollback search modeDaniel Eklöf2020-12-07-7/+8
| |
| * search: new function: search_add_chars()Daniel Eklöf2020-12-07-4/+5
| | | | | | | | | | This function inserts a string into the search buffer, at the current insertion point (i.e. where the cursor is).
| * ime: don’t commit to the slave while scrollback searchingDaniel Eklöf2020-12-07-5/+9
| |
| * render: ime: don’t render pre-edit string in grid while searchingDaniel Eklöf2020-12-07-0/+3
| | | | | | | | | | | | | | | | | | While doing a scrollback search, the pre-edit string should be rendered in the search box, not in the grid. Note that we don’t yet support IME in scrollback search mode. This patch simply prevents the pre-edit text being rendered in the grid, in the “background”, while searching.
| * install: highlight option default value in options listDaniel Eklöf2020-12-07-1/+1
| |
| * install: highlight option name in options listDaniel Eklöf2020-12-07-3/+3
| |
| * changelog: ime: add link to INSTALL.mdDaniel Eklöf2020-12-07-1/+3
| |
| * install: add ‘options’ section, describing compile-time optionsDaniel Eklöf2020-12-07-0/+10
| |
| * changelog: IME supportDaniel Eklöf2020-12-07-0/+1
| |
| * csi: add DECSET 737769 - enables/disables IME inputDaniel Eklöf2020-12-07-0/+10
| | | | | | | | 73 77 69 = I M E
| * codespell: currenly -> currently, second instanceDaniel Eklöf2020-12-07-1/+1
| |
| * codespell: currenly -> currentlyDaniel Eklöf2020-12-07-1/+1
| |
| * features: include compile-time enable/disable state of features when printing versionDaniel Eklöf2020-12-07-3/+37
| |
| * render: ime: draw a ‘bar’ cursor when the pre-edit cursor’s begin == endDaniel Eklöf2020-12-07-6/+14
| |
| * shm: fix badly indented function return typeDaniel Eklöf2020-12-07-1/+1
| |
| * ime: add functions to enable/disable IME, simplify code that enables IMEDaniel Eklöf2020-12-07-47/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may want to be able to enable/disable IME run-time, even though we have received an ‘enter’ IME event. This enables us to do that. Also add functions to enable/disable IME on a per-terminal instance basis. A terminal may have multiple seats focusing it, and enabling/disabling IME in a terminal instance enables/disables IME on all those seats. Finally, the code to enable IME is simplified; the *only* surface that can ever receive ‘enter’ IME events is the main grid. All other surfaces are sub-surfaces, without their own keyboard focus.
| * ime: expand cursor cell-end across multi-cell charactersDaniel Eklöf2020-12-07-0/+7
| | | | | | | | | | This fixes an issue where the cursor ended in the middle of e.g double width characters.
| * ime: don’t adjust cursor’s cell-end if it’s equal to the cell-beginDaniel Eklöf2020-12-07-6/+12
| |
| * ime: set cursor end correctly when it ends *after* the pre-edit stringDaniel Eklöf2020-12-07-0/+3
| |
| * ime: use correct index when calculating number of *cells* to advanceDaniel Eklöf2020-12-07-1/+1
| |
| * render: ime: don’t render cursor if cursor begin == endDaniel Eklöf2020-12-07-3/+4
| |
| * render: ime: calculate on-screen cursor position ourselvesDaniel Eklöf2020-12-07-3/+12
| | | | | | | | | | | | | | | | The position calculated by render_grid() may be -1,-1 if the cursor is currently hidden. This fixes a crash when trying to input IME while the cursor is hidden.
| * ime: calculate wchar widths onceDaniel Eklöf2020-12-07-3/+8
| |
| * render: ignore IME preedit state when deciding which cursor style to renderDaniel Eklöf2020-12-07-1/+1
| |
| * ime: make IME compile-time optionalDaniel Eklöf2020-12-07-29/+103
| |
| * ime: render pre-edit textDaniel Eklöf2020-12-07-52/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by allocating cells for the pre-edit text when receiving the text-input::done() call, and populating them by converting the utf-8 formatted pre-edit text to wchars. We also convert the pre-edit cursor position to cell positions (it can cover multiple cells). When rendering, we simply render the pre-edit cells on-top off the regular grid. While doing so, we also mark the underlying, “real”, cells as dirty, to ensure they are re-rendered when the pre-edit text is modified or removed.
| * ime: wip: commit all changes in ‘done()’Daniel Eklöf2020-12-07-6/+64
| |
| * ime: feed committed string to client applicationDaniel Eklöf2020-12-07-0/+4
| |
| * ime: disable text-input on surface leaveDaniel Eklöf2020-12-07-2/+4
| |
| * ime: wip: add text-input object to seatDaniel Eklöf2020-12-07-0/+147
|/
* changelog: DECSET 27127 - modifies Esc to send \E[27127~ instead of \EDaniel Eklöf2020-12-07-0/+3
|
* Merge branch 'allow-key-collision-if-action-is-the-same'Daniel Eklöf2020-12-07-4/+17
|\ | | | | | | Closes #233
| * config: ignore “self” when detecting key binding collisionsDaniel Eklöf2020-12-05-4/+17
|/ | | | | | | | | | | | | | | | | | | | | | | Previously, foot would not accept the following: [key-bindings] minimize=Escape minimize=Escape Now it does. I.e. key combos in the action being updated are ignored when detecting collisions. The example above is contrived; a real world example could be to remove certain combos from an action with multiple combos; perhaps to free up a combo for another action. Example: [search-bindings] cancel=Escape This would previously cause an error since `cancel=Control+g Escape` by default. Closes #233
* changelog: remove ‘crash when pasting non-textual clipboard content’Daniel Eklöf2020-12-05-4/+0
| | | | This crash doesn’t not exist in any release versions.
* fdm: do *not* keep polling on EINTRDaniel Eklöf2020-12-04-5/+4
| | | | | | This fixes an issue where foot --server did not exit on SIGINT. This happened because we never returned out from fdm_poll(), and thus we never saw ‘aborted’ being set.
* Merge branch 'releases/1.5'Daniel Eklöf2020-12-01-15/+31
|\
| * meson/pkgbuild: bump version to 1.5.41.5.4releases/1.5Daniel Eklöf2020-12-01-2/+2
| |
| * input: relax requirements for overriding keypad application modeDaniel Eklöf2020-12-01-9/+1
| | | | | | | | | | | | Don’t require NumLock to be locked. Foot has no idea _which_ modifier the user has mapped NumLock to, meaning we really cannot require it to be locked.
| * keymap: add ‘CSI 27;<mod>;27~’ escapes for Esc with modifiersDaniel Eklöf2020-12-01-0/+16
| |
| * doc: foot.5: minor highlighting fixesDaniel Eklöf2020-12-01-5/+6
| |
| * doc: foot.1: no need to say foot.ini twiceDaniel Eklöf2020-12-01-1/+1
| |
| * changelog: update contributorsDaniel Eklöf2020-12-01-0/+5
| |
| * render: don’t call term_arm_blink_timer() from multiple threadsDaniel Eklöf2020-12-01-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We call term_arm_blink_timer() from render_cell(), which runs in multiple threads. This caused multiple blink timer FDs to be created and registered with the FDM, later causing read failures after one of those FDs had been closed again. This rarely happened under normal circumstances, but was easy to trigger when the whole screen was full of blinking text. As a small optimization, we don’t bother taking the lock if the timer FD already is valid. This is safe, because: 1) If the timer FD isn’t valid, we take the lock and then call term_arm_blink_timer(), which again checks if the FD is already valid. 2) The blink timer FD cannot be closed while we’re rendering cells. It is only disabled in the FDM callback, which cannot execute while we’re rendering.
| * sixel: fix crash when an explicit sixel size had a height less than 6 pixelsDaniel Eklöf2020-12-01-4/+2
| |