aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* changelog: search for last searched-for stringDaniel Eklöf2022-01-29-0/+2
|
* doc: foot.1: describe how to search for the previous search stringDaniel Eklöf2022-01-29-2/+4
|
* doc: foot.1: shortcuts: mention that there are more actions than listed hereDaniel Eklöf2022-01-29-4/+3
|
* search: remember last searched-for string between searchesDaniel Eklöf2022-01-29-5/+33
| | | | | | | | | Regardless of how we exit search mode (commit or cancel), the search string is remembered. The next time we enter search mode, the last searched-for string will be used when searching for the next/prev match (ctrl+r, ctrl+s), and the search query is empty.
* search: refactor: add add_wchars(), make search_add_chars() use itDaniel Eklöf2022-01-29-23/+28
| | | | | | | | search_add_chars() converts the incoming UTF-8 string into a wide-char string, and then calls add_wchars(). add_wchars() inserts the string into the search buffer, at the current cursor position.
* Merge branch 'xcursor-size'Daniel Eklöf2022-01-29-3/+9
|\
| * wayland: use strtol() to parse xcursor_sizePranjal Kole2022-01-29-3/+9
| | | | | | | | | | | | sscanf is not very robust. For example, $ XCURSOR_SIZE="36asdf" foot works without any errors, and xcursor_size is parsed as 36.
* | Merge branch 'xcursor-getenv-fix'Daniel Eklöf2022-01-29-1/+2
|\|
| * wayland: use getenv() according to specPranjal Kole2022-01-29-1/+2
|/ | | | | | | | | | From the NOTES section of getenv(3): The string pointed to by the return value of getenv() may be statically allocated, and can be modified by a subsequent call to getenv()... So, previously xcursor_theme could be modified by libc to contain xcursor_size. This has been fixed by getting xcursor_theme after computing the value of xcursor_size.
* doc: foot.1: add missing ‘*’Daniel Eklöf2022-01-27-1/+1
|
* doc: foot.1: use tab for indentationDaniel Eklöf2022-01-27-1/+1
|
* Merge branch 'document-ansi-colors'Daniel Eklöf2022-01-27-6/+6
|\
| * doc: document the 8 ANSI escape codes.Mark Stosberg2022-01-15-6/+6
| |
* | readme: add URL mode to the list of keyboard shortcutsDaniel Eklöf2022-01-27-0/+10
| |
* | readme: add the new XF86{Copy,Paste} keyboard shortcutsDaniel Eklöf2022-01-27-2/+2
| |
* | doc: foot.1: add URL mode bindings to the list of default keyboard shortcutsDaniel Eklöf2022-01-27-0/+9
| |
* | doc: foot.1: add “enter URL mode” shortcutDaniel Eklöf2022-01-27-0/+4
| |
* | doc: foot.1: add the new XF86{Copy,Paste} key bindingsDaniel Eklöf2022-01-27-2/+2
| |
* | Merge branch 'support-copy-paste-keybindings-by-default'Daniel Eklöf2022-01-25-4/+7
|\ \
| * | config: support Copy and Paste keycodes by defaultMark Stosberg2022-01-25-4/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | These work as expected and don't interfere with anything else. They are useful on the increasing number of keyboards with custom firmware. The keycodes enable using the same key combination for terminals as other apps. For example: by holding down a layer-switching key with a thumb, the Copy and Paste key codes can be assigned to the C and V keys on a secondary layer, making for a natural universal copy/paste key combination.
* | Merge branch 'typo'Daniel Eklöf2022-01-25-1/+1
|\ \
| * | Fix typo in manual page for foot.ini(5).Felix Lechner2022-01-20-1/+1
| |/
* | Merge branch 'remove-deprecated-bell-from-ini'Daniel Eklöf2022-01-25-1/+0
|\ \ | |/ |/|
| * foot.ini: remove deprecated "bell" option.Mark Stosberg2022-01-17-1/+0
|/ | | | | | | | | The "bell" option has been deprecated for 9 months. The shipped `foot.ini` is used as a reference for setting up new configs and deprecated options should not be used in new configs. Further, the "bell=" option is no longer documented in `man foot.ini`, creating confusion.
* meson: fix race build order of builtin terminfoDaniel Eklöf2022-01-15-2/+2
| | | | | | The builtin terminfo is used by dcs.c, which is built as part of the static library ‘vtlib’. Thus, vtlib needs to depend on the builtin_terminfo target.
* Merge branch 'clock-gettime'Daniel Eklöf2022-01-15-103/+123
|\
| * replace gettimeofday with clock_gettimePranjal Kole2022-01-15-103/+123
|/ | | | | | | | | | | | | POSIX.1-2008 has marked gettimeofday(2) as obsolete, recommending the use of clock_gettime(2) instead. CLOCK_MONOTONIC has been used instead of CLOCK_REALTIME because it is unaffected by manual changes in the system clock. This makes it better for our purposes, namely, measuring the difference between two points in time. tv_sec has been casted to long in most places since POSIX does not define the actual type of time_t.
* Merge branch 'clock'Daniel Eklöf2022-01-14-1/+1
|\
| * terminal: use CLOCK_MONOTONIC instead of literal.Érico Nogueira2022-01-14-1/+1
|/ | | | | CLOCK_MONOTONIC isn't guaranteed to have the same value on all platforms, and this makes the code more readable.
* dcs: decrqss: refactor: append_sgr_attr_n() is now a proper functionDaniel Eklöf2022-01-14-27/+28
|
* Merge branch 'decrqss'Daniel Eklöf2022-01-14-0/+185
|\ | | | | | | Closes #798
| * dcs: decrqss: add note about Ps in the replyDaniel Eklöf2022-01-14-0/+11
| |
| * dcs: decrqss: BUG on invalid cursor styleDaniel Eklöf2022-01-14-0/+1
| |
| * dcs: implement DECRQSSDaniel Eklöf2022-01-14-0/+173
|/ | | | | | | | | | | This patch adds support for DECRQSS (request Selection or Setting), for the following sub-queries: * DECSTBM Set Top and Bottom Margins * SGR Set Graphic Rendition * DECSCUSR Set Cursor Style Closes #798
* Merge branch 'xtgettcap'Daniel Eklöf2022-01-14-26/+525
|\ | | | | | | Closes #846
| * doc: foot.1: XTGETTCAPDaniel Eklöf2022-01-14-0/+47
| |
| * changelog: XTGETTCAPDaniel Eklöf2022-01-14-1/+3
| |
| * readme: document XTGETTCAP behaviorDaniel Eklöf2022-01-14-0/+49
| |
| * xtgettcap: switch from a table based internal structure, to a single char arrayDaniel Eklöf2022-01-13-46/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having the builtin terminfo DB as a table, with one entry per capability/value pair was ineffective memory-wise - we ended up adding ~20K to the final binary size. This patch changes the internal representation from a table, to a single NULL-separated (and NULL-terminated) char array: cap1-name \0 cap1-value \0 cap2-name \0 cap2-value \0 The capabilities are still sorted; to lookup a capability we need to scan from the beginning until we either find a match, or until the capabilities from the DB sort higher (lexicographically) than the searched-for capability. The terminfo char array is 3.3K - more better than before.
| * doc: ctlseq: add XTGETTCAPDaniel Eklöf2022-01-13-0/+3
| |
| * dcs: xtgettcap: handle boolean capabilitiesDaniel Eklöf2022-01-13-4/+13
| | | | | | | | Reply with DCS 1 + r <cap> ST
| * scripts: generate-builtin-terminfo: add custom capability ‘Co’Daniel Eklöf2022-01-13-1/+2
| | | | | | | | | | | | This is a “special feature”, similar to “TN” and “RGB”: Co for termcap colors (or colors for terminfo colors)
| * dcs: implement XTGETTCAPDaniel Eklöf2022-01-13-1/+147
| | | | | | | | | | | | | | | | | | | | | | | | We emit one DCS reply for each queried capability (like Kitty, but unlike XTerm), as this allows us to a) not skip any capabilities in the query, and b) reply with correct success/fail flag for each capability. We do not batch the entire reply - as soon as the reply for _one_ capability is done, we write it to the PTY. Closes #846
| * uri: move hex2nibble() to util.hDaniel Eklöf2022-01-13-23/+24
| |
| * script: add generate-builtin-terminfo.pyDaniel Eklöf2022-01-13-1/+213
|/ | | | | | | This script parses a terminfo source file and generates a C header file with a static struct containing terminfo names and their values. The table is sorted on the capability names
* test: config: tweak.grapheme-shaping can’t be set when grapheme-clustering has been disabledDaniel Eklöf2022-01-13-0/+5
|
* test: config: test ‘tweak’ sectionDaniel Eklöf2022-01-13-1/+70
|
* config: convert tweak.render_timer to an enumDaniel Eklöf2022-01-13-22/+42
|
* Merge branch 'bad-locale'Daniel Eklöf2022-01-13-3/+54
|\
| * main: log locale errors (in addition to adding a user notification)Daniel Eklöf2022-01-13-5/+7
| |
| * main: display warning only, when we succeed in enabling a fallback localeDaniel Eklöf2022-01-13-12/+21
| |
| * changelog: improved handling of incompatible localesDaniel Eklöf2022-01-13-0/+5
| |
| * main: try to force an UTF-8 locale if user’s locale isn’t UTF-8Daniel Eklöf2022-01-13-0/+19
| |
| * main: present invalid locale errors as a user-notificationDaniel Eklöf2022-01-13-3/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Foot does not support running under non-UTF8 locales. If we detect a non-UTF8 locale, we log this and exit with an error. However, it appears a fairly common situation is this: user (knowingly or unknowingly) only configures his/hers locale in e.g. the shell RC files. These aren’t sourced when the compositor is started via a display manager. Thus, compositor key binds will fail to launch, and the user typically has no way of seeing foot’s output. So, the user proceeds to start another terminal, and from that one tries launching foot. And it works... (because the shell in the other terminal sourced the locale configuration). User is left confused and often don’t know how to debug. This patch is somewhat hackish; in addition to logging the locale error, it also pushes a user notification. For this to be visible, we need to actually start a terminal window. So, we ignore the configured shell, and we ignore any custom command line, and instead spawns “/bin/sh -c ‘’”. This allows us to get something running (that hopefully doesn’t produce too much output we can’t decode due to the non-UTF8 locale). But, it will exit immediately. So we also set the --hold flag. This works, and may be a good enough “solution”. However, it only works for standalone foot instances, not footclients.
* Merge branch 'improve-mouse-button-multi-click'Daniel Eklöf2022-01-13-0/+10
|\ | | | | | | Closes #883
| * input: reset mouse button click counter when mouse movesDaniel Eklöf2022-01-13-0/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in #883, creating a block selection (with ctrl+BTN_LEFT), then *quickly* (within 300ms from) creating a new one, will, in fact, _not_ create a new block selection, but a ‘select-word-whitespace’ selection (ctrl+BTN_LEFT-2). A similar effect can be seen with plain selections (BTN_LEFT). Click and drag to make a selection, but *release*, and make a new selection within 300ms from the initial button press, and the new selection is suddenly a word-based selection. This happens because triggering a binding does *not* reset the button click counter. So, shouldn’t we just do that? No, because we rely on this behavior to handle single-, double- and triple-click actions. If we were to reset the button click handler, then we’d have to instead delay triggering the first action with 300ms, which would make things appear laggy. If we don’t do this, it would be impossible to double- and triple-click, since the single-click action would keep resetting the click counter. This patch takes a slightly different approach; we reset the click counter when the mouse has moved “too much”. For now, “too much” is when the cursor has moved to a different cell. This way, single-, double- and triple-clicks continue to work as before. But, creating actual selections, and then quickly releasing and starting a new selection produces the expected results. Closes #883
* input: reset view when pasting from primaryDaniel Eklöf2022-01-11-0/+3
| | | | | We’re already doing this for keyboard input, and regular clipboard pastes.
* Merge branch 'wl-output-version-4'Daniel Eklöf2022-01-06-1/+9
|\ | | | | | | Closes #876
| * wayland: don’t try to bind wl_output version 4 unconditionallyDaniel Eklöf2022-01-06-1/+9
|/ | | | | | | | | | | The compositor may offer version 4, while we’re still linked against an old libwayland that does not implement version 4. While we properly #ifdef the callbacks from version 4, we were still requesting version 4 (if offered by the compositor), even when compiled against a too old libwayland. Closes #876
* Merge branch 'argc-is-zero'Daniel Eklöf2022-01-02-6/+11
|\
| * changelog: fixed failing to launch when exec(3):ed with an empty argvDaniel Eklöf2022-01-01-0/+1
| |
| * foot{,client}: handle argc == 0Daniel Eklöf2022-01-01-6/+10
|/ | | | | | | | | | | | | | Our getopt_long() based argument parser would (correctly) break out of the while loop immediately. However, we would then proceed and decrement ‘argc’ by 1, resulting in it being -1. This was then passed to the terminal constructor, which passed it on to the client application fork+exec logic. That finally resulted in an exec(3) failure: err: slave.c:339: SHELL=/bin/zsh: failed to execute: No such file or directory err: fdm.c:215: no such FD: 7 info: main.c:604: goodbye
* doc: ctlseq: add missing ‘[‘ to a couple of CSI sequencesDaniel Eklöf2022-01-01-5/+5
|
* doc: ctlseq: kitty kbd: swap name/fromDaniel Eklöf2022-01-01-4/+4
|
* doc: ctlseq: kitty keyboard protocolDaniel Eklöf2022-01-01-0/+17
|
* doc: ctlseq: private mode 1016 - SGR-PixelsDaniel Eklöf2022-01-01-0/+3
|
* Merge branch 'sgr-pixels'Daniel Eklöf2022-01-01-8/+44
|\ | | | | | | Closes #762
| * SGR-Pixels mouse mode, closes #762Autumn Lamonte2022-01-01-8/+44
|/
* test: config: colors: test ‘256’ is an invalid keyDaniel Eklöf2021-12-30-0/+2
|
* test: config: test colors sectionDaniel Eklöf2021-12-29-1/+56
|
* test: config: csd: test color optionsDaniel Eklöf2021-12-29-6/+12
|
* test: config: add test_color() utility functionDaniel Eklöf2021-12-29-0/+34
|
* test: config: test csd sectionDaniel Eklöf2021-12-29-0/+37
|
* test: config: test mouse sectionDaniel Eklöf2021-12-29-0/+18
|
* test: config: test cursor sectionDaniel Eklöf2021-12-29-0/+27
|
* test: config: test URL sectionDaniel Eklöf2021-12-29-0/+24
|
* test: config: rename ‘conf_ptr’ -> ‘ptr’Daniel Eklöf2021-12-29-21/+21
|
* test: config: scrollback: test indicator-posititionDaniel Eklöf2021-12-29-1/+9
|
* test: config: main: test dpi-aware, selection-target and initial-window-modeDaniel Eklöf2021-12-29-3/+27
|
* test: config: add test_enum() utility functionDaniel Eklöf2021-12-29-0/+27
|
* render: csd: scale border width when rendering the CSD border’s visible partDaniel Eklöf2021-12-29-2/+5
|
* render: limit the unfocused block cursor’s outline widthDaniel Eklöf2021-12-29-4/+5
| | | | Ensure the outline width doesn’t exceed the cell width/height.
* Merge branch 'scale-outline-of-unfocused-block-cursor'Daniel Eklöf2021-12-29-4/+9
|\
| * render: scale the width out the outline of the unfocused block cursorDaniel Eklöf2021-12-28-4/+9
|/
* Merge branch 'apply-scrollback-multiplier-in-alternate-scroll-mode'Daniel Eklöf2021-12-28-7/+14
|\
| * input: apply scrollback.multplier in alterate scroll modeDaniel Eklöf2021-12-28-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * term_mouse_grabbed(): make ‘seat’ argument constDaniel Eklöf2021-12-28-3/+4
|/
* changelog: irc+ircs added to default value of url.protocolsDaniel Eklöf2021-12-27-0/+2
|
* Merge branch 'irc-url'Daniel Eklöf2021-12-27-1/+3
|\
| * Add irc:// to default URL schemesSimon Ser2021-12-27-1/+3
|/
* term: print: erase existing OSC-8 URIDaniel Eklöf2021-12-26-1/+4
| | | | | | | | | | 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'
* test: config: fix format specifier: uint32_t needs %u, not %huDaniel Eklöf2021-12-26-1/+1
|
* Merge branch 'term-erase-refactor'Daniel Eklöf2021-12-26-49/+52
|\
| * term_erase(): replace coord-typed arguments with regular intsDaniel Eklöf2021-12-26-49/+52
|/
* Merge branch 'cell-colors-use-index'Daniel Eklöf2021-12-26-79/+61
|\
| * sixel: VT state’s bg color may now be an index, rather than an actual color valueDaniel Eklöf2021-12-26-3/+18
| |
| * csi: store color index, not actual color, in cell’s fg/bg attributesDaniel Eklöf2021-12-26-74/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using indexed colors (i.e. SGR 30/40/90/100), store the index into the cell’s fg/bg attributes, not the actual color value. This has a couple of consequences: Color table lookup is now done when rendering. This means a rendered cell will always reflect the *current* color table, not the color table that was in use when the cell was printed to. This simplifies the OSC-4/104 logic, since we no longer need to update the grid - we just have to damage it to trigger rendering. Furthermore, this change simplifies the VT parsing, since we no longer need to do any memory loads (except loading the SGR parameter values), only writes.
| * csi: no need to set VT state’s fg/bg to the default ones on SGR resetDaniel Eklöf2021-12-26-2/+0
|/
* test: config: test ‘scrollback’ sectionDaniel Eklöf2021-12-26-0/+20
|
* test: config: add test_double() utility functionDaniel Eklöf2021-12-26-0/+37
|