aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* 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
|
* test: config: add test_uint32() utility functionDaniel Eklöf2021-12-26-0/+37
|
* config: update most parse_section_*() functions to return in each if-branchDaniel Eklöf2021-12-25-28/+20
|
* config: scrollback: add missing return for ‘lines’Daniel Eklöf2021-12-25-1/+1
| | | | The missing return meant failures were not reported correctly.
* test: config: bindings: verify pipe argvDaniel Eklöf2021-12-25-3/+39
|
* test: config: test [bell].command (spawn template)Daniel Eklöf2021-12-25-2/+2
|
* test: config: test [main].notify (spawn template)Daniel Eklöf2021-12-25-1/+2
|
* test: config: add test_spawn_template() utility functionDaniel Eklöf2021-12-25-0/+42
|
* tokenize: free content of argv on failure, and reset the argv pointerDaniel Eklöf2021-12-25-3/+4
| | | | | This fixes a memory leak when we failed to parse a command line (for example, because it contained an unclosed quote).
* test: config: ‘bell’ sectionDaniel Eklöf2021-12-25-0/+19
|
* changelog: grammarDaniel Eklöf2021-12-23-2/+2
|
* Merge branch 'crash-on-csd-size-1'Daniel Eklöf2021-12-23-6/+20
|\ | | | | | | Closes #857
| * render: make sure ‘maximized’ button doesn’t use negative coordinatesDaniel Eklöf2021-12-22-1/+7
| |
| * config: csd.border_width now always reflects the full/total widthDaniel Eklöf2021-12-22-5/+13
|/
* meson: generate-version: use CURRENT_SOURCE_DIR instead of SOURCE_ROOTDaniel Eklöf2021-12-21-1/+1
|
* slave: re-use ‘struct sigaction’ variable when resetting SIGHUP+SIGPIPEDaniel Eklöf2021-12-18-2/+4
|
* slave: restore SIGPIPEDaniel Eklöf2021-12-18-1/+2
|
* Merge branch 'error-on-empty-key-or-mouse-binding'Daniel Eklöf2021-12-18-4/+18
|\ | | | | | | Closes #851
| * test: config: verify setting an empty key/mouse binding failsDaniel Eklöf2021-12-18-4/+10
| |
| * config: error out on empty key- or mouse bindingDaniel Eklöf2021-12-18-0/+8
|/ | | | Closes #851
* Merge branch 'shm-buffer-busy-sometimes-not-set'Daniel Eklöf2021-12-18-10/+21
|\ | | | | | | Closes #844
| * shm: get_buffer(): make sure buffer->busy is setDaniel Eklöf2021-12-18-10/+21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge branch 'lower-case-all-theme-names'Daniel Eklöf2021-12-18-0/+6
|\
| * themes: consistently use snake-case in theme namesDaniel Eklöf2021-12-18-0/+6
|/
* Merge branch 'apprentice-theme'Daniel Eklöf2021-12-18-0/+26
|\
| * Add Apprentice themeOğuz Ersen2021-12-17-0/+26
|/
* Merge branch 'kitty-kbd-dont-fallback-to-xkb-symbol'Daniel Eklöf2021-12-16-4/+6
|\
| * input: kitty: don’t fallback to the XKB symbolDaniel Eklöf2021-12-16-4/+6
|/ | | | | | | | | | | 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.
* Merge branch 'zooming-with-dpi-aware-no'Daniel Eklöf2021-12-14-8/+14
|\ | | | | | | Closes #842
| * term: font_size_adjust: use DPI=96 when font is *not* scaled by DPIDaniel Eklöf2021-12-14-8/+14
|/ | | | Closes #842
* Merge branch 'wl-output-name-description'Daniel Eklöf2021-12-14-6/+39
|\
| * wayland: add wl_output.name() and wl_output.description()Daniel Eklöf2021-12-13-1/+28
| | | | | | | | | | | | | | | | These are new in version 4 of the wl_output interface (first included in wayland-1.20). This allows us to get the name and description of the outputs, also on compositors without the XDG output interface.
| * wayland: estimate scaled (logical) width/height, if not providedDaniel Eklöf2021-12-13-5/+11
|/ | | | | | | | | | | This makes us slightly more resilient against a missing XDG output interface. We use the “real” (the physical) dimensions, combined with the scaling factor, to estimate the logical dimensions. This works out correctly with non-fractional scaling, but not otherwise.
* input: kitty: return the result of term_to_slave()Daniel Eklöf2021-12-12-2/+1
| | | | If term_to_slave() fails, then the key wasn’t ‘handled’...
* Merge branch 'kitty-static-keymap'Daniel Eklöf2021-12-11-142/+172
|\
| * kitty: replace switch with a static keysym tableDaniel Eklöf2021-12-11-142/+172
|/
* Merge branch 'config-refactor-and-verify-binding-collisions-after-load'Daniel Eklöf2021-12-11-880/+730
|\
| * config: NOINLINE modifiers_to_str()Daniel Eklöf2021-12-11-1/+1
| |
| * test: config: verify collisions with the mouse override modifiers are detectedDaniel Eklöf2021-12-11-1/+11
| |
| * test: config: port key/mouse binding tests to new APIDaniel Eklöf2021-12-11-217/+207
| |
| * config: resolve collisions: argv_compare() returns -1,0,+1, not a boolDaniel Eklöf2021-12-11-1/+4
| |
| * config: resolve collisions: return ‘false’ on failureDaniel Eklöf2021-12-11-0/+2
| |
| * config: use “(default)” as path in log message, if path is NULLDaniel Eklöf2021-12-11-1/+2
| |
| * config: remove commented out struct definitionDaniel Eklöf2021-12-11-15/+0
| |
| * config: remove unneeded function prototypeDaniel Eklöf2021-12-11-4/+0
| |
| * config: unify key- and mouse bindingsDaniel Eklöf2021-12-11-411/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, key- and mouse-bindings structs (the non-layout specific ones) are unified into a single struct. The logic that parses, and manages, the key- and mouse binding lists are almost identical. The *only* difference between a key- and a mouse binding is that key bindings have an XKB symbol, and mouse bindings a button and click-count. The new, unified, struct uses a union around these, and all functions that need to know which members to use/operate on now takes a ‘type’ parameter.
| * config: do mouse binding collision detection after loading the confDaniel Eklöf2021-12-11-208/+220
| |
| * config: value_to_key_combos(): reset modifiers in bindingDaniel Eklöf2021-12-11-0/+1
| |
| * main: ignore SIGPIPEDaniel Eklöf2021-12-11-2/+5
| | | | | | | | | | | | | | | | | | | | | | We want to handle SIGPIPEs without crashing... One way to trigger this was to use e.g. pipe-visible=[cat /foo/bar] Control+Shift+q That is, pipe output to something that did not consume it. This led to a SIGPIPE when we tried to write the terminal contents to the pipe, and crashed the whole foot instance.
| * config: do key binding collision detection after loading the confDaniel Eklöf2021-12-11-199/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the user to write, to swap two key bindings: [key-bindings] show-urls-launch=Control+Shift+r search-start=Control+Shift+u instead of: [key-bindings] search-start=none show-urls-launch=Control+Shift+r search-start=Control+Shift+u This should simplify the configuration for people who replace a lot of the default key bindings. This also simplifies the parsing somewhat, since we no longer has to parse a key-binding into a temporary list, ensure it doesn’t have any collisions, and then copy it into the actual key binding list. _While_ parsing a key-binding, we still need a temporary array (at least for the time being), but that temporary array is no longer visible outside the parsing function that allocates it.
| * config: remove struct key_combo, use config_key_binding insteadDaniel Eklöf2021-12-11-179/+146
|/
* test: meson: add fontconfig to ‘test-config’ binary (fixes PGO builds)Daniel Eklöf2021-12-11-1/+1
|
* Merge branch 'config-unittest'Daniel Eklöf2021-12-11-0/+679
|\ | | | | | | Part of #813
| * test: config: mouse-bindingsDaniel Eklöf2021-12-11-4/+171
| |
| * test: config: key-bindingsDaniel Eklöf2021-12-11-0/+218
| | | | | | | | | | | | | | This adds tests for all [key-bindings] options, as well as an invalid “action”. The tests also verify key combo collisions are detected correctly.
| * tests: meson: link with tllistDaniel Eklöf2021-12-11-1/+1
| |
| * ci (gitlab+builds.sr.ht): execute foot{,client} --versionDaniel Eklöf2021-12-11-0/+13
| | | | | | | | | | This runs our builtin unit tests (debug builds only), and verifies it runs, at all. (and also logs the version in the build logs...)
| * test: config: cover all basic (primitive) options in [main]Daniel Eklöf2021-12-11-14/+193
| |
| * test: initial external unit test suite for ‘config.c’Daniel Eklöf2021-12-11-0/+102
|/ | | | | | | | | | | | This patch adds a separate (external) test binary with unit tests for config.c This is achieved by having the test’s source file include config.c (yes, the C file, not the header file). This allows us to call e.g. parse_section_*() directly, without having to go through config_load() (which requires having a readable file at “path”).
* 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-8/+16
|\|
| * meson: bump version to 1.10.31.10.3Daniel Eklöf2021-12-08-1/+1
| |
| * changelog: prepare for 1.10.3Daniel Eklöf2021-12-08-9/+3
| |
| * kitty: simplify: always calculate alternate/base keysDaniel Eklöf2021-12-08-14/+9
| | | | | | | | But only _emit_ them if report alternate has been enabled.
| * kitty: when emitting associated text, don’t report mods/events unless necessaryDaniel Eklöf2021-12-08-6/+8
| |
| * kitty: report-alternate: apply base-layout key to composed charactersDaniel Eklöf2021-12-08-13/+15
| |
| * kitty: implement “base layout key” in “report alternate key”Daniel Eklöf2021-12-08-5/+31
| |
| * kitty: initial support for “report alternate key”Daniel Eklöf2021-12-08-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: only emit plain text on key press- and repeat eventsDaniel Eklöf2021-12-08-1/+1
| | | | | | | | That is, release events always generate CSIs
| * kitty: add ISO_Level{3,5}_Shift keysDaniel Eklöf2021-12-08-0/+4
| |
| * kitty: composed characters with “report associated text”Daniel Eklöf2021-12-08-18/+20
| | | | | | | | | | | | | | | | | | | | The generic input handler now converts the composed character to it’s UTF-32 equivalent. This means we now provide a valid UTF-32 codepoint for both composed characters, and non-composed (plain-text) characters. Use this in the kitty protocol to simplify the logic around composed characters, by simply treating them as plain text.
| * kitty: implement “report associated text”Daniel Eklöf2021-12-08-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+41
| | | | | | | | | | | | | | 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-26/+60
| |
| * term: ensure cell dimensions are non-zeroDaniel Eklöf2021-12-08-0/+10
| | | | | | | | Closes #830
| * changelog: move entry to ‘unreleased’Daniel Eklöf2021-12-08-1/+6
| |
| * input: kitty: merge handling of plain-text and composed charactersDaniel Eklöf2021-12-08-88/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All plain-text and composed characters are now printed as-is, in a single place. Also fix handling of “generic” keys when emitted as escapes; don’t use the raw XKB symbol as key in the escape, convert it to a unicode code point first. For many symbols, these are the same. But not all. For now, we fallback to using the symbol as is if XKB fails to convert it to a codepoint. Not sure if we should simply drop the key press instead. Composed characters also need special treatment; we can’t use the symbol as is, since it typically refers to the last key pressed (i.e. not the composed character). And, that key is also (usually) a special “dead” key, which cannot be converted to a unicode codepoint. So, what we do is convert the generated utf8 string, and (try to) convert it to a wchar. If it succeeds, use that. If not, fallback to using the XKB symbol (as above).
| * input: reset compose state on key *releases*, not pressesDaniel Eklöf2021-12-08-1/+1
| |
| * input: kitty: treat repeating == pressed when report-events is offDaniel Eklöf2021-12-08-1/+1
| |
| * changelog: kitty: report eventsDaniel Eklöf2021-12-08-1/+2
| |
| * input: kitty: add support for the “report event” mode (0b10)Daniel Eklöf2021-12-08-14/+39
| |
| * input: don’t ignore key release eventsDaniel Eklöf2021-12-08-43/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this, key release events stopped the repeat timer, and then returned. Now, we run through the entire function. Most things are still only done on key press events. But, the goal here is to get to the keyboard protocol functions (and the kitty protocol in particular), and call them on release events too. This is in preparation for the kitty protocol mode 0b10, report event types.
| * install: add UTF-8 locate to runtime depsDaniel Eklöf2021-12-08-0/+1
| |
| * install: update instructions on how to manually compile the terminfoDaniel Eklöf2021-12-08-9/+4
| |
| * changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-12-08-0/+11
| |
* | Merge branch 'kitty-report-alternate-key-part-1'Daniel Eklöf2021-12-08-7/+44
|\ \ | | | | | | | | | Closes #319