aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * config: don’t inline str_to_*() functionsDaniel Eklöf2021-05-07-8/+8
| |
| * config: implement LOG_AND_NOTIFY_* macros in terms of no-inline functionsDaniel Eklöf2021-05-07-35/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduces code size by quite a lot: From: section size addr .text 37857 0 ... Total 45169 To: section size addr .text 31681 0 ... Total 38993 LTO release build goes from 500K -> 492K
| * xmalloc: export xvasprintf()Daniel Eklöf2021-05-07-1/+3
| |
| * log: add va_list versions of log_* functionsDaniel Eklöf2021-05-07-33/+73
| |
* | Merge branch 'color-table-config'Daniel Eklöf2021-05-08-4/+28
|\ \ | |/ |/| | | Closes #489
| * configure full color palette in foot.iniRyan Farley2021-05-08-4/+28
|/ | | | | Allow the use of numeric keys in [colors] to configure the full set of 256 colors in the palette. Fixes #489
* Merge branch 'bell-enhancement'Daniel Eklöf2021-05-07-54/+125
|\
| * consistent booleans in config, reset legacy bellRyan Farley2021-05-07-6/+12
| |
| * update changelogRyan Farley2021-05-07-0/+6
| |
| * clearly mark bell as a sectionRyan Farley2021-05-07-1/+1
| |
| * style, consistent bool names, deprecate old configRyan Farley2021-05-07-6/+32
| |
| * enhanced bell configurationRyan Farley2021-05-07-63/+96
| | | | | | | | | | | | | | | | | | | | Add a separate section for bell configuration, with a bell-specific command option and a setting to allow that command to run without regard to keyboard focus (for those of us who enjoy being beeped at at all times, for example). The actions are also no longer mutually exclusive; this is primarily anticipating urgency support which cannot be replicated outside the process (in server mode anyway) and would thus be complementary to any notification or arbitrary command.
* | Merge branch 'bump-fcft-to-2-4-0'Daniel Eklöf2021-05-07-1/+3
|\ \ | |/ |/|
| * meson: require fcft >= 2.4Daniel Eklöf2021-05-07-1/+3
|/
* Merge branch 'fix-color-cube'Daniel Eklöf2021-05-06-3/+10
|\ | | | | | | Closes #479
| * config: fix color cube generationDaniel Eklöf2021-05-06-3/+10
|/ | | | Closes #479
* doc: foot.ini: update max-shm-pool-size-mb sectionDaniel Eklöf2021-05-05-7/+10
| | | | | | | * less highlighting * it’s ‘virtual *address space*’ * mention it’s only supported on Linux * mention it’s only supported on 64-bit archs (but not necessarily x86_64)
* Merge branch 'more-unicode-13-box-drawings'Daniel Eklöf2021-05-04-6/+260
|\ | | | | | | Related to #471
| * box-drawing: add Unicode 13 U+1FB70 - U+1FB8BDaniel Eklöf2021-05-04-6/+260
|/ | | | Part of #471
* Merge branch 'bg-alpha-on-default-bg-only'Daniel Eklöf2021-05-04-4/+8
|\
| * render: only apply alpha when we’re using the default bg for backgroundDaniel Eklöf2021-05-04-4/+8
|/ | | | | | | | In all other cases, alpha is disabled. This includes: * Palette- or RGB-colors matching the default background color * When any kind of reverse video is enabled (e.g. DECSCNM, or ANSI reverse)
* Merge branch 'missing-xkb-build-dependency'Daniel Eklöf2021-05-04-3/+3
|\
| * meson: add ‘xkb’ as a dependency to vtlib, pgolib and pgoDaniel Eklöf2021-05-01-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of these include wayland.h (either directly, or indirectly), which pulls in xkbcommon.h. Reported by swayyyy on IRC: FAILED: libvtlib.a.p/dcs.c.o In file included from ../../terminal.h:19, from ../../dcs.h:4, from ../../dcs.c:1: ../../wayland.h:9:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory 9 | #include <xkbcommon/xkbcommon.h> | ^
* | Merge branch 'custom-exit-code'Daniel Eklöf2021-05-04-21/+57
|\ \ | | | | | | | | | Closes #466
| * | doc: foot.1 footclient.1: document exit statusDaniel Eklöf2021-05-04-3/+24
| | |
| * | main/client: change exit codeDaniel Eklöf2021-05-04-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | * foot exits with -26/230 * footclient exits with -36/220 This is to give each application a range of exit codes. Currently unused, but we may want to change this in the future.
| * | foot/footclient: use a custom exit code when foot/footclient fail to runDaniel Eklöf2021-05-04-18/+33
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, foot and footclient uses the exit code from the client application (i.e. the shell). However, foot (or footclient) itself may fail to run; if run outside of a Wayland session, or no fonts are installed, or the client application/shell cannot be found (“foot lsdjfldsjf”) etc. Up until now, there has been no way to differentiate these kind of failures from the client application exiting with code 1. This patch changes foot’s failure exit code to -27/229, and footclient’s to -28/228. Note that footclient will exit with foot’s -27/229 if footclient ran successfully, but the foot server failed to instantiate a new window. Closes #466.
* | Merge branch 'beam-thickness'Daniel Eklöf2021-05-04-29/+57
|\ \ | | | | | | | | | Closes #464
| * | config: add ‘beam-thickness’ optionDaniel Eklöf2021-04-30-29/+57
| |/ | | | | | | | | | | | | | | | | | | | | * Rename cursor.style value ‘bar’ to ‘beam’. ‘bar’ remains recognized, but should eventually be deprecated and then removed. * Add ‘cursor.beam-thickness’ option, a pt-or-px value specifying the thickness of the beam cursor. Defaults to 1.5pt. * Rename (and export) pt_or_px_as_pixels() to term_pt_or_px_as_pixels() * Change term_pt_or_px_as_pixels() to round point values instead of truncating them.
* | Merge branch 'add-truecolor-to-feature-list'Daniel Eklöf2021-05-02-0/+1
|\ \ | |/ |/|
| * Add TrueColors support to Readmelord2021-05-02-0/+1
|/
* Merge branch 'bsu-esu-logging'Daniel Eklöf2021-04-26-4/+6
|\
| * dcs: only log debug warnings in bsu() and esu() for unhandled paramsCraig Barnes2021-04-25-4/+6
|/
* Merge branch 'DECSET-2026'Daniel Eklöf2021-04-25-0/+20
|\ | | | | | | Closes #459
| * csi: add support for DECSET 2026, as an alternative to BSU/ESU sequencesCraig Barnes2021-04-25-0/+20
|/ | | | See: https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/2#note_847720
* Merge branch 'modify-bg-color-when-highlighted-text-has-same-fg-bg'Daniel Eklöf2021-04-24-0/+9
|\ | | | | | | Closes #455
| * render: modify background color for highlighted text when fg == bgDaniel Eklöf2021-04-24-0/+9
|/ | | | | | | | When rendering a selected/highlighted cell where the foreground and background colors are the same, invert the background color to make the selected text legible. Closes #455
* Merge branch 'reveal-concealed-text-when-highlighted'Daniel Eklöf2021-04-24-1/+5
|\
| * render: do render concealed text when it’s highlightedDaniel Eklöf2021-04-23-1/+5
|/
* pkgbuild: run ‘ninja test’ in the PGO generate phaseDaniel Eklöf2021-04-22-0/+5
| | | | | | This is needed when fcft/tllist are built as subprojects, since then we must ensure their unit tests are executed, or we’ll get “profile count data file not found” errors.
* Merge branch 'generate-alt-random-writes-fixes'Daniel Eklöf2021-04-22-13/+48
|\
| * changelog: generate-alt-random-writes.py --sixel fixesDaniel Eklöf2021-04-22-0/+10
| |
| * generate-alt-random: don’t run TIOCGWINSZ ioctl if --cols and --rows were usedDaniel Eklöf2021-04-22-24/+25
| |
| * generate-alt-random: do ioctl(TIOCGWINSZ) on /dev/tty, not stdoutDaniel Eklöf2021-04-22-5/+6
| |
| * generate-alt-random: wait for SIGWINCH if width/height is 0Daniel Eklöf2021-04-22-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | If width/height (that is, the *pixel* values) are 0, that means we are early (or that foot is slow) - we’ve managed to reach this point before the foot window has been mapped. Or rather, before foot has loaded the primary fonts and calculated the cell geometry. But that, and the initial mapping of the window is tightly coupled. To handle this case, detect when width or height is 0, an then wait for SIGWINCH before trying again.
| * generate-alt-random: assert that lines/cols/width/height are > 0Daniel Eklöf2021-04-22-0/+5
| |
| * generate-alt-random: use {width,height} + 1 in randrange()Daniel Eklöf2021-04-22-1/+1
| | | | | | | | | | | | | | When randomizing the sixel width and height, use width/height + 1 in the call to randrange(). This ensures the width/height is never 0, and that the maximum width/height is half the window size, not slightly less than that.
* | readme: s/if/isDaniel Eklöf2021-04-22-1/+1
|/
* Merge branch 'releases/1.7'Daniel Eklöf2021-04-18-5/+14
|\
| * meson/pkgbuild: bump version to 1.7.21.7.2releases/1.7Daniel Eklöf2021-04-18-2/+2
| |
| * changelog: prepare for 1.7.2Daniel Eklöf2021-04-18-5/+3
| |
| * changelog: add cglogic to ‘contributors’Daniel Eklöf2021-04-18-0/+2
| |
| * config: bold-text-in-bright: add ‘palette-based’ as a special valueDaniel Eklöf2021-04-18-12/+38
| | | | | | | | | | | | | | | | | | When ‘bold-text-in-bright’ is set ‘to palette-based’, colors matching one of the 8 regular palette colors are brightened by using the corresponding bright palette color. Other colors, or all colors if ‘bold-text-in-bright’ is set to ‘yes|true’, are brightened by increasing the luminance.
| * render: brighten: use corresponding bright palette color for base 8 colorsDaniel Eklöf2021-04-18-2/+14
| | | | | | | | | | | | | | | | When brightening one of the 8 base (“regular”) colors, use the corresponding bright palette color, instead of increasing the luminance. Closes #449
| * Fix commentOleh Hushchenkov2021-04-18-3/+1
| |
| * term: stop reading on eofOleh Hushchenkov2021-04-18-0/+5
| |
| * term: attributes struct: use ‘bool’ instead of ‘uint32_t’ for 1-bit membersDaniel Eklöf2021-04-18-13/+13
| |
| * render: no need to blend fully opaque sixel images - just blit themDaniel Eklöf2021-04-18-1/+1
| |
| * render: don’t let URL jump label sub-surfaces extend outside window geometryDaniel Eklöf2021-04-18-27/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have no guarantee that sub-surfaces extending outside the window geometry are rendered correctly (if at all). For example, both Sway and River will render the window border on top of the sub-surface. Future versions of Sway may clip the sub-surface. Since jump-labels are positioned slightly above, and to the left of the URLs first character, having a label on either the top row, or on the first column, will likely position it outside the window. This is handled by simply setting x/y to 0 (or, to -margin, since the label coordinate is later offsetted with the window margins). Second, if the label is very long, it may extend outside the window. This is very unusual for labels only showing the key, and not the URL itself, but could happen in this case too, if e.g. the user has configured double-width key characters. This is handled by calculating its maximum width, and then truncating the label. Although very unlikely, it is possible for a label to also extend outside the window’s vertical size. This could happen for very small font sizes, where the label’s own margins are large, relative to the font size. This case is currently not handled. Closes #443
| * doc: foot.ini: re-phrase the box-drawings-uses-font-glyphs sectionDaniel Eklöf2021-04-18-2/+3
| |
| * doc: foot.ini: codespell: antaliasing -> antialiasingDaniel Eklöf2021-04-18-1/+1
| |
| * config: add box-drawings-uses-font-glyphs=no|yes optionDaniel Eklöf2021-04-18-1/+30
| | | | | | | | | | | | | | | | | | When disabled, we render box drawing characters ourselves. This is the default. When enabled, we instead use font glyphs. I.e. no special treatment. Closes #430
| * render: draw underline cursor below text underlineDaniel Eklöf2021-04-18-2/+8
| | | | | | | | | | | | | | This ensures the cursor is visible on cells where the text is underlined. Closes #415
| * changelog: rewrite entry for OSC 17/117/19/119Daniel Eklöf2021-04-18-2/+2
| |
| * changelog: auto_left_margin on cub1 onlyDaniel Eklöf2021-04-18-0/+2
| |
| * term/vt: only do reverse-wrapping (‘bw’) on cub1Daniel Eklöf2021-04-18-40/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Foot currently does reverse-wrapping (‘auto_left_margin’, or ’bw’) on everything that calls ‘term_cursor_left()’. This is wrong; it should only be done for cub1. From man terminfo: auto_left_margin | bw | bw | cub1 wraps from column 0 to last column This patch moves the reverse-wrapping logic from term_cursor_left() to the handling of BS (backspace). Closes #441
| * osc: implement OSC 17+19: change selection background/foreground colorsDaniel Eklöf2021-04-18-13/+67
| | | | | | | | | | And of course, we also implement the corresponding reset sequences, OSC 117+119.
| * osc: reset background alpha when resetting the background colorDaniel Eklöf2021-04-18-0/+2
| |
| * doc: foot-ctlseq: mention that we support transparency in OSC 11Daniel Eklöf2021-04-18-1/+3
| |
| * changelog: don’t use a hyphen between ‘OSC’ and the numberDaniel Eklöf2021-04-18-1/+1
| |
| * changelog: tweak wording for URxvt’s XParseColor extensionDaniel Eklöf2021-04-18-1/+1
| |
| * osc: parse_legacy_color(): the alpha component is not a floating point numberDaniel Eklöf2021-04-18-8/+7
| | | | | | | | | | | | When using the urxvt extension of the XParseColor format, the alpha component is not a floating point number, but a decimal number in the range 0-100.
| * osc: parse_rgb(): ensure ‘alpha’ has been initializedDaniel Eklöf2021-04-18-1/+1
| |
| * osc: add support for URxvt extension to include alpha in OSC-11Daniel Eklöf2021-04-18-24/+105
| | | | | | | | | | | | | | There are two variants, either using a ‘[percent]’ prefix for legacy colors, or using ‘rgba:r/g/b/a’ instead of ‘rgb:r/g/b’. Closes #436
| * terminal: drain PTY when client terminatesDaniel Eklöf2021-04-18-4/+10
| | | | | | | | | | | | | | | | | | | | This is done by: * Not limiting the number of times we try to read from the PTY when we’ve have POLLHUP * Not requiring the entire the previous read to have filled our buffer. * Not erroring out on EIO.
| * ci: build on alpine/latest, not edgeDaniel Eklöf2021-04-18-8/+6
| |
| * sixel: unhook: tighten up the condition needed for us to free image data pre-maturelyDaniel Eklöf2021-04-18-5/+5
| |
| * sixel: sixel_fini(): free image dataDaniel Eklöf2021-04-18-0/+1
| | | | | | | | | | Normally, this data is always free:d indirectly, when the sixel image that took over ownership is destroyed. But let’s play it safe.
| * config/terminal: refactor: remove “default_*” color members from terminal structDaniel Eklöf2021-04-18-86/+61
| | | | | | | | Access the original colors in the configuration instead.
| * wayland: {xdg_,}output_*(): free old strings before assigning new onesDaniel Eklöf2021-04-18-0/+7
| | | | | | | | | | | | Defensive programming; output_geometry() etc are typically only called once for an output instance. But let’s ensure we’re not leaking memory if it’s called more than once.
| * changelog: move OSC-4/104 fix from 1.7.1 to ‘unreleased’Daniel Eklöf2021-04-18-3/+3
| |
| * osc: verify OSC 4/104 color index is validDaniel Eklöf2021-04-18-1/+14
| | | | | | | | Closes #434
| * config: make {search,url}_binding_action_map[] function localDaniel Eklöf2021-04-18-34/+34
| | | | | | | | | | | | | | | | | | This ensures we don’t accidentally reference them from places we shouldn’t. Unfortunately, binding_action_map[] (for “normal” key bindings) cannot easily be made function local since it is used when parsing both key- and mouse bindings (i.e. it’s used in multiple functions).
| * doc: foot.ini: fix default value for delete-next-wordDaniel Eklöf2021-04-18-1/+1
| |
| * config: parse_key_binding_section(): use provided action-mapDaniel Eklöf2021-04-18-1/+3
| | | | | | | | | | | | | | | | Don’t call has_key_binding_collisions() with ‘binding_action_map’ unconditionally; use the provided ‘action_map’ instead. This fixes wrong error messages for key combo collisions in key binding sections other than the regular “key-bindings”.
| * sixel: fix double free caused by bad free() in sixel_colors_set()Daniel Eklöf2021-04-18-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sixel_color_set() is called when the number of (sixel) color registers is changed. It frees the current palette, and changes the “palette size” variable. Originally, we only had a single palette. This is the one free:d by sixel_color_set(). Later, we added support for private vs. shared palettes. With this change, we now have one palette that is “never” free:d (the shared one), and a private palette that is always free:d after a sixel has been emitted. ‘sixel.palette’ is a pointer to the palette currently in use, and should only be accessed **while emitting a sixel**. This is the pointer sixel_color_set() free:d. So for example, if ‘sixel.palette’ pointed to the shared palette, we’d free the shared palette. But, we didn’t reset ‘sixel.shared_palette’, causing a double free later on. Closes #427
| * revert: input: do not include consumed modifiers in the set sent to the clientDaniel Eklöf2021-04-18-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two issues with it: * Not all applications decode the sequence into a set of modifiers + key, but use a fixed sequence -> combo mapping, that we broke. * There were unforeseen issues with e.g. F1-12, where the modifier were removed from combos like Ctrl+F12, or Alt+F12. The reason is simple; XKB tells us that Ctrl, or Alt, is a consumed modifier. Now, _why_ it thinks that is a different story. This reverts 6cd72bdee6c2b11f7cab15df9afb0ed92a7f8ba0 Closes #425
| * term: free vt.osc8.uri when destroying a terminalDaniel Eklöf2021-04-18-0/+2
| | | | | | | | | | Free vt.osc8.uri in term_destroy(), in the off chance, that the client application emitted an un-terminated OSC-8 URI.
| * install: add ‘ninja test’ to all build typesDaniel Eklöf2021-04-18-0/+3
| | | | | | | | | | | | | | While we don’t (yet) have any unit tests for foot, users can build foot with e.g. fcft and/or tllist as sub-projects. *They* have tests, and when doing PGO builds, those test binaries *must* be executed, or we get link failures in the final build.
| * changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-04-18-0/+11
| |
* | changelog: add cglogic to ‘contributors’Daniel Eklöf2021-04-18-0/+2
| |
* | Merge branch 'brighten-bold-uses-palette-colors'Daniel Eklöf2021-04-18-9/+47
|\ \ | | | | | | | | | Closes #449
| * | config: bold-text-in-bright: add ‘palette-based’ as a special valueDaniel Eklöf2021-04-17-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | When ‘bold-text-in-bright’ is set ‘to palette-based’, colors matching one of the 8 regular palette colors are brightened by using the corresponding bright palette color. Other colors, or all colors if ‘bold-text-in-bright’ is set to ‘yes|true’, are brightened by increasing the luminance.
| * | render: brighten: use corresponding bright palette color for base 8 colorsDaniel Eklöf2021-04-17-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | When brightening one of the 8 base (“regular”) colors, use the corresponding bright palette color, instead of increasing the luminance. Closes #449
* | | Merge branch 'terminal-stop-reading-on-eof'Daniel Eklöf2021-04-18-0/+3
|\ \ \
| * | | Fix commentOleh Hushchenkov2021-04-18-3/+1
| | | |
| * | | term: stop reading on eofOleh Hushchenkov2021-04-18-0/+5
|/ / /
* / / term: attributes struct: use ‘bool’ instead of ‘uint32_t’ for 1-bit membersDaniel Eklöf2021-04-17-13/+13
|/ /
* | main: explicitly cast log_colorize to enum fcft_log_colorizeDaniel Eklöf2021-04-17-2/+4
| | | | | | | | | | | | | | | | Fixes error in Clang builds: ../../foot/main.c:376:19: error: implicit conversion from enumeration type 'enum log_colorize' to different enumeration type 'enum fcft_log_colorize' [-Werror,-Wenum-conversion] fcft_log_init(log_colorize, as_server && log_syslog, log_level + 1); ~~~~~~~~~~~~~ ^~~~~~~~~~~~
* | main: call fcft_log_init(). Note that this requires fcft >= 2.3.90Daniel Eklöf2021-04-17-1/+5
| |