aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* meson/pkgbuild: bump version to 1.9.01.9.0Daniel Eklöf2021-08-27-2/+2
|
* changelog: prepare for 1.9.0Daniel Eklöf2021-08-27-5/+4
|
* doc: foot{,,client}: document TERMINFODaniel Eklöf2021-08-27-0/+46
| | | | Closes #691
* meson: run generate_version.sh in a C localeDaniel Eklöf2021-08-25-2/+3
| | | | | | | | Previously, only the date command inside the script was run with LC_TIME=C. But there’s no reason to be that conservative; we absolutely do not want _anything_ in that script to generate locale dependent output.
* Merge branch 'terminfo'Daniel Eklöf2021-08-19-28/+20
|\ | | | | | | Closes #687
| * slave: set TERMINFO instead of TERMINFO_DIRSDaniel Eklöf2021-08-18-28/+20
|/ | | | | | | | | This seems to be slightly better supported than TERMINFO_DIRS. It also simplifies our code, since it’s no longer an issue of whether to append or not - we just set TERMINFO, and ignore whatever it was set to before. Also closes #687
* changelog: cursor.blink now works in GNOMEDaniel Eklöf2021-08-18-0/+2
|
* Merge branch 'terminfo-dirs'Daniel Eklöf2021-08-17-81/+191
|\ | | | | | | Closes #671
| * terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRSDaniel Eklöf2021-08-17-81/+191
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* term: check visual-focus, not kbd-focus when enabling/disabling cursor blinkDaniel Eklöf2021-08-17-2/+5
| | | | | | | | | | | | term_cursor_blink_update() is called when the visual focus changes state (i.e. when our top-level surface is activated de-activated). Checking keyboard focus worked on Sway, but on e.g. GNOME, the order in which keyboard focus and visual focus are updated is different, and we ended up either making the cursor invisible, or visible, but not blinking, when changing focus back to the window. Closes #686
* Merge branch 'selection-modify-only-use-one-cell-bit'Daniel Eklöf2021-08-16-27/+60
|\
| * selection: modify: no need to check for NULL before calling free()Daniel Eklöf2021-08-16-4/+1
| |
| * selection: modify: convert ‘keep_selection’ bitmask from uint64_t to uint8_tDaniel Eklöf2021-08-16-11/+11
| |
| * selection: modify: replace reset_context() macro with a functionDaniel Eklöf2021-08-16-9/+9
| |
| * selection: don’t require two cell attr bits for selection updatingDaniel Eklöf2021-08-16-27/+63
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When updating the selection (i.e when changing it - adding or removing cells to the selection), we need to do two things: * Unset the ‘selected’ bit on all cells that are no longer selected. * Set the ‘selected’ bit on all cells that *are* selected. Since it’s quite tricky to calculate the difference between the “old” and “new” selection, this is done by first un-selecting the old selection, and then selecting the new, updated selection. I.e. first we clear the ‘selected’ bit from *all* cells, and then we re-set it on those cells that are still selected. This process also dirties the cells, to make sure they are re-rendered (needed to reflect their new selected/un-selected status). To avoid dirtying *all* previously selected, and newly selected cells, we have used an algorithm that first runs a “pre-pass”, marking all cells that *will* be selected as such. The un-select pass would then skip (no dirty) cells that have been marked by the pre-pass. Finally, the select pass would only dirty cells that have *not* been marked by the pre-pass. In short, we only dirty cells whose selection state have *changed*. To do this, we used a second ‘selected’ bit in the cell attribute struct. Those bits are *scarce*. This patch implements an alternative algorithm, that frees up one of the two ‘selected’ bits. This is done by lazy allocating a bitmask for the entire grid. The pre-pass sets bits in the bitmask. Thus, after the pre-pass, the bitmask has set bits for all cells that *will* be selected. The un-select pass simply skips cells with a one-bit in the bitmask. Cells without a one-bit in the bitmask are dirtied, and their ‘selected’ bit is cleared. The select-pass doesn’t even have to look at the bitmask - if the cell already has its ‘selected’ bit set, it does nothing. Otherwise it sets it and dirties the cell. The bitmask is implemented as an array of arrays of 64-bit integers. Each outer element represents one row. These pointers are calloc():ed before starting the pre-pass. The pre-pass allocates the inner arrays on demand. The unselect pass is designed to handle both the complete absence of a bitmask, as well as row entries being NULL (both means the cell is *not* pre-marked, and will thus be dirtied).
* Merge branch 'tempus-themes'Daniel Eklöf2021-08-15-0/+448
|\
| * add tempus themesGadzhi Kharkharov2021-08-14-0/+448
| | | | | | | | | | | | | | | | rebuild with cursor colors rebuilt with commented selection colors rebuild with commented cursor colors
* | Merge branch 'terminfo-remove-keypad'Daniel Eklöf2021-08-14-21/+12
|\ \ | | | | | | | | | Closes #670
| * | changelog: mention keypad application mode keys being removedDaniel Eklöf2021-08-14-0/+4
| | |
| * | changelog: mention km/smm/rmm being removedDaniel Eklöf2021-08-14-0/+8
| | |
| * | terminfo: remove keypad key caps (for keypad application mode)Daniel Eklöf2021-08-14-18/+0
| | | | | | | | | | | | | | | The keypad application mode gated by private mode 1035. I.e. by default, there _is_ no keypad application mode in foot.
| * | terminfo: remove km/smm/rmmDaniel Eklöf2021-08-14-3/+0
|/ / | | | | | | | | | | | | | | By default, foot prefixes Alt-<key> combos with ESC, instead of setting the 8:th “meta” bit. In this mode, smm/rmm has no effect. This mode _can_ be disabled, by resetting private mode 1036. However, the terminfo should reflect the terminal’s *default* behavior.
* | Merge branch 'pt-or-px-scaling'Daniel Eklöf2021-08-14-46/+62
|\ \ | |/ |/| | | Closes #680
| * pt-or-px: heed the dpi-aware settingDaniel Eklöf2021-08-13-46/+62
|/ | | | | | | | | | | | | | | | | | | | | | | | Before this patch, pt-or-px values, like letter-spacing, were *always* scaled using the current DPI value. This is wrong; if the fonts are scaled using the output’s scaling factor, then so should all other point values. This also fixes an issue where e.g. letter-spacing would use one DPI value at startup, but then when increasing/decreasing or resetting the font size, would be re-calculated using a different DPI value, leading to completely different spacing. This happened when there were multiple monitors, with different DPI values, and foot guessed the initial DPI value wrong. Normally, foot would correct itself as soon as the window was mapped, and the “correct” DPI value known. But if the fonts were scaled using the scaling factor, it was possible that the font reload never happened. This patch also updates the thickness calculation (for LIGHT and HEAVY box drawing characters) to use the scaling factor when appropriate. Closes #680
* readme: change "32bpp" to "24bpp" in features listCraig Barnes2021-08-12-1/+1
| | | | | This is somewhat ambiguous, but in a terminal context "True Color" is usually synonymous with 24-bit RGB (as opposed to 32-bit RGBA).
* Merge branch 'sixel-left-most-column-overwritten'Daniel Eklöf2021-08-11-18/+70
|\
| * render: run the “overflowing glyphs” prepass *before* rendering sixelsDaniel Eklöf2021-08-11-18/+70
|/ | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where the left-most column of a sixel was “overwritten” by the cell content. This patch also rewrites the prepass logic, to try to reduce the number of loads performed. The new logic loops each row from left to right, looking for dirty cells. When a dirty cell is found, we first scan backwards, until we find a non-overflowing cell. That cell is unaffected by the overflowing cell we’re currently dealing with. We can also stop as soon as we see a dirty cell, since that cell will already have been dealt with. Then, we scan forward, dirtying cells until we see a non-overflowing cell. That first non-overflowing cell is also dirtied, but after that we break. The last loop, that scans forward, advances the same cell pointer used in the outer loop.
* Merge branch 'uri-characters'Daniel Eklöf2021-08-11-41/+116
|\ | | | | | | Closes #654
| * changelog: url.uri-charactersDaniel Eklöf2021-08-09-0/+2
| |
| * config: add url.uri-charactersDaniel Eklöf2021-08-09-41/+114
|/ | | | | | | | | | | | 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
* meson: require meson >= 0.54Daniel Eklöf2021-08-08-1/+1
| | | | We use meson.override_dependency, which was added in 0.54
* editorconfig: adjust max-line-length, down from 80 to 70Daniel Eklöf2021-08-07-1/+1
|
* Merge branch 'mouse-wheel-tilt'Daniel Eklöf2021-08-07-29/+55
|\
| * input: implement support for mouse wheel left/rightDaniel Eklöf2021-08-07-29/+55
|/ | | | | | | | | | | | | We now emit button 6/7 events (when the client application grabs the mouse). This buttons map to mouse wheel horizontal scroll events. Or, left/right tilting, if you like. Wayland report these as ‘axis’ events (just like regular scroll wheel events), and thus we need to translate those scroll events to button events. libinput does not define any mouse buttons for wheel tilts, so we add our own defitions. These are added last in the BTN_* range, just before the BTN_JOYSTICK events.
* Revert "terminfo: add ich1=\E[@"Daniel Eklöf2021-08-07-2/+0
| | | | | | This reverts commit 76fab8cf695b8e18e9f07d383189a34ca129e3ac. See https://codeberg.org/dnkl/foot/issues/668#issuecomment-246149
* input: codespell: follwing -> followingDaniel Eklöf2021-08-06-1/+1
|
* Merge branch 'gnome-drag-workaround'Daniel Eklöf2021-08-06-1/+47
|\
| * input: workaround GNOME messing up pointer leave/enter after moving windowDaniel Eklöf2021-08-06-1/+47
|/ | | | | | | | | | GNOME doesn’t send pointer enter after finishing a window move. In subsequent move operations, it is also possible to make it skip sending pointer leave when starting the move operations. This caused foot to assert in debug builds, and add the same button multiple times to the list of buttons currently being pressed.
* Merge branch 'terminfo-kmous-xm'Daniel Eklöf2021-08-06-7/+5
|\
| * terminfo: change kmous to \E[<, add XM+xm capabilitiesDaniel Eklöf2021-08-06-7/+5
|/ | | | | | | | | | | ncurses has had a bug where mouse support is completely disabled if the terminfo didn’t have kmous=\E[M, *or*, the terminfo *name* contained ‘xterm’. This appears to have been fixed. Thus, change kmous to \E[<, and set xm/XM accordingly. With this, ncurses application will use the SGR mouse reporting mode, instead of the legacy reporting mode.
* Merge branch 'terminfo-ich1'Daniel Eklöf2021-08-06-0/+2
|\
| * terminfo: add ich1=\E[@Daniel Eklöf2021-08-06-0/+2
|/
* Merge branch 'box-drawing-realign-sextants-and-wedges'Daniel Eklöf2021-08-06-47/+62
|\
| * box-drawing: fix compiler warningDaniel Eklöf2021-08-06-1/+1
| | | | | | | | | | | | | | | | | | | | ../../box-drawing.c: In function 'box_drawing': ../../box-drawing.c:2774:13: error: 'y1' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2774 | int y0, y1; | ^~ ../../box-drawing.c:2774:9: error: 'y0' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2774 | int y0, y1; | ^~
| * box-drawing: re-align sextants and wedgesDaniel Eklöf2021-08-06-47/+62
|/ | | | | Improve the visual quality of sextants (and wedges) when the cell height isn’t a multiple of three.
* Merge branch 'box-drawing-size-optimize'Daniel Eklöf2021-08-06-159/+140
|\
| * box-drawing: don’t inline functions called for multiple codepointsDaniel Eklöf2021-08-05-5/+5
| | | | | | | | | | In several cases, this expanded to multiple calls, and when inlined, resulted in much larger code size.
| * box-drawing: wedges: pre-load x_halfs[] and y_thirds[]Daniel Eklöf2021-08-05-64/+71
| | | | | | | | This reduces the number of loads in the rest of the function.
| * box-drawing: wedges: avoid floating point mathDaniel Eklöf2021-08-05-68/+66
| | | | | | | | | | Re-use the pre-calculated offsets used by the sextants. This is the correct thing to do since wedges *should* align with sextants.
| * box-drawing: pre-calculate sextant x,y offsetsDaniel Eklöf2021-08-05-6/+19
| | | | | | | | | | | | | | | | We’re using floating point math, as a way to ensure that sextant primitives overlap, rather than leaving empty spaces, or being uneven, when the cell width/height isn’t divisible with 2 (width) or 3 (height). This gets rid of all floating point math from the sextant drawing functions.
| * box-drawing: deal with quads in the same as sextantsDaniel Eklöf2021-08-05-79/+42
| | | | | | | | | | | | That is, encode which “pieces” make up each quad in a static array, and use a single function to draw all quads using the four primitives “upper left/right, lower left/right”.
| * box-drawing: don’t inline horizontal-one-eighth-block-NDaniel Eklöf2021-08-05-1/+1
| |
| * box-drawing: don’t inline light diagionalDaniel Eklöf2021-08-05-2/+2
|/
* Merge branch 'box-drawing-wedges'Daniel Eklöf2021-08-05-15/+356
|\ | | | | | | Closes #474
| * box-drawing: wedges: fix alignment of inverted wedgesDaniel Eklöf2021-08-05-33/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | We render the inverted wedges by first rendering a non-inverted triangle, and then inverting it with PIXMAN_OP_OUT. In cases where truncating and round():ing the triangle points have different results, the final, inverted wedge ends up being unaligned with the corresponding sixel(s). This patch fixes that by handling the pre-inverted triangles specifically. I.e. we don’t re-use the same triangle coordinates as the corresponding non-inverted triangle.
| * box-drawing: wedges: don’t group similar cases togetherDaniel Eklöf2021-08-05-48/+100
| | | | | | | | | | Since they’re not exactly alike, we still need branches within each case. Better to split them up - one case per codepoint.
| * box-drawing: add U+1FB3C-U+1FB6F, U+1FB9A and U+1FB9BDaniel Eklöf2021-08-05-15/+228
|/ | | | | | These are the “wedges” from the Unicode 13 “Legacy Computing” symbols. Closes #474
* term: disable debug loggingDaniel Eklöf2021-08-05-1/+1
|
* Merge branch 'async-client-termination'Daniel Eklöf2021-08-03-66/+212
|\
| * term: send SIGTERM/SIGKILL to the entire process groupDaniel Eklöf2021-07-31-8/+10
| |
| * changelog: asynchronous client application terminationDaniel Eklöf2021-07-31-0/+6
| |
| * term: fix release builds when LOG_ENABLE_DBG=0Daniel Eklöf2021-07-31-1/+2
| |
| * term: consolidate shutdown related state into an anonymous structDaniel Eklöf2021-07-31-39/+48
| |
| * term: rename: slave_died() -> fdm_client_terminated()Daniel Eklöf2021-07-31-5/+6
| |
| * term: asynchronous client application terminationDaniel Eklöf2021-07-31-43/+170
|/ | | | | | | | | | | | | | | | | | When the foot window is closed, and we need to terminate the client application, do this in an asynchronous fashion: * Don’t do a blocking call to waitpid(), instead, rely on the reaper callback * Use a timer FD to implement the timeout before sending SIGKILL (instead of using SIGALRM). * Send SIGTERM immediately (we used to *just* close the PTY, and then wait 2 seconds before sending SIGTERM). * Raise the timeout from 2 seconds to 60 Full shutdown now depends on *two* asynchronous tasks - unmapping the window, and waiting for the client application to terminate. Only when *both* of these have completed do we proceed and call term_destroy(), and the user provided shutdown callback.
* Merge branch 'tilde-expansion-in-include'Daniel Eklöf2021-07-31-9/+28
|\ | | | | | | Closes #659
| * config: include: use xasprintf() instead of two calls to snprintf()Daniel Eklöf2021-07-30-3/+1
| |
| * doc: foot.ini: include paths are allowed to begin with ~/Daniel Eklöf2021-07-30-6/+4
| |
| * config: include: handle get_user_home_dir() returning NULLDaniel Eklöf2021-07-30-2/+9
| |
| * config: include: add support for ~-expansionDaniel Eklöf2021-07-30-1/+17
| | | | | | | | Closes #659
* | editorconfig: don’t trim trailing whitespace in *.scdDaniel Eklöf2021-07-30-4/+2
| | | | | | | | Doing so ruins the indentation of empty-line separated paragraphs.
* | client: remove info log of client app’s exit-codeDaniel Eklöf2021-07-30-2/+0
|/
* doc: foot.ini: indent listsDaniel Eklöf2021-07-30-14/+14
|
* Merge branch 'editorconfig'Daniel Eklöf2021-07-28-0/+19
|\
| * editorconfig: initialDaniel Eklöf2021-07-28-0/+19
|/
* Merge branch 'bright_bold'Daniel Eklöf2021-07-26-2/+8
|\
| * Only brighten palette colors with bold-text-in-bright=palette-basedDavid Rosca2021-07-26-2/+8
|/
* changelog: initialize output scaling factor to 1Daniel Eklöf2021-07-26-0/+5
|
* wayland: set scale to 1 by defaultNihal Jere2021-07-26-0/+1
| | | | | The wl_output protocol specifies that the client should assume that scale is 1 if not set by the compositor.
* readme: mention XTVERSIONDaniel Eklöf2021-07-25-0/+5
|
* Merge branch 'dont-hang-when-wl-connection-is-broken'Daniel Eklöf2021-07-25-1/+11
|\ | | | | | | Closes #651
| * wayland: prevent hang when terminating due to broken Wayland connectionDaniel Eklöf2021-07-24-1/+11
|/ | | | | | | | | | | | | | | | | | | | | If the call to fdm_wayl() with EPOLLHUP was followed by calls to wayl_roundtrip(), foot would hang. The reason for this is that the EPOLLHUP handler in fdm_wayl() would call wl_display_cancel_read(). wayl_roundtrip() also calls wl_display_cancel_read() (since we normally have called wl_display_prepare_read()), before calling wl_display_roundtrip(). When calling wl_display_cancel_read() two times in a row, without a wl_display_prepare_read() in between, wl_display_roundtrip() hangs. Fix by not calling wl_display_cancel_read() in fdm_wayl(). This ensures our invariant holds: wl_display_prepare_read() is *always* in effect outside of fdm_wayl(). Closes #651
* doc: meson: no need to check for scdoc againDaniel Eklöf2021-07-24-1/+0
| | | | We’re already checking for scdoc in the top-level meson.build
* meson: add -Ddocs=disabled|enabled|auto command line optionDaniel Eklöf2021-07-24-6/+18
| | | | | When enabled (the default, if scdoc is found), we build and install the man pages, example foot.ini, readme, changelog and license files.
* Merge branch 'csd-title'Daniel Eklöf2021-07-24-86/+268
|\ | | | | | | Closes #638
| * doc: foot.ini: mention that csd.font is sized using the title bar sizeDaniel Eklöf2021-07-24-1/+3
| |
| * foot.ini: add csd.fontDaniel Eklöf2021-07-24-0/+1
| |
| * render: render_osd(): use fcft_text_run_rasterize(), if availableDaniel Eklöf2021-07-24-6/+32
| |
| * render: render_osd(): fix rendering of color bitmap glyphsDaniel Eklöf2021-07-24-6/+11
| |
| * render: render_osd(): don’t re-instantiate foreground color for each glyphDaniel Eklöf2021-07-24-0/+2
| |
| * render: render_osd(): don’t assume a monospace fontDaniel Eklöf2021-07-24-6/+1
| |
| * config: add csd.font optionDaniel Eklöf2021-07-24-18/+95
| |
| * changelog: window title in CSDsDaniel Eklöf2021-07-24-0/+5
| |
| * render: csd_title(): use a custom font, sized based on the title bar’s heightDaniel Eklöf2021-07-24-3/+43
| | | | | | | | | | | | | | | | We still use the primary font, but use a custom size, based on the title bar’s height. This fixes an issue where the window title could be way too small, or way too big. And changed size when the terminal font size was changed.
| * render: render_osd() now needs a ‘font’ argumentDaniel Eklöf2021-07-24-3/+3
| |
| * render: render_osd(): pass font as argumentDaniel Eklöf2021-07-24-5/+9
| |
| * render: refresh CSD in render_refresh_title(), not render_update_title()Daniel Eklöf2021-07-24-1/+2
| | | | | | | | | | This fixes an issue where the CSD title sometimes got stuck on an “old” title.
| * render: refresh CSDs when updating the titleDaniel Eklöf2021-07-24-0/+1
| |
| * render: csd_title(): use render_osd() to render the current window titleDaniel Eklöf2021-07-24-11/+25
| |
| * render: must now set alpha in bg color when calling render_osd()Daniel Eklöf2021-07-24-4/+4
| |