aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * | render: allow-overflow: require a space in the next cellDaniel Eklöf2020-11-19-1/+5
|/ / | | | | | | | | | | | | | | When checking if we should allow a single-width character double-width glyph to overflow into the next cell, require the next cell to either be empty, or contain a space. Closes #203
* | keymap: fix alt+return combosDaniel Eklöf2020-11-19-11/+12
| | | | | | | | | | | | | | | | All alt+return combos mapped to the same escape sequence as alt+return itself. With this patch, alt+<mod(s)>+return map to a standard ‘CSI 27;x;13~’ sequence.
* | keymap: use same lookup table for Tab and ISO_Left_TabDaniel Eklöf2020-11-19-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With XKB, Shift+Tab maps to XKB_KEY_ISO_Left_Tab, not XKB_Key_Tab. Previously, we had two different lookup tables for the two. The tab table was correctly populated, while the ISO-left tab wasn’t. As a result, all Shift+Tab combos (except Shift+Tab itself) was wrong, and resulted in the same escape sequence as Shift+Tab. Fix by using the same table for both tab and ISO-left tab. Closes #210
* | Merge branch 'dim-and-brighten-via-hsl'Daniel Eklöf2020-11-17-27/+30
|\ \
| * | render: dim/brighten: multiply/divide instead of add/subtractDaniel Eklöf2020-11-15-2/+2
| | |
| * | render: dim and brighten colors by adjusting luminanceDaniel Eklöf2020-11-15-27/+30
|/ / | | | | | | | | To do this, we need to convert our RGB to HSL, adjust luminance, and then convert back to RGB.
* | hsl: add our own implementations of rgb-to-hsl and hsl-to-rgbDaniel Eklöf2020-11-15-136/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New function: rgb_to_hsl() * New function: hsl_to_rgb() * Replace XTerm’s hls_to_rgb() with our own, hsl_to_rgb(). * Ensure hue/lum/sat values are within range before calling hsl_to_rgb() Note that sixels’ use the following primary hues: * blue: 0° * red: 120 * green: 240° While “standard” HSL uses: * red: 0° * green: 120° * blue: 240° Thus, we need to adjust the sixel’s hue value before calling hsl_to_rgb().
* | render: remove debug outputDaniel Eklöf2020-11-15-1/+0
| |
* | Merge branch 'bold-is-bright'Daniel Eklöf2020-11-14-0/+23
|\ \ | | | | | | | | | Closes #199
| * | changelog: bold-text-in-brightDaniel Eklöf2020-11-14-0/+3
| | |
| * | render: brighten color of bold text if default.bold-text-in-bright=yesDaniel Eklöf2020-11-14-0/+10
| | | | | | | | | | | | Closes #199
| * | doc: foot.ini: document default.bold-text-in-brightDaniel Eklöf2020-11-14-0/+4
| | |
| * | config: add default.bold-text-in-bright optionDaniel Eklöf2020-11-14-0/+6
| | |
* | | install: simplify sentenceDaniel Eklöf2020-11-14-1/+1
| | |
* | | pkgbuild: remove -fno-pltDaniel Eklöf2020-11-14-2/+1
| | |
* | | install: remove -fno-plt from recommended CFLAGSDaniel Eklöf2020-11-14-2/+2
|/ / | | | | | | It appears to _worsen_ the performance...
* | changelog: move pipe-* actions from ‘fixed’ to ‘added’Daniel Eklöf2020-11-13-4/+4
| |
* | readme: don’t uppercase titlesDaniel Eklöf2020-11-13-2/+2
| |
* | config: enable allow-overflowing-double-width-glyphs by defaultDaniel Eklöf2020-11-13-5/+9
| |
* | render: improve sixel rendering performanceDaniel Eklöf2020-11-13-45/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, we’ve always re-rendered the entire image (the part of it that is visible at least), *every* time we render a frame. This is not really needed. In many cases, the cells covered by the image hasn’t been touched. Rewrite the sixel rendering code to only render the part of the sixel image that covers dirty cells. This is done on a per-row basis. I.e. Each *row* of the image that covers at least one dirty cell is re-rendered. For this to work, we now also dirty all cells covered by the image when we emit the image. Finally, for this to work, the sixels need to be rendered *before* we do the normal grid render pass (since that will clear all dirty bits).
* | changelog: fix link to readme#keypadDaniel Eklöf2020-11-12-2/+3
| |
* | Merge branch 'keypad-numlock-override'Daniel Eklöf2020-11-12-9/+72
|\ \ | | | | | | | | | Closes #194
| * | readme/doc:foot.1: document the (new) keypad behaviorDaniel Eklöf2020-11-11-1/+40
| | |
| * | input: enforce ‘numerical’ keypad mode when Num Lock override is enabledDaniel Eklöf2020-11-11-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When num lock override has been enabled via “CSI?1035h” (the default), keypad is always considered to be in ‘numerical’ mode. This affects how keypad keys are translated to escape sequences when Num Lock is active. The keypad has four modes: * Num Lock off, numerical mode * Num Lock off, application mode * Num Lock on, numerical mode * Num Lock on, application mode The keymap is identical for numerical and application mode when Num Lock is off, meaning the keypad effectively has three different modes. In XTerm, numerical and application mode _can_ be the same, **if** the ‘numLock’ resource is set to true (the default). It is only when ‘numLock’ is false that the application mode is actually used. This patch changes foot to do the same. We don’t expose an option, but do implement “CSI ? 1035”. Closes #194
| * | input: track num lock stateDaniel Eklöf2020-11-11-0/+6
| | |
| * | csi: implement “CSI ? 1035” - toggle Num Lock overrideDaniel Eklöf2020-11-11-0/+11
| | | | | | | | | | | | | | | This adds a num_lock_modifier state to the terminal, and hooks up “CSI?1035h/l” to toggle it.
| * | input: use XKB_MOD_NAME_* macros instead of hard-coded stringsDaniel Eklöf2020-11-11-4/+4
| | |
* | | pkgbuild: append ‘foot-terminfo’ dependency in package_foot-git()Daniel Eklöf2020-11-12-1/+2
| | | | | | | | | | | | | | | | | | | | | This ensures that: * Main dependencies are still checked before the package is built * Makepkg doesn’t complain about missing dependency foot-terminfo
* | | pkgbuild: make foot-terminfo a hard dependency for footDaniel Eklöf2020-11-11-2/+1
| | |
* | | Merge branch 'preempt-render-scheduling-on-configure-events'Daniel Eklöf2020-11-11-5/+16
|\ \ \ | |/ / |/| | | | | Closes #190
| * | wayland: preempt render scheduling in ‘configure’ eventsDaniel Eklöf2020-11-10-5/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A configure event must be “committed”. In case of resizing, that means rendering a new frame and committing that surface. render_resize() will resize the grid and *schedule* a render refresh. However, if one is already pending, the refresh will take a very (relatively) long time - until the next frame callback is received. This poses a problem when the window is hidden, since in this case, the frame callback *never* comes. This in turn means we fail to commit a new surface in response to the ‘configure’ event. And that means the compositor needs to wait for a transaction timeout before continuing. The end effect is very slow and jerky window resizing when a hidden foot window is being resized. This can happen in tiled compositors, like Sway, where a window can be tabbed (and thus invisible), but still resized when its container is resized. Closes #190
* | client: let getopt_long(3) print error messagesDaniel Eklöf2020-11-10-6/+1
| | | | | | | | Closes #191
* | input: ignore keymap if we don’t recognize its formatDaniel Eklöf2020-11-09-9/+26
| |
* | wayland: use wl_*_release() instead of wl_*_destroy()Daniel Eklöf2020-11-09-7/+9
| | | | | | | | This lets the compositor free up internal state.
* | Merge branch 'jeromenerf-patch-1'Daniel Eklöf2020-11-07-2/+3
|\ \ | | | | | | | | | Closes #185
| * | Fix documentation snippetsjeromenerf2020-11-06-2/+3
|/ / | | | | | | | | - zsh doesn't like "export var+=value", make it two steps - meson was complaining with "ERROR: Must specify at least one directory name.", so add the relative "../.."
* | Merge branch 'releases/1.5'Daniel Eklöf2020-11-06-11/+18
|\|
| * meson/pkgbuild: bump version to 1.5.31.5.3Daniel Eklöf2020-11-06-2/+2
| |
| * selection: fix enum typeDaniel Eklöf2020-11-06-1/+1
| | | | | | | | | | | | | | | | enum selection_scroll_direction is used when extending a selection by auto-scrolling the terminal content while the mouse is outside the grid. What we want is enum selection_direction.
| * selection: explicitly set direction when right-click extendingDaniel Eklöf2020-11-06-0/+8
| | | | | | | | | | | | | | Fixes an issue where right-click-and-dragging to extend a selection caused one cell being removed from the selection. Closes #180
| * input: don’t use seat->kbd_focus as terminal when processing a key pressDaniel Eklöf2020-11-06-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | When converting mouse scroll events to keyboard input (in alternate scroll mode), we need to use seat->mouse_focus, not seat->kbd_focus. To enable this, break out key press/release handling code to a separate function that takes an explicit term argument. Call this function from keyboard_key(), input_repeat() and in alternate scroll mode. Closes #179
| * tiocswinsz: fix compilation error on e.g. ppc64Daniel Eklöf2020-11-06-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some platforms, TIOCSWINSZ has a very large value, > 0x80000000. On some platforms, the `request` argument to `ioctl(3)` is an `int`. For platforms where both of the above is true, gcc will warn (and error out if compiled with `-Werror`) on: ioctl(fd, TIOCSWINSZ, ...) To silence this warning, we need to cast `TIOCSWINSZ` to an integer. However, doing this on platforms where `request` is an `unsigned long` will result in `TIOCSWINSZ` being sign-extended (and thus we end up with an invalid value). It seems that casting to `unsigned int` works in both cases; it silences the long -> int conversion warning, while also preserving the correct value in all cases.
| * main: remove trailing ‘, ’ from arch log lineDaniel Eklöf2020-11-06-1/+1
| |
| * input: handle XKB errorsDaniel Eklöf2020-11-06-58/+74
| | | | | | | | | | | | | | | | | | | | | | * Don’t de-reference the xkb context/keymap/state if we failed to instantiate them. * Don’t try to send a translated utf8 key sequence if the translation failed. * Handle xkb_compose_state_get_utf8() and xkb_state_key_get_utf8() returning more than 64 bytes. This _may_ fix #171.
| * input: don’t allow diagonal resize when tiledDaniel Eklöf2020-11-06-8/+13
| |
| * wayland: properly restore window size when being un-tiledDaniel Eklöf2020-11-06-17/+52
| | | | | | | | | | | | | | | | Bind to xdg-shell version 2 if available, as this enables us to track our window’s ‘tiled’ state in the ‘configure’ events. This in turn allows us to stash the ‘old’ window size when being tiled, to be used again when restoring the window size when un-tiled.
| * input: don’t crash if xkbcommon cannot find a compose fileDaniel Eklöf2020-11-06-8/+28
| | | | | | | | | | | | | | | | Handle xkb_compose_table_new_from_locale() returning NULL. When this happens, log a warning that “dead keys” will be disabled, and make sure to never de-reference the compose table pointer. Closes #170
| * changelog: prepare for 1.5.3Daniel Eklöf2020-11-06-0/+5
| |
| * shm: MAP_UNINITIALIZED is a linux only mmap flagDaniel Eklöf2020-10-13-0/+4
| |
* | selection: fix enum typeDaniel Eklöf2020-11-06-1/+1
| | | | | | | | | | | | | | | | enum selection_scroll_direction is used when extending a selection by auto-scrolling the terminal content while the mouse is outside the grid. What we want is enum selection_direction.
* | config: add support for pipe-* actions in mouse bindingsDaniel Eklöf2020-11-06-6/+65
| | | | | | | | Closes #183
* | config: mouse combos: set count=1 if user has omitted click countDaniel Eklöf2020-11-06-1/+1
| |
* | config: break out “[cmd arg1 arg2]” parsing to separate functionDaniel Eklöf2020-11-06-21/+63
| |
* | config: don’t use memcmp() to compare structsDaniel Eklöf2020-11-06-11/+22
| |
* | wayland: output removed: only call surface_leave() if term is actually mapped on that outputDaniel Eklöf2020-11-06-3/+9
| |
* | selection: explicitly set direction when right-click extendingDaniel Eklöf2020-11-04-0/+8
| | | | | | | | | | | | | | Fixes an issue where right-click-and-dragging to extend a selection caused one cell being removed from the selection. Closes #180
* | input: don’t use seat->kbd_focus as terminal when processing a key pressDaniel Eklöf2020-11-03-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | When converting mouse scroll events to keyboard input (in alternate scroll mode), we need to use seat->mouse_focus, not seat->kbd_focus. To enable this, break out key press/release handling code to a separate function that takes an explicit term argument. Call this function from keyboard_key(), input_repeat() and in alternate scroll mode. Closes #179
* | search: add {clipboard,primary}-paste key bindingsDaniel Eklöf2020-11-01-25/+90
| | | | | | | | | | | | | | | | | | | | These bindings copy from the clipboard or primary selection into the search buffer. Default bindings: * clipboard-paste: ctrl+v, ctrl+y * primary-paste: shift+insert
* | selection: do mime-type based decoding before passing data to callbackDaniel Eklöf2020-11-01-119/+104
| | | | | | | | | | | | | | | | | | | | The intention here is to make *all* text_from_clipboard() and text_from_primary() callers benefit from mime-type base decoding (e.g. URI list decoding). Previously, the decoding was done *in* the callback, which meant only the “default” clipboard/primary selection paste functions, and DnD, recognized URI lists.
* | Merge branch 'silence-tiocswinsz-conversion-warning'Daniel Eklöf2020-10-31-2/+5
|\ \
| * | tiocswinsz: fix compilation error on e.g. ppc64Daniel Eklöf2020-10-29-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some platforms, TIOCSWINSZ has a very large value, > 0x80000000. On some platforms, the `request` argument to `ioctl(3)` is an `int`. For platforms where both of the above is true, gcc will warn (and error out if compiled with `-Werror`) on: ioctl(fd, TIOCSWINSZ, ...) To silence this warning, we need to cast `TIOCSWINSZ` to an integer. However, doing this on platforms where `request` is an `unsigned long` will result in `TIOCSWINSZ` being sign-extended (and thus we end up with an invalid value). It seems that casting to `unsigned int` works in both cases; it silences the long -> int conversion warning, while also preserving the correct value in all cases.
* | | selection: dnd: fix wl_data_offer_destroy() raceDaniel Eklöf2020-10-31-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the end of a drag-and-drop operation, we need to call `wl_data_offer_finish()`. We *must* ensure the data offer hasn’t been destroyed before that. This could previously happen if the compositor decided to send a regular clipboard offer *after* we had started a drop operation, but *before* it had finished. The dnd offer was then destroyed when the clipboard offer was received, causing us to crash in `wl_data_offer_finish()`. To handle this, let the receive_offer_context take over ownership of the data_offer pointer, and “manually” destroy it *after* calling `wl_data_offer_finish()` in `receive_dnd_done()`. Note: we should not, and can not, do the same thing for regular clipboard and primary selection offers; such offers can be used multiple times and should *not* be destroyed after a single copy operation.
* | Merge branch 'drag-and-drop'Daniel Eklöf2020-10-28-127/+683
|\ \
| * | codespell: fix misspelled wordsDaniel Eklöf2020-10-28-3/+3
| | |
| * | selection: add support for different mime-typesDaniel Eklöf2020-10-28-90/+329
| | | | | | | | | | | | | | | | | | Add support for `text/plain`, `text/plain;charset=utf-8` and `text/uri-list` to regular copy operations (both from clipboard and primary selection) and drag-and-drop operations.
| * | osc: use new uri_parse() to parse an OSC7 PWD URIDaniel Eklöf2020-10-28-75/+13
| | |
| * | uri: add uri_parse() - new function extracts components from an URIDaniel Eklöf2020-10-28-0/+286
| | |
| * | selection: debug log of data offer mime-types and actionsDaniel Eklöf2020-10-26-5/+5
| | |
| * | selection: implement support for drag-and-dropDaniel Eklöf2020-10-26-5/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We accept COPY and MOVE actions, for text/plain;charset=utf-8 mime-types. To implement DnD, we need to track the current DnD data offer *and* the terminal instance it is (currently) targeting. To do this, a seat has a new member, ‘dnd_term’. On a DnD enter event, we lookup the corresponding terminal instance and point ‘dnd_term’ to it. On a DnD leave event, ‘dnd_term’ is reset. The DnD data offer is tracked in the terminal’s wayland window instance. It is reset, along with the seat’s ‘dnd_term’ on a DnD leave event. On a drop event, we immediately clear the seat’s ‘dnd_term’, to ensure we don’t reset it, or destroy the offer before the drop has been completed. The drop’s ‘done()’ callback takes care of destroying and resetting the DnD offer in the terminal’s wayland window instance. Closes #175
| * | wayland: bind to data-device-manager version 3, for drag-and-drop supportDaniel Eklöf2020-10-26-1/+1
|/ /
* | main: remove trailing ‘, ’ from arch log lineDaniel Eklöf2020-10-25-1/+1
| |
* | render: blink switches between foreground and dimmed foregroundDaniel Eklöf2020-10-22-3/+8
| |
* | Merge branch 'custom-bold-italic-fonts'Daniel Eklöf2020-10-21-69/+158
|\ \ | | | | | | | | | Closes #169
| * | doc: foot.ini.5: mention how one can disable bold/italic fonts completelyDaniel Eklöf2020-10-20-0/+3
| | |
| * | config: add font-bold, font-italic and font-bold-italic optionsDaniel Eklöf2020-10-20-69/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These options lets the user configure custom fonts and styles, to use with the bold and italic cell attributes. By default, they are unset, meaning we use the bold/italic variants of the regular font. Closes #169.
* | | changelog: restored -> restoreDaniel Eklöf2020-10-20-1/+1
|/ /
* | osc: change info logging to debug logging when changing the cursor colorDaniel Eklöf2020-10-20-1/+1
| |
* | input: handle XKB errorsDaniel Eklöf2020-10-20-58/+74
| | | | | | | | | | | | | | | | | | | | | | * Don’t de-reference the xkb context/keymap/state if we failed to instantiate them. * Don’t try to send a translated utf8 key sequence if the translation failed. * Handle xkb_compose_state_get_utf8() and xkb_state_key_get_utf8() returning more than 64 bytes. This _may_ fix #171.
* | input: don’t allow diagonal resize when tiledDaniel Eklöf2020-10-20-8/+13
| |
* | wayland: properly restore window size when being un-tiledDaniel Eklöf2020-10-20-17/+52
| | | | | | | | | | | | | | | | Bind to xdg-shell version 2 if available, as this enables us to track our window’s ‘tiled’ state in the ‘configure’ events. This in turn allows us to stash the ‘old’ window size when being tiled, to be used again when restoring the window size when un-tiled.
* | Merge branch 'dont-require-a-compose-file' into masterDaniel Eklöf2020-10-20-8/+30
|\ \ | | | | | | | | | Closes #170
| * | input: don’t crash if xkbcommon cannot find a compose fileDaniel Eklöf2020-10-19-8/+30
|/ / | | | | | | | | | | | | | | Handle xkb_compose_table_new_from_locale() returning NULL. When this happens, log a warning that “dead keys” will be disabled, and make sure to never de-reference the compose table pointer. Closes #170
* | term: reset: enable/disable cursor blink depending on user configurationDaniel Eklöf2020-10-13-1/+4
| |
* | term: reset: kill blink timerDaniel Eklöf2020-10-13-0/+1
| |
* | term: remove unneeded blink.active fieldDaniel Eklöf2020-10-13-4/+0
| | | | | | | | We now use the timer FD instead; if it is -1, blinking is not active.
* | term: instantiate cursor blink timer on-demandDaniel Eklöf2020-10-13-9/+21
| |
* | term: create/destroy blink timer on-demandDaniel Eklöf2020-10-13-15/+21
| | | | | | | | | | | | | | | | Blinking text is uncommon. It doesn’t make that much sense to keep a timer opened (but unarmed) at all times. This patch makes it so the timer is instantiated on-demand, and destroyed again when it no longer is needed.
* | term: subpixel changed: fix build with LOG_ENABLE_DBG=1Daniel Eklöf2020-10-13-6/+6
| |
* | selection: re-factor: break out code shared between clipboard/primary sendDaniel Eklöf2020-10-13-59/+21
| | | | | | | | | | The send functions are called by the compositor when another application wants to paste data *from* foot.
* | Merge branch 'releases/1.5' into masterDaniel Eklöf2020-10-13-9/+20
|\|
| * meson/pkgbuild: bump version to 1.5.21.5.2Daniel Eklöf2020-10-13-2/+2
| |
| * input: regression: don’t pass on mouse click to application if we consumed itDaniel Eklöf2020-10-13-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | When we ‘consume’ a mouse button event (i.e. when we have a shortcut mapped to it), the event should *not* be passed on to the client application. In 5f64c5c33590a41afd3f621870c6abd89b859073, button handling was refactored and unfortunately introduced a regression where we once again started passing consumed button presses to the client application. Fixes #168
* | Merge branch 'scroll-up-down-while-selecting' into masterDaniel Eklöf2020-10-12-1/+164
|\ \ | | | | | | | | | Closes #149
| * | selection: auto-scroll: call cmd_scrollback_{up,down}() with number of rowsDaniel Eklöf2020-10-11-4/+2
| | | | | | | | | | | | | | | No need to loop and call cmd_scrollback_{up,down}() with ‘1’ each loop iteration; just call it with the total number of lines to scroll.
| * | selection: cancel: call selection_stop_scroll_timer()Daniel Eklöf2020-10-11-4/+1
| | | | | | | | | | | | | | | Instead of re-implementing the same logic, simply call selection_stop_scroll_timer().
| * | input: comment: ‘measures’ -> ‘measured’Daniel Eklöf2020-10-11-1/+1
| | |
| * | input: comment: ‘fast’ -> ‘faster’Daniel Eklöf2020-10-11-1/+1
| | |
| * | changelog: auto-scroll while selectingDaniel Eklöf2020-10-11-0/+3
| | |
| * | selection: auto-scroll: add SELECTION_SCROLL_NOT as a scroll ‘direction’Daniel Eklöf2020-10-11-10/+32
| | |
| * | input: auto-scroll: apply scrollback.multiplier to the interval divisorDaniel Eklöf2020-10-11-2/+3
| | |