aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* osc+notify: strcmp() -> streq()Daniel Eklöf2024-07-24-13/+13
|
* notify: try to read the daemon assigned notification ID from stdoutDaniel Eklöf2024-07-24-2/+55
| | | | | And document the things we recognize in the notification helper's stdout.
* config: notify-send: it's "action=label", not "action,label"Daniel Eklöf2024-07-24-3/+3
|
* notify: don't create icon file on disk when we're not going to use itDaniel Eklöf2024-07-24-13/+27
| | | | | | | We always prefer the symbolic name. Thus, there's no need to write raw PNG data to disk if we have a symbolic name. Furthermore, keep the file open until the cache entry is evicted.
* osc: kitty notifications: don't include '?' in the query replyDaniel Eklöf2024-07-24-1/+1
| | | | No need to say we support queries, in the query reply...
* notify: split up the ${action} template parameterDaniel Eklöf2024-07-23-18/+14
| | | | | | | | | Split it up into two, ${action-name} and ${action-label}. Dunstify, for example, has a different syntax compared to notify-send: notify-send: default=foobar dunstify: default,foobar
* notify: bug: always adjust amount of data left in stdout bufferDaniel Eklöf2024-07-23-3/+3
|
* osc: kitty notifications: implement queryDaniel Eklöf2024-07-23-6/+27
|
* doc: foot.ini: desktop-notification: remove 'notification dismissal'Daniel Eklöf2024-07-23-16/+3
|
* notify: name the activation action 'default'Daniel Eklöf2024-07-23-2/+2
| | | | | This is less unique, but also works better with notification daemons that trigger the 'default' action when e.g. clicked.
* notify: don't focus/report on notification dismissalDaniel Eklöf2024-07-23-19/+46
| | | | | | | | | | | | | | | | Only do it when the notification was activated. Here, activated means the 'click to activate' notification action was triggered. How do we tie everything together? First, we add a new template parameter, ${action}. It's intended to be used with e.g. notify-send's --action option. When the action is triggered, notify-send prints its name on stdout, on a separate line. Look for this in stdout. Only if we've seen it do we focus/report the notification.
* notify: if there's a symbolic icon name, use itDaniel Eklöf2024-07-23-0/+2
| | | | | | | | | | | | | | | | | | | even if there's no graphical ID set. In other words, if there *is* a graphical ID, use the icon cache. Only if there is no graphical ID in the notification request do we fallback to the symbolic name. This means no icon will be displayed if there's no matching icon in the cache. Some examples. You can either pre-load the cache (with inline PNG data, a symbolic name, or both): printf '\e]99;g=123:n=firefox:p=icon:e=1;<PNG data>\e\\' printf '\e]99;g=123;this is a notification\e\\' or printf '\e]99;n=firefox;this is a notification\e\\'
* notify: consume_stdout(): fix ASAN warningDaniel Eklöf2024-07-23-2/+4
| | | | | | | | This is an ASAN false positive; size is always 0 when we're passing a NULL pointer. Still, the warning is easy to avoid, so let's do that to reduce the noise level.
* osc: remove unused includesDaniel Eklöf2024-07-23-3/+0
|
* pgo: updated stubs for notification functionsDaniel Eklöf2024-07-23-1/+17
|
* notify: add_icon(): check return value of write()Daniel Eklöf2024-07-23-4/+7
|
* notify: clean up logging messagesDaniel Eklöf2024-07-23-2/+4
|
* osc: cleanupDaniel Eklöf2024-07-23-16/+3
|
* notify: separate active notifications from unfinished kitty notificationsDaniel Eklöf2024-07-23-30/+57
| | | | | | | | | | | | | | | | | | | | | This fixes an issue where it wasn't possible to trigger multiple notifications with the same kitty notification ID. This is something that works in kitty, and there's no reason why it shouldn't work. The issue was that we track stdout, and the notification helper's PID in the notification struct. Thus, when a notification is being displayed, we can't re-use the same notification struct instance for another notification. This patch fixes this by adding a new notification list, 'active_notifications'. Whenever we detect that we need to track the helper (notification want's to either focus the window on activation, or send an event to the application), we add a copy of the notification to the 'active' list. The notification can then be removed from the 'kitty' list, allowing kitty notifications to re-use the same ID over and over again, even if old notifications are still being displayed.
* osc: kitty notifications: updated support for iconsDaniel Eklöf2024-07-23-49/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements the suggested protocol discussed in https://github.com/kovidgoyal/kitty/issues/7657. Icons are handled by loading a cache. Both in-band PNG data, and symbolic names are allowed. Applications use a graphical ID to reference the icon both when loading the cache, and when showing a notification. * 'g' is the graphical ID * 'n' is optional, and assigns a symbolic name to the icon * 'p=icon' - the payload is icon PNG data. It needs to be base64 encoded, but this is *not* implied. I.e. the application *must* use e=1 explicitly. To load an icon (in-band PNG data): printf '\e]99;g=123:p=icon;<base64-encoded-png-data>\e\\' or (symbolic name) printf '\e]99;g=123:n=firefox:p=icon;\e\\' Of course, we can combine the two, assigning *both* a symbolic name, *and* PNG data: printf '\e]99;g=123:n=firefox:p=icon;<base64-encoded-png>\e\\' Then, to use the icon in a notification: printf '\e]99;g=123;this is a notification\e\\' Foot also allows a *symbolic* icon to be defined and used at the same time: printf '\e]99;g=123:n=firefox;this is a notification\e\\' This obviously won't work with PNG data, since it uses the payload portion of the escape sequence.
* notify: stdout is a bad nameDaniel Eklöf2024-07-23-9/+9
|
* notify: XDG token is now expected to be prefixed with xdgtoken=Daniel Eklöf2024-07-23-30/+74
| | | | | | | | | | | | | | | | This patch modifies our stdout reader to consume input as we go, instead of all at once when stdout is closed. This will make it easier to add support for reading e.g. the daemon assigned notification ID in the future, and also ensures we see the XDG activation token "as soon as possible". Furthermore, to be more future proof, require the XDG activation token to be prefixed with 'xdgtoken=', and ignore other lines. Thus, instead of treating *all* of stdout as the XDG activation token, parse stdout line-by-line, and ignore everything that does not begin with 'xdgtoken='. Everything (on that line) following 'xdgtoken=' is treated as the activation token.
* osc: kitty notifications: use xstrjoin() instead of xasprintf()Daniel Eklöf2024-07-23-8/+6
|
* pgo: update notify_notify() prototype, add notify_free()Daniel Eklöf2024-07-23-3/+8
|
* pgo: update spawn() prototypeDaniel Eklöf2024-07-23-3/+3
|
* changelog: new desktop-notifications config sectionDaniel Eklöf2024-07-23-0/+11
|
* osc: kitty notifications: implement focus|reportDaniel Eklöf2024-07-23-137/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for window focusing, and sending events back to the client application when a notification is closed. * Refactor notification related configuration options: - add desktop-notifications sub-section - deprecate 'notify' in favor of 'desktop-notifications.command' - deprecate 'notify-focus-inhibit' in favor of 'desktop-notifications.inhibit-when-focused' * Refactor: rename 'struct kitty_notification' to 'struct notification' * Pass a 'struct notification' to notify_notify(), instead of many arguments. * notify_notify() now registers a reaper callback. When the notifier process has terminated, the notification is considered closed, and we either try to focus (activate) the window, or send an event to the client application, depending on the notification setting. * For the window activation, we need an XDG activation token. For now, assume *everything* written on stdout is part of the token. * Refactor: remove much of the warnings from OSC-99; we don't typically log anything when an OSC/CSI has invalid values. * Add icon support to OSC-99. This isn't part of the upstream spec. Foot's implementation: - uses the 'I' parameter - the value is expected to be a symbolic icon name - a quick check for absolute paths is done, and such icon requests are ignored. * Added ${icon} to the 'desktop-notifications.command' template. Uses the icon specified in the notification, or ${app-id} if not set.
* unicode-mode: disable debug loggingDaniel Eklöf2024-07-23-1/+1
|
* wayland: add wayl_activate()Daniel Eklöf2024-07-23-2/+15
| | | | | wayl_activate() takes an XDG activation token and does an XDG activation request.
* spawn: add optional reaper callback, return pid_tDaniel Eklöf2024-07-23-19/+26
| | | | | This will allow spawn() callers to do things when the spawned process has terminated.
* osc: kitty notifications: use body as title, if no title is setDaniel Eklöf2024-07-23-2/+2
| | | | | This mirrors kitty's behavior; if the user didn't set a title, but did set the body/text, use the body as title instead.
* osc/notify: add support for OSC-99, kitty desktop notificationsDaniel Eklöf2024-07-23-15/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds limited support for OSC-99, kitty desktop notifications[^1]. We support everything defined by the "protocol", except: * 'a': action to perform on notification activation. Since we don't trigger the notification ourselves (over D-Bus), we don't know a) which ID the notification got, or b) when it is clicked. * ... and that's it. Everything else is supported To be explicit, we *do* support: * Chunked notifications (d=0|1), allowing the application to append data to a notification in chunks, before it's finally displayed. * Plain UTF-8, or base64-encoded UTF-8 payload (e=0|1). * Notification identifier (i=xyz). * Payload type (p=title|body). * When to honor the notification (o=always|unfocused|invisible), with the following quirks: - we don't know when the window is invisible, thus it's treated as 'unfocused'. - the foot option 'notify-focus-inhibit' overrides 'always' * Urgency (u=0|1|2) [^1]: https://sw.kovidgoyal.net/kitty/desktop-notifications/
* input: allow mouse selections to start inside the marginsDaniel Eklöf2024-07-19-59/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this, margins were special cased: * The mouse cursor was always a pointer, and never an I-beam (thus signaling selections cannot be made). * The internal mouse coords where set to -1 when the cursor was inside the margins, causing: - text selections from being made - mouse events being passed to mouse grabbing applications In particular, even with a one-pixel margin, making selections was unnecessarily hard in e.g. fullscreen mode, where you'd expect to be able to throw the cursor into the corner of the screen and then start a selection. With this patch, the cursor is treated as if it was in the first/last column/row, when inside the margin(s). An unintended side-effect of this, initially, was that auto-scrolling selections where way too easy to trigger, since part of its logic is checking if the cursor is inside the margins. That problem has been reduced by two things: * auto-scrolling does not occur unless a selection has been started. That is, just holding down the mouse in the margins and moving up/down doesn't cause scrolling. You have to first select at least one cell in the visible viewport. * A selection isn't fully started (i.e. a cell is actually selected) unless the cursor is inside the actual grid, and *not* in the margins. What does the last point mean? We now allow a selection to be _started_ when clicking in the margin. What this means internally is we set a start coordinate for a selection, but *not* and end coordinate. At this point, we don't have an actual selection. Nothing is selected, and no cells are highlighted, graphically. This happens when we set an end coordinate. Without the last bullet point, that would happen as soon as the cursor was _moved_, even if still inside the margins. Now, we require the cursor to leave the margins and touch an actual cell before we set an end coordinate. Closes #1702
* csi: in-band window resize notifications, private mode 2048Daniel Eklöf2024-07-19-0/+60
| | | | | | | | | | | | | This implements https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83, in-band window resize notifications. When user enables private mode 2048 (in-band resize notifications), *always* send current size, even if the mode is already active. This ensures applications can rely on getting a reply from the terminal.
* wayland: #ifdef guard code related to wl_shm_release()Daniel Eklöf2024-07-18-0/+6
|
* foot.info: add setal (colored underlines)Daniel Eklöf2024-07-18-0/+1
| | | | | This is an alias to Setulc. Upstream (ncurses) terminfo uses setal instead of Setulc :/
* meson/pgo: fix PGO build errors with recent meson(?) versionsDaniel Eklöf2024-07-18-2/+8
| | | | | | The back-reference to 'tokenize.c' in the parent directory causes PGO build failures, where gcc can't find the PGO data. Likely due to path/naming issues caused by meson's generated build directories.
* log: respect the NO_COLOR environment variableDaniel Eklöf2024-07-18-1/+10
| | | | | | http://no-color.org/ Closes #1771
* wayland: use wl_shm v2 if availableDaniel Eklöf2024-07-18-3/+17
|
* themes: catppuccin: replace with updated flavorsabs3nt2024-07-18-26/+135
| | | | Pulled from https://github.com/catppuccin/foot
* input: don't map wheel events to BTN_{BACK,FORWARD}Daniel Eklöf2024-07-13-27/+59
| | | | | | | | | | | | | | | | | | | | BTN_BACK and BTN_FORWARD are separate buttons. The scroll wheel don't have any button mappings in libinput/wayland, so make up our own defines. This allows us to map them in mouse bindings. Also expose BTN_WHEEL_{LEFT,RIGHT}. These were already defined, and used, internally, to handle wheel tilt events. With this, they can also be used in mouse bindings. Finally, fix encoding used for BTN_{BACK,FORWARD} when sending mouse button events to the client application. Before this, they were mapped to buttons 4/5. But, button 4/5 are for the scroll wheel, and as mentioned above, BTN_{BACK,FORWARD} are not the same as scroll wheel "buttons". Closes #1763
* changelog: remove entry for change that hasn't yet been mergedDaniel Eklöf2024-07-13-2/+0
|
* render: hollow-cursor: use correct cursor colorDaniel Eklöf2024-07-13-1/+4
|
* render: cursor: use default fg/bg if cell fg/bg are the sameDaniel Eklöf2024-07-13-0/+14
| | | | | | | When deciding which colors to use for the cursor, and the cursor text and background colors are the same, use the default fg/bg instead. Closes #1761
* themes: add nvim-dark and nvim-light themesNicolas Kolling Ribas2024-07-09-0/+64
| | | | | Both based on the new "Nvim branded" default color scheme in Neovim 0.10.
* doc: foot.ini: line-height: add warning about runtime font size changesDaniel Eklöf2024-07-07-0/+6
|
* osc: extend damage-cells-by-color to default fg/bg as wellDaniel Eklöf2024-07-03-51/+102
| | | | | | | | | | | | | | | When changing part of the color palette, through either OSC-4, or OSC-10 and OSC-11 (and the corresponding reset OSCs: 104, 110 and 111), only dirty affected cells. We've always done this, but only for OSC-4. This patch breaks out that logic, and extends it to handle default fg/bg too. It also fixes a bug where cells with colored underlines were not dirtied if the underline was the only part of the cell that was affected by a OSC-4 change.
* Merge branch 'color-stack'Daniel Eklöf2024-07-03-68/+159
|\ | | | | | | Closes #856
| * csi: redraw margins after restoring the paletteDaniel Eklöf2024-07-03-0/+1
| |
| * osc: 10/11/12/17/19: don't apply overly much damageDaniel Eklöf2024-07-03-2/+5
| |
| * changelog: XTPUSHCOLORS, XTPOPCOLORS and XTREPORTCOLORSDaniel Eklöf2024-07-03-0/+4
| |
| * doc: foot-ctlseq: document XTPUSHCOLORS, XTPOPCOLORS and XTREPORTCOLORSDaniel Eklöf2024-07-03-0/+13
| |
| * csi: implement XTPUSHCOLORS+XTPOPCOLORS+XTREPORTCOLORSDaniel Eklöf2024-07-03-10/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation of these sequences are vague and lacking, as is often the case with XTerm invented control sequences. I've tried to replicate what XTerm does (as of xterm-392). The stack represents *stashed/stored* palettes. The currently active palette is *not* stored on the stack. The stack is dynamically allocated, and starts out with zero elements. Now, XTerm has a somewhat weird definition of "pushing" and "popping" in this context, and the documentation is somewhat misleading. What a push does is this: it stores the current palette to the stack at the specified slot. If the specified slot number (Pm) is 0, the slot used is the current slot index incremented by 1. The "current" slot index is then set to the specified slot (which is current slot + 1 if Pm == 0). Thus, "push" (i.e. when Pm == 0 is used) means store to the "next" slot. This is true even if the current slot index points into the middle of stack. Pop works in a similar way. The palette is restored from the specified slot index. If the specified slot number is 0, we use the current slot index. The "current" slot index is then set to the specified slot - 1 (current slot - 1 if Pm == 0). XTREPORTCOLORS return the current slot index, and the number of palettes stored on the stack, on the format CSI ? <slot index> ; <palette count> # Q When XTPUSHCOLORS grows the stack with more than one element (i.e. via a 'CSI N # P' sequence), make sure *all* new slots are initialized (to the current color palette). This avoids uninitialized slots, that could then be popped with XTPOPCOLORS. Closes #856
| * osc: merge OSC 10/11/12/17/19 handlingDaniel Eklöf2024-07-03-58/+33
|/ | | | | | | | | | 10/11/17/19 were already merged, so this patch just stops special casing 12 (cursor color). In preparation for XTPUSHCOLORS/XTPOPCOLORS, the cursor colors are moved from their own struct, into the 'colors' struct. Also fix a bug where OSC 17/19 queries returned OSC-11 data.
* csi: implement SGR 21, double underlinesDaniel Eklöf2024-07-03-1/+10
|
* render: fix "maybe-uninitialized" error in draw_styled_underline()Craig Barnes2024-07-03-2/+3
| | | | | | | | | | | | | | | | | | Reproducer: CFLAGS='-Og -g' meson setup --buildtype=debug bld ninja -C bld Error message: ../render.c: In function ‘draw_styled_underline’: ../render.c:490:19: error: ‘y_ofs’ may be used uninitialized [-Werror=maybe-uninitialized] 490 | const int top = y + y_ofs; | ^~~ ../render.c:405:9: note: ‘y_ofs’ was declared here 405 | int y_ofs; | ^~~~~
* doc: foot-ctlseq: add missing "E" to DECRQSS sequenceCraig Barnes2024-07-03-1/+1
| | | | This omission seems to have been a typo in commit add530e66d770954.
* Rename various uses of "curly" in the source code with "underline"Craig Barnes2024-07-01-169/+169
| | | | | Since "curly" could make it seem as if all underline styles are curled (to people unfamiliar with the codebase), whereas in reality only 1 is.
* dcs: DECRQSS: styled+colored underlinesDaniel Eklöf2024-07-01-12/+46
|
* render: cursor color: remove assertion that both cursor fg/bg be setDaniel Eklöf2024-07-01-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | Before this patch, we asserted both the cursor foreground, and background colors had been set. This is true in most cases; the config system enforces it. It is however possible to set only the cursor background color, while leaving the foreground (text) color unset: * Use a foot config that does *not* configure the cursor colors. This means foot will invert the default fg/bg colors when rendering the cursor. * Override the cursor color using an OSC-12 sequence. OSC-12 only sets the background color of the cursor, and there is no other OSC sequence to set the cursor's text color. To handle this, remove the assertion, and simply split the logic for the cursor backgound and foreground colors: * Use the configured background color if set (either through config or OSC-12), otherwise use the default foreground color. * Use the configured foreground color if set (through config), otherwise use the default background color.
* Merge branch 'curly-underlines'Daniel Eklöf2024-07-01-213/+911
|\ | | | | | | Closes #828
| * reaadme: add styled and colored underlines to the feature listDaniel Eklöf2024-06-27-0/+1
| |
| * grid: merge reflow_{uri,curly}_range_start(), and reflow_{uri,curly}_range_end()Daniel Eklöf2024-06-27-41/+47
| |
| * render: draw_styled_underline(): respect main.underline-thicknessDaniel Eklöf2024-06-27-4/+19
| | | | | | | | | | Also refactor a bit, and break out early to draw_underline() for legacy underlines.
| * render: underlines: improve the appearance of the 'dotted' styleDaniel Eklöf2024-06-27-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try to make the 'dotted' style appear more even, and less like each cell is rendered separately (even though they are). Algorithm: Each dot is a square; it's sides are that of the font's line thickness. The spacing (gaps) between the dots is initially the same width as the dots themselves. This means the number of dots per cell is the cell width divided by the dots' length/width, divided by two. At this point, there may be "left-over" pixels.I.e. the widths of the dots and the gaps between them may not add up to the width of the cell. These pixels are evenly (as possible) across the gaps. There are still visual inaccuracies at small font sizes. This is impossible to fix without changing the way underlines are rendered, to render an entire line in one go. This is not something we want to do, since it'll make styled underlines, for a specific cell/character, look differently, depending on the surrounding context.
| * grid: refactor: replace {uri,curly}_range_append() with range_append()Daniel Eklöf2024-06-26-49/+70
| | | | | | | | | | Also add range_append_by_ref(), with replaces uri_range_append_no_strdup().
| * grid: row_range_put(): use correct type in call to range_delete()Daniel Eklöf2024-06-26-1/+1
| |
| * grid: refactor: remove union range_data_for_insertionDaniel Eklöf2024-06-26-51/+33
| | | | | | | | | | | | | | | | | | This union is identical to row_range_data, except the URI char pointer is const. Let's ignore that, and re-use row_range_data, casting the URI pointer when necessary. Also remove uri_range_insert() and curly_range_insert(), and use the generic version of range_insert() everywhere.
| * grid: grid_row_{uri,curly}_range_put(): share codeDaniel Eklöf2024-06-26-130/+114
| | | | | | | | | | | | | | | | grid_row_uri_range_put() and grid_row_curly_range_put() now share the same base logic. Range specific data is passed through a union, and range specific checks are done through switched functions.
| * foot.info: add 'Setulc' (set underline color) capabilityDaniel Eklöf2024-06-26-0/+1
| |
| * foot.info: add 'Su' (Styled Underlines) boolean capabilityDaniel Eklöf2024-06-26-0/+1
| |
| * csi: sgr_reset(): avoid using memset()Daniel Eklöf2024-06-26-3/+2
| | | | | | | | | | This _should_ be what the compiler does anyway (i.e. it _should_ replace the memset() with inline MOVs). But let's be sure.
| * render: underlines: minor perf-tweak: early break outDaniel Eklöf2024-06-26-0/+3
| | | | | | | | | | When looking up the extender underline range, break out early if we see that there can't possibly be any ranges matching the current column.
| * changelog: styled + colored underlinesDaniel Eklöf2024-06-26-1/+2
| |
| * doc: foot-ctlseq: add 58/59 (styled + colored underlines)Daniel Eklöf2024-06-26-3/+7
| |
| * term: performance: use a bitfield to track which ascii printer to useDaniel Eklöf2024-06-26-13/+63
| | | | | | | | | | | | | | | | | | | | | | The things affecting which ASCII printer we use have grown... Instead of checking everything inside term_update_ascii_printer(), use a bitfield. Anything affecting the printer used, must now set a bit in this bitfield. This makes term_update_ascii_printer() much faster, since all it needs to do is check if the bitfield is zero or not.
| * term: term_fill(): only set OSC-8 + styled hyperlinks when use_sgr_attrs is setDaniel Eklöf2024-06-26-3/+4
| |
| * terminal: term_fill(): fix osc8 erase bug + handle styled underlinesDaniel Eklöf2024-06-26-2/+16
| | | | | | | | | | | | | | | | Only clear OSC-8 hyperlinks at the target columns if we don't have an active OSC-8 URI. This corresponds to normal VT attributes; the currently active attributes are set, and all others are cleared. Handle styled underlines in the same way
| * render: resize: copy styled underlines to temporary gridDaniel Eklöf2024-06-26-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | When doing an interactive resize, we create a small grid copy of the current viewport, and then do a non-reflow resize. When the interactive resize is done, we do a proper reflow. This is for performance reasons. When creating the viewport copy, we also need to copy the styled underlines. Otherwise, styled underlines will be rendered as plain underlines *while resizing*.
| * grid: reflow: handle styled underlinesDaniel Eklöf2024-06-26-38/+128
| |
| * render: styled underlinesDaniel Eklöf2024-06-26-1/+118
| | | | | | | | | | | | | | | | This was originally contributed by @kraftwerk28 in https://codeberg.org/dnkl/foot/pulls/1099 Here, we re-use the rendering logic only, as attribute tracking has been completely rewritten.
| * csi: remove debug logDaniel Eklöf2024-06-26-1/+0
| |
| * foot.info: add smulx (styled underlines)Daniel Eklöf2024-06-26-0/+1
| |
| * csi: wip: styled underlinesDaniel Eklöf2024-06-26-66/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | This is work in progress, and fairly untested. This adds initial tracking of styled underlines. Setting attributes seems to work (both color and underline style). Grid reflow has *not* been tested. When rendering, style is currently ignored (all styles are rendered as a plain, legacy underline). Color however, *is* applied.
| * grid: refactor: first step towards a more generic range handlingDaniel Eklöf2024-06-26-81/+135
|/
* Merge branch 'vs15-16'Daniel Eklöf2024-06-26-8/+930
|\ | | | | | | Closes #1742
| * scripts: generate-emoji-variation-sequences: don't assume single codepoint sequencesDaniel Eklöf2024-06-26-4/+11
| | | | | | | | | | | | | | | | | | | | Right now (Unicode 15.1), all valid variation sequences consist of a single Unicode codepoint (followed by either VS-15 or VS-16). Don't assume this is the case. We don't actually handle longer sequences. But now we at least catch such escapes, and error out.
| * scripts: generate-emoji-variation-sequences: compact the C structDaniel Eklöf2024-06-26-3/+3
| | | | | | | | | | | | | | | | | | | | Lookups in this table is not performance critical at all. Thus, let's compact it to bring down the binary size of foot. This brings the size of each entry down from 9 bytes to 6, bringing the size of the whole thing down from 1647 bytes to 1098 bytes, saving us 549 bytes.
| * vt: unittest: verify emoji_vs list is sortedDaniel Eklöf2024-06-25-0/+14
| |
| * scripts: generate-emoji-variation-sequences: don't assume input is sortedDaniel Eklöf2024-06-25-15/+16
| |
| * vt: only apply VS-15/16 to valid sequencesDaniel Eklöf2024-06-25-6/+903
| | | | | | | | | | | | | | | | | | | | At compile time, build a lookup table from the Unicode data file 'emoji-variation-sequences.txt'. At run-time, when we detect a VS-15/16 sequence, do a lookup in this table, and enforce the variation selector iff the sequence is valid. Closes #1742
| * vt: don't ignore VS-15 (text presentation)Daniel Eklöf2024-06-25-3/+6
|/ | | | | When we encounter either VS-15 or VS-16, set the grapheme width to 1 or 2 explicitly.
* doc: foot.ini: fix typosDaniel Eklöf2024-06-25-3/+3
|
* doc: foot.ini: document issues with fractional scaling and initial-window-size-*Daniel Eklöf2024-06-25-1/+12
| | | | | | Since most compositors don't report the correct scaling factor until *after* the window has been mapped, these options often do not work.
* shm: discard shm buffers with mis-matching alpha-settingDaniel Eklöf2024-06-24-1/+5
|
* input: don't reset the XKB compose state in keymap()Daniel Eklöf2024-06-22-27/+22
| | | | | | | | | | | | | When the compositor sends a new keymap, don't reset the XKB compose state. This is done by initializing the XKB context, along with the compose state, when binding the seat, instead of in keymap(). Then, in keymap(), simply stop destroying the old xkb state. Only destroy, and re-create the keymap state. Closes #1744
* input: implement wl_pointer::axis_value120()Daniel Eklöf2024-06-18-13/+69
| | | | | | | | | | | | | | | | | | | This implements high resolution mouse wheel scroll events. A "normal" scroll step corresponds to the value 120. Anything less than that is a partial scroll step. This event replaces axis_discrete(), when we bind wl_seat v8 (which we now do, when available). We calculate the number of degrees that is required to scroll a single line, based off of the scrollback.multiplier value. Each high-res event accumulates, until we have at least the number of degress required to scroll one, or more lines. The remaining degrees are kept, and added to in the next scroll event. Closes #1738
* osc: 52: treat OSC-52 replies as paste data (after all, they are)Daniel Eklöf2024-06-09-8/+34
| | | | | | | | | | | | | | | | | This fixes an issue where other data (such as replies to other requests) being interleaved with the OSC-52 reply. The patch piggy backs on the already existing mechanism for handling regular pastes, where other data is queued up until the paste is done. There's one corner case that won't work; if the user *just* did a normal paste (i.e. at virtually the same time the application requested OSC-52 data), the OSC-52 request will return an empty reply. Likewise, if there are multiple OSC-52 requests at the same time, only the first will return data. Closes #1734
* foot.ini: add missing option resize-by-cellsDaniel Eklöf2024-06-08-0/+1
| | | | Closes #1731
* config: codespell: varios -> variousDaniel Eklöf2024-06-08-1/+1
|