aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md (follow)
Commit message (Collapse)AuthorAgeLines
...
* input: reset view when pasting from primaryDaniel Eklöf2022-01-11-0/+2
| | | | | We’re already doing this for keyboard input, and regular clipboard pastes.
* changelog: fixed failing to launch when exec(3):ed with an empty argvDaniel Eklöf2022-01-01-0/+1
|
* SGR-Pixels mouse mode, closes #762Autumn Lamonte2022-01-01-1/+3
|
* render: csd: scale border width when rendering the CSD border’s visible partDaniel Eklöf2021-12-29-0/+2
|
* render: scale the width out the outline of the unfocused block cursorDaniel Eklöf2021-12-28-0/+3
|
* input: apply scrollback.multplier in alterate scroll modeDaniel Eklöf2021-12-28-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, foot only applied [scrollback].multiplier on the normal screen, never the alt screen. However, scrolling can be done in two ways on the alt screen: If the application has enabled mouse support, we simply pass on the mouse scroll events to the application. Here, it makes sense to not apply the multiplier, and instead let the application choose how much to scroll for each scroll event. But, if the application has not enabled mouse support, we can still scroll by simulating the arrow keys being pressed - alternate scrolling (private mode 1007). This is enabled by default in foot (but can be disabled in foot.ini with the [mouse].alternate-scroll-mode setting). In this mode, it makes more sense to apply the multiplier. And that’s what this patch changes - the multiplier is now applied, on the alt screen, when the application has not enabled mouse support, and alternate scrolling has been enabled in foot. Closes #859
* changelog: irc+ircs added to default value of url.protocolsDaniel Eklöf2021-12-27-0/+2
|
* term: print: erase existing OSC-8 URIDaniel Eklöf2021-12-26-0/+2
| | | | | | | | | | If we have an “active” OSC-8 URI, term_print() would correctly replace an existing URI with the new one. But, if we don’t have an active URI, an existing URI was not erased. This can be reproduced with e.g echo -e '\e]8;;http://foo.bar\e\\foobar\e]8;;\e\\\b\b\b\b\b😀\n'
* changelog: grammarDaniel Eklöf2021-12-23-2/+2
|
* render: make sure ‘maximized’ button doesn’t use negative coordinatesDaniel Eklöf2021-12-22-0/+2
|
* config: error out on empty key- or mouse bindingDaniel Eklöf2021-12-18-0/+2
| | | | Closes #851
* shm: get_buffer(): make sure buffer->busy is setDaniel Eklöf2021-12-18-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When going through the cached buffers, we only set buffer->busy on the *first* re-usable buffer we found. In some cases, we will find more than one re-usable buffer. In this case, we select the “youngest” one (i.e the one most recently used, in the hopes that we can use damage tracking instead of re-rendering the entire buffer). If the “current” buffer is younger than the previously detected, re-usable, buffer, then we unref:ed the previously selected buffer, and replaced it with the current one. But, we did not sanitize it. That is, we did not: * set buffer->busy * clear its dirty region * clear its scroll damage That buffer would eventually get rendered to, and committed to the compositor. Later, the compositor would free it. And there, in our buffer_release() callback, we’d assert that buffer->busy was set. And fail. Closes #844
* themes: consistently use snake-case in theme namesDaniel Eklöf2021-12-18-0/+6
|
* input: kitty: don’t fallback to the XKB symbolDaniel Eklöf2021-12-16-0/+2
| | | | | | | | | | | When handling “generic” keys (i.e. keys not in the Kitty keymap), we use the pressed key’s Unicode codepoint as “key” in the kitty CSI. If we failed to convert the XKB symbol to a Unicode codepoint, we used to (before this patch), fallback to using the XKB symbol as is. This can never be correct... and it caused us to emit a meaningless CSI for XKB_KEY_ISO_Next_Group, which confused e.g. Kakoune.
* term: font_size_adjust: use DPI=96 when font is *not* scaled by DPIDaniel Eklöf2021-12-14-0/+6
| | | | Closes #842
* changelog: kitty kbd: add link to codeberg issueDaniel Eklöf2021-12-08-1/+1
|
* Merge branch 'releases/1.10'Daniel Eklöf2021-12-08-2/+1
|\
| * changelog: kitty: alternate keys: base layout key is implementedreleases/1.10Daniel Eklöf2021-12-08-2/+1
| |
* | Merge branch 'releases/1.10'Daniel Eklöf2021-12-08-7/+15
|\|
| * changelog: prepare for 1.10.3Daniel Eklöf2021-12-08-9/+3
| |
| * kitty: initial support for “report alternate key”Daniel Eklöf2021-12-08-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In this mode, the “shifted” and “base layout” keys are added to the CSIs, as sub-parameters to the “key” parameter. Note that this PR only implements the “shifted” key, not the “base layout key”. This is done by converting the original XKB symbol to it’s corresponding UTF-32 codepoint. If this codepoint is different from the one we use as “key” in the CSI, we add it as a sub-parameter. Related to #319
| * kitty: implement “report associated text”Daniel Eklöf2021-12-08-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this mode, key events that generate text now add a third CSI parameter, indicating the actual codepoint. Remember that we always use the *unshifted* key in the CSI escapes. With this mode, those CSI escapes now also included the text codepoint. I.e. what would have been emitted, had we not generated a CSI escape. As far as I can tell, this mode has no effect unless “report all keys as escape sequences” is enabled (reason being, without that, there aren’t any text events that generate CSIs - they’re always emitted as-is). Note that Kitty itself seems to be somewhat buggy in this mode. At least on Wayland, with my Swedish layout. For example ‘a’ and ‘A’ does generate the expected CSIs, but ‘å’ and ‘Å’ appears to be treated as non-text input. Furthermore, Kitty optimizes away the modifier parameter, if no modifiers are pressed (e.g. CSI 97;;97u), while we always emit the modifier (CSI 97;1;97u). Related to #319
| * grid: reload pointers into the uri range vector after insertingDaniel Eklöf2021-12-08-0/+1
| | | | | | | | | | | | | | Inserting elements into the URI range vector typically triggers a vector resize. This is done using realloc(). Sometimes this causes the vector to move, thus invalidating all existing pointers into the vector.
| * input: kitty: add support for “report all keys as escape codes”Daniel Eklöf2021-12-08-0/+2
| |
| * term: ensure cell dimensions are non-zeroDaniel Eklöf2021-12-08-0/+5
| | | | | | | | Closes #830
| * changelog: move entry to ‘unreleased’Daniel Eklöf2021-12-08-1/+6
| |
| * changelog: kitty: report eventsDaniel Eklöf2021-12-08-1/+2
| |
| * changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-12-08-0/+11
| |
* | kitty: initial support for “report alternate key”Daniel Eklöf2021-12-08-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In this mode, the “shifted” and “base layout” keys are added to the CSIs, as sub-parameters to the “key” parameter. Note that this PR only implements the “shifted” key, not the “base layout key”. This is done by converting the original XKB symbol to it’s corresponding UTF-32 codepoint. If this codepoint is different from the one we use as “key” in the CSI, we add it as a sub-parameter. Related to #319
* | kitty: implement “report associated text”Daniel Eklöf2021-12-08-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this mode, key events that generate text now add a third CSI parameter, indicating the actual codepoint. Remember that we always use the *unshifted* key in the CSI escapes. With this mode, those CSI escapes now also included the text codepoint. I.e. what would have been emitted, had we not generated a CSI escape. As far as I can tell, this mode has no effect unless “report all keys as escape sequences” is enabled (reason being, without that, there aren’t any text events that generate CSIs - they’re always emitted as-is). Note that Kitty itself seems to be somewhat buggy in this mode. At least on Wayland, with my Swedish layout. For example ‘a’ and ‘A’ does generate the expected CSIs, but ‘å’ and ‘Å’ appears to be treated as non-text input. Furthermore, Kitty optimizes away the modifier parameter, if no modifiers are pressed (e.g. CSI 97;;97u), while we always emit the modifier (CSI 97;1;97u). Related to #319
* | grid: reload pointers into the uri range vector after insertingDaniel Eklöf2021-12-08-0/+1
| | | | | | | | | | | | | | Inserting elements into the URI range vector typically triggers a vector resize. This is done using realloc(). Sometimes this causes the vector to move, thus invalidating all existing pointers into the vector.
* | input: kitty: add support for “report all keys as escape codes”Daniel Eklöf2021-12-06-0/+2
| |
* | Merge branch 'ensure-cell-dimensions-are-non-zero'Daniel Eklöf2021-12-06-0/+5
|\ \ | | | | | | | | | Closes #830
| * | term: ensure cell dimensions are non-zeroDaniel Eklöf2021-12-04-0/+5
| | | | | | | | | | | | Closes #830
* | | changelog: move entry to ‘unreleased’Daniel Eklöf2021-12-04-1/+3
| | |
* | | changelog: kitty: report eventsDaniel Eklöf2021-12-04-1/+2
|/ /
* | config, doc, changelog: move selection-override-modifiers to [mouse-bindings] and validate other ↵feeptr@codeberg.org2021-12-02-3/+3
| | | | | | | | | | | | case specifically, check for conflicts both when mouse bindings are set and when the selection-override-modifiers setting itself is set
* | changelog: list new mouse.selection-override-modifiers optionfeeptr@codeberg.org2021-12-02-0/+6
| |
* | changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-12-02-0/+11
|/
* changelog: prepare for 1.10.2Daniel Eklöf2021-12-02-6/+4
|
* osc-4: don’t update the color of cells with RGB fg/bg colorsDaniel Eklöf2021-12-01-0/+2
| | | | | | | | | | | | | | | | | | | | OSC 4/104 changes the 256-color palette. We also run a pass over the visible cells, and update their colors. This was previously done by comparing the actual color of the cell, with the “old” color in the palette. If they matched, the cell was updated. This meant that cells with an RGB color (i.e. not a palette based color) was also updated, _if_ its color matched the palette color. Now that each cell tracks its color *source*, we can ignore all non-palette based cells. Note that this still isn’t perfect: if the palette contains multiple entries with the same color, we’ll end up updating the “wrong” cells. Closes #678
* input: always update the xcursor shape in pointer enter/motion eventsDaniel Eklöf2021-12-01-0/+1
| | | | | | | | | | | | | | | | Now that term_xcursor_update_for_seat() takes the current surface into account (i.e. doesn’t assume the cursor is over the main grid), there’s no longer any need to call render_xcursor_set() directly. Thus, we can simply call term_xcursor_update_for_seat() on **all** pointer enter and motion events. As long as we take care to update the internal state to reflect the, possibly new, current surface before doing so. Also make sure to **always** reset the seat’s “current” xcursor pointer on pointer leave events. This is done without actually sending anything to the compositor, but is necessary to ensure that we *do* send a request to update the xcursor on the next pointer enter event.
* changelog: window-menuDaniel Eklöf2021-11-30-0/+2
|
* render: fix csd border rendering glitch when width > 5pxDaniel Eklöf2021-11-29-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | CSD borders are always *at least* 5px. If url.border-width=0, those 5px are all fully transparent (and act as interactive resize handles). As csd.border-width increases, the number of transparent pixels decrease. Once csd.border-width >= 5, the border is fully opaque. When csd.border-width > 5, then width of the border is (obviously) more than 5px. But, when rendering the opaque part of the border, we still used 5px for the invisible part, which caused some pixman rectangles to have negative x/y coordinates. This resulted in rendering glitches due to overflows in pixman when rendering the borders. The fix is to ensure the total border size is always at least, but not *always* 5px. That is, set it to max(5, csd.border-width). This patch also fixes an issue where the CSD borders were not dimmed (like the titlebar) when the window looses input focus. Closes #823
* changelog: kitty keyboard protocol - disambiguate escape codesDaniel Eklöf2021-11-28-0/+3
|
* grid: bug: OSC-8 URIs were incorrectly skipped while resizing the alt screenDaniel Eklöf2021-11-26-0/+2
|
* osc8: update URI ranges as we print data, *not* when the URI is closedDaniel Eklöf2021-11-25-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | At first, an OSC-8 URI range was added when we received the closing OSC-8 escape (i.e. with an empty URI). But, this meant that cursor movements while the OSC-8 escape was in effect wasn’t handled correctly, since we’d add a range that spanned the cursor movements. Attempts were made to handle this in the cursor movement functions, by closing and re-opening the URI. However, there are too many corner cases to make this a viable approach. Scrolling is one such example, line-wrapping another. This patch takes a different approach; emit, or update the URI range when we print to the grid. This models the intended behavior much more closely, where an active OSC-8 URI act like any other SGR attribute - it is applied to all cells printed to, but otherwise have no effect. To avoid killing performance, this is only done in the “generic” printer. This means OSC-8 open/close calls must now “switch” the ASCII printer. Note that the “fast” printer still needs to *erase* pre-existing OSC-8 URIs. Closes #816
* input: finalize mouse selection on a pointer-leave event on the GRID surfaceDaniel Eklöf2021-11-25-0/+5
| | | | | | | | | If a mouse selection was ongoing, and the user switched workspace (probably using the keyboard...), and then back, the selection was still treated as ongoing, while all other mouse state has been reset. This meant the user had to tap at least once to stop the selection.
* config: add tweak.grapheme-width-method=maxDaniel Eklöf2021-11-23-0/+5
| | | | | | ‘max’ is a new value for ‘tweak.grapheme-width-method’. When enabled, the width of a grapheme cluster is that of the cluster’s widest codepoint.
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-11-22-0/+11
|
* changelog: add #801 to “OSC-8 data not being cleared...”Daniel Eklöf2021-11-22-1/+2
|
* changelog: prepare for 1.10.1Daniel Eklöf2021-11-22-6/+7
|
* changelog: osc-8 data not being cleared when cell is overwrittenDaniel Eklöf2021-11-21-0/+2
|
* changelog: pipe-* key bindings not being parsed correctlyDaniel Eklöf2021-11-21-0/+3
|
* config: create a copy of the section nameDaniel Eklöf2021-11-21-0/+1
| | | | | | | | | | | | The parsing context keeps a pointer to the current section name. This is used when logging errors. However, the pointer was into a buffer allocated by getline(). This buffer are often re-used in the next call to getline(), or free:d. Regardless, the section name pointer is invalid after the next call to getline(), which meant all error messages were logging a correct section name.
* config: letter-spacing: add missing ‘return’Daniel Eklöf2021-11-15-0/+5
| | | | | | | | | The missing return caused us to fall through to the bottom of the function, where we ended with an error message: [main].letter-spacing: 0: not a valid option: letter-spacing Closes #795
* footclient.desktop: new XDG desktop file, for footclientDaniel Eklöf2021-11-15-0/+1
|
* meson: add -Dthemes=false|trueDaniel Eklöf2021-11-14-0/+6
| | | | | | | This adds a new meson option that controls whether the example theme files should be installed or not. The default is true. Previously, themes were gated by the -Ddocs option.
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-11-14-0/+11
|
* changelog: prepare for 1.10.0Daniel Eklöf2021-11-14-4/+11
|
* config: remove options that were deprecated in 1.8.xDaniel Eklöf2021-11-14-0/+3
| | | | | | | * [main].bell * [main].jump-label-letters * [main].url-launch * [main].osc8-underline
* changelog: fix minor grammatical mistakeCraig Barnes2021-11-14-1/+1
|
* config: add [colors].dim0-7Daniel Eklöf2021-11-13-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This allows you to configure custom colors to be used when colors are being dimmed (`\E[2m`). It is implemented by color matching (just like bold-text-in-bright=palette-based); the color-to-be-dimmed is matched against the current color palette. If it matches one of the regular colors (colors 0-7), the corresponding “dim” color will be used. If it matches one of the bright colors (colors 8-15), the corresponding “regular” color will be used (but *only* if the “dim” color has been set). Otherwise, the color is dimmed by reducing its luminance. The default behavior, i.e. when dim0-7 hasn’t been configured, is to dim by reducing luminance for *all* colors. I.e. we don’t do any color matching at all. In particular, this means that dimming a bright color will *not* result in the corresponding “regular” color. Closes #776
* input: add support for modifyOtherKeys=2Daniel Eklöf2021-11-13-0/+1
| | | | | | | | | | | | | | | | Similar to modifyOtherKeys=1 (foot’s default, and only, mode), except that: * All modifiers (and not just Ctrl) generate \E[27;m;n~ escapes * Regular keys (with modifiers) also generate \E[27;m;n~ escapes (for example, C-h no longer generates ^H, but \E[27;5;104~) For our keymap based lookups, this is handled by adding MOD_MODIFY_OTHER_KEYS_STATE<N> variants. For “generic” keys, we simply adjust the conditions for when to emit a \E[27;m;n~ escape - the only requirement is that at least one modifier is active.
* input: don’t apply [scrollback].multiplier when alt screen is in useDaniel Eklöf2021-11-13-0/+2
| | | | Closes #787
* changelog: boolean optionsDaniel Eklöf2021-11-13-0/+4
|
* PKGBUILD: dropDaniel Eklöf2021-11-07-0/+4
| | | | | The bundled PKGBUILD has been pretty much identical to the one in the AUR package “foot-git” for a long time now.
* wayland: error out if there aren’t any seats availableDaniel Eklöf2021-11-07-0/+3
| | | | | | | | | | | | If there aren’t any seats available, input is not possible (neither keyboard nor mouse input). Note that this is not the same thing as e.g. no keyboard being plugged in. In this case, there will be a seat, but without the keybaord capability. Input may not be possible _right now_, but may be later, if the user plugs in a keyboard. Closes #779
* csd: add support for a visible borderDaniel Eklöf2021-10-27-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | When we’re using CSDs, we’ve up until now rendered a 5px invisible border. This border handles interactive resizing. I.e. hovering it changes the mouse cursor, and mouse button events are used to start an interactive resize. This patch makes it possible to color part of (or the entire) border, with a configurable color. To facilitate this, two new options have been added: * csd.border-width * csd.border-color border-width defaults to 0, resulting in the look we’re used to. border-color defaults to the title bar color. If the title bar color hasn’t been set, it defaults to the default foreground color (just like the title bar color does). This means that, setting border-width but not border-color, results in a border that blends with the title bar.
* meson: install themes to $datadir/foot/themesDaniel Eklöf2021-10-27-0/+1
|
* config: add [key-bindings].noop actionDaniel Eklöf2021-10-27-1/+4
| | | | | | | Key combinations assigned to this action will not be sent to the application. Closes #765
* changeloge: style fixesDaniel Eklöf2021-10-22-5/+6
|
* term: ignore window title updates if title is un-changedDaniel Eklöf2021-10-22-0/+2
|
* input: update serial on each key press/release and mouse buttonDaniel Eklöf2021-10-20-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The serial is used when copying/pasting data from the clipboard. Up until now, we’ve used the serial from the keyboard/mouse enter events. This works in most cases, but breaks in the following example: $ wl-copy WLCOPY /* Ctrl+Shift+v works fine (pastes "WLCOPY") */ $ printf "\033]52;c;eHl6\a" /* Ctrl+Shift+v pastes "WLCOPY" instead of "xyz" */ Shifting focus away and then back to the foot window, and re-executing the printf works, suggesting the “enter” serial is no longer valid after another process(?) has copied something to the clipboard. Updating the serial on key press/release (and the corresponding mouse serial on mouse button events) seems to fix this. I’ve also tested that “normal” copy/paste operations, within the same foot instance, and between foot and other applications, are still working. In at least river (wlroots based), and GNOME/mutter. Closes #753
* selection: convert \r -> \n when reading clipboard dataDaniel Eklöf2021-10-19-0/+2
| | | | | | | | This fixes an issue where pasting (using e.g. OSC-52) in client applications that doesn’t do this conversion themselves, like tmux, doesn’t work. Closes #752
* pgo: full-inner: add --override tweak.grapheme-shaping=noDaniel Eklöf2021-10-16-0/+2
| | | | | | | | | Grapheme shaping is now enabled by default in foot. However, when generating the profiling data in PGO builds, this results in skewed optimizations. The end result is worse benchmark results regardless of whether grapheme-shaping is enabled or not (when running the benchmarks).
* config: enable grapheme shaping by defaultDaniel Eklöf2021-10-13-0/+7
| | | | | | | | This changes the default value of tweak.grapheme-shaping to “yes”, thus enabling grapheme shaping by default. It also changes the default value of tweak.grapheme-width-method to “wcswidth”, for maximum compatibility with terminal applications.
* changelog: list scrollback.indicator-color additionfeeptr@codeberg.org2021-10-09-0/+2
|
* Merge branch 'fix-0px-csd-crash'Daniel Eklöf2021-10-08-0/+1
|\
| * changelog: mention csd.size=0 fixfeeptr@codeberg.org2021-10-08-0/+1
| |
* | notify: add the notify-focus-inhibit config optionMitja Horvat2021-10-06-0/+5
|/ | | | | | | | | | | | | | | foot doesn't show desktop notifications (via OSC777) if the current terminal has keyboard focus. This is probably a sane default, but there are use cases where showing a notification regardless of the focus status may be desired. For example, a completion notification of a long running task inside a non-focused tmux window. This PR adds the notify-focus-inhibit option which can be used to disable inhibition of notifications when the window has focus. The default value is `yes`, which retains the old behavior.
* input: check for ‘effective’ modifiers, not ‘depressed’Daniel Eklöf2021-10-02-0/+6
| | | | | | | When reading XKB modifier state, use XKB_STATE_MODS_EFFECTIVE, not XKB_STATE_MODS_DEPRESSED. This fixes handling of ‘sticky’ modifier keys.
* changelog: add a new ‘unreleased’ sectionDaniel Eklöf2021-10-02-0/+11
|
* changelog: prepare for 1.9.2Daniel Eklöf2021-10-02-10/+3
|
* pgo: full-inner: do not set LC_CTYPE=en_US.UTF-8Daniel Eklöf2021-10-02-0/+7
| | | | | | | That locale may not exist. Instead, require the user/build script to explicitly set an UTF-8 locale. Document this in INSTALL.md, and in the bundled PKGBUILD.
* changelog: add a new ‘unreleased’ sectionDaniel Eklöf2021-10-01-0/+11
|
* changelog: prepare for 1.9.1Daniel Eklöf2021-10-01-5/+4
|
* selection: line-wise selection now handles soft line-wrappingDaniel Eklöf2021-09-30-0/+2
| | | | | | | | | | | Previously, soft-wrapped lines were not selected correctly, as the selection logic was hardcoded to simply select everything between the first and last column on the current terminal row. Now, we scan backward and forward, looking for hard-wrapped lines. This is similar to how word-based selection works. Closes #726
* term: only scale using DPI if *all* monitors have a scaling factor or oneDaniel Eklöf2021-09-24-0/+3
| | | | | | | | | | | | | | | | | | | | With dpi-aware=auto (the default), scale fonts using DPI *only* if *all* available monitors have a scaling factor of one. The idea is this: if a user, with multiple monitors, have enabled scaling on *at least* one monitor, he/she has most likely done so to match the size of his/hers other monitors. For example, if the user has one monitor with a scaling factor of one, and another one with a scaling factor of two, he/she expects things to be twice as large on the second monitor. If we (foot) scale using DPI on the first monitor, and using the scaling factor on the second monitor, foot will *not* look twice as big on the second monitor (this was the old behavior of dpi-aware=auto). Part of #714
* main/client: add no-op "-e" command-line optionCraig Barnes2021-09-18-0/+5
|
* box-drawing: add braille charactersDaniel Eklöf2021-09-12-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Render braille ourselves, instead of using font glyphs. Decoding a braille character is easy enough; there are 256 codepoints, represented by an 8-bit integer (i.e. subtract the Unicode codepoint offset, 0x2800, and you’re left with an integer in the range 0-255). Each bit corresponds to a dot. The first 6 bits represent the upper 6 dots, while the two last bits represent the fourth (and last) row of dots. The hard part is sizing the dots and the spacing between them. The aim is to have the spacing between the dots be the same size as the dots themselves, and to have the margins on each side be half the size of the dots. In a perfectly sized cell, this means two braille characters next to each other will be evenly spaced. This is however almost never the case. The layout logic currently: * Set dot size to either the width / 4, or height / 8, depending on which one is smallest. * Horizontal spacing is initialized to the width / 4 * Vertical spacing is initialized to the height / 8 * Horizontal margins are initialized to the horizontal spacing / 2 * Vertical margins are initialized to the vertical spacing / 2. Next, we calculate the number of “remaining” pixels. That is, if we add the left margin, two dots and the spacing between, how many pixels are left on the horizontal axis? These pixels are distributed in the following order (we “stop” as soon as we run out of pixels): * If the dot size is 0 (happens for very small font sizes), increase it to 1. * If the margins are 0, increase them to 1. * If we have enough pixels (need at 2 horizontal and 4 vertical), increase the dot size. * Increase spacing. * Increase margins. Closes #702
* changelog: pgo build scriptsDaniel Eklöf2021-09-12-0/+3
|
* input: workaround GNOME issue with pointer button eventsDaniel Eklöf2021-09-12-0/+6
| | | | | | | | | | | | | | | | | Under certain circumstances, GNOME will send multiple pointer button press events, without any release or leave events in between. This trips up our button tracking. Workaround, by replacing the existing state for the pressed button with the new state. Previously, debug builds would assert (and thus crash), while release builds would have multiple states for the same button, causing (probably) issues like the title bar not being usable (as in, cannot be dragged, buttons not working etc). Hopefully closes #709
* changelog: check if primary font is monospacedDaniel Eklöf2021-08-31-0/+6
|
* changelog: terminfo changesDaniel Eklöf2021-08-30-0/+11
|
* spawn: don’t error out if we fail to chdir()Daniel Eklöf2021-08-30-0/+2
|
* changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-08-27-0/+11
|
* changelog: prepare for 1.9.0Daniel Eklöf2021-08-27-5/+4
|
* changelog: cursor.blink now works in GNOMEDaniel Eklöf2021-08-18-0/+2
|
* terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRSDaniel Eklöf2021-08-17-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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