| Commit message (Collapse) | Author | Age | Lines | |
|---|---|---|---|---|
| * | spawn: call setsid() in child process | Daniel Eklöf | 2021-02-25 | -9/+13 |
| | | ||||
| * | url-mode: redirect stdin/stdout/stderr to /dev/null when opening an URL | Daniel Eklöf | 2021-02-24 | -1/+14 |
| | | | | | | This fixex an issue where TUI programs started in the parent terminal (when running nested terminals). | |||
| * | spawn: handle custom stdin/stdout/stderr fds being the same | Daniel Eklöf | 2021-02-24 | -3/+10 |
| | | | | | | | | | Allow the caller to pass the same FD (for example, a single /dev/null FD) to spawn(). All we need to do to handle this correctly is ensure we don’t try to close the same FD multiple times. | |||
| * | changelog: change "control- and escape sequences" to "escape sequences" | Craig Barnes | 2021-02-23 | -2/+2 |
| | | | | | | | According to the way ECMA-48 defines these terms, "escape sequences" are a superset of "control sequences", so there's no real reason to mention both. | |||
| * | changelog: fix a typo | Craig Barnes | 2021-02-23 | -1/+1 |
| | | ||||
| * | changelog: add missing space character | Daniel Eklöf | 2021-02-23 | -1/+1 |
| | | ||||
| * | changelog: added man page foot-ctlseq.7 | Daniel Eklöf | 2021-02-23 | -0/+2 |
| | | ||||
| * | Merge remote-tracking branch 'origin/foot-ctlseqs.7' | Daniel Eklöf | 2021-02-23 | -2/+2 |
| |\ | ||||
| | * | doc: ctlseqs: rename "foot-ctlseqs.5" man page to "foot-ctlseqs.7" | Craig Barnes | 2021-02-23 | -2/+2 |
| |/ | | | | | Section 5 is for "file formats and conventions", which doesn't really apply to terminal escape sequences. Section 7 is for "miscellaneous". | |||
| * | Merge branch 'erase-uri-ranges-when-erasing-cells' | Daniel Eklöf | 2021-02-23 | -2/+52 |
| |\ | ||||
| | * | terminal: erase_cell_range: erase URI ranges affected by the erase. | Daniel Eklöf | 2021-02-23 | -2/+52 |
| | | | | | | | | | | | * Partially affected URI ranges are split up * Completely covered URI ranges are removed | |||
| * | | url-mode: disable debug logging | Daniel Eklöf | 2021-02-23 | -1/+1 |
| |/ | ||||
| * | terminal: change type from uint32_t to bool in xtsave bitfield | Daniel Eklöf | 2021-02-23 | -26/+26 |
| | | ||||
| * | Merge branch 'sixel-private-mode-8452' | Daniel Eklöf | 2021-02-23 | -2/+37 |
| |\ | | | | | | | Closes #363 | |||
| | * | sixel: implement private mode 8452 - cursor positioning after sixel | Daniel Eklöf | 2021-02-23 | -2/+37 |
| |/ | | | | | | | | | | When disabled (the default), the cursor is positioned on a new line after emitting a sixel image. When enabled, the cursor is positioned to the right of the sixel image. Closes #363 | |||
| * | Merge branch 'sixel-private-color-registers' | Daniel Eklöf | 2021-02-23 | -7/+41 |
| |\ | | | | | | | Closes #362 | |||
| | * | doc: ctlseq: add private mode 1070 - use private color registers for each sixel | Daniel Eklöf | 2021-02-23 | -0/+3 |
| | | | ||||
| | * | sixel: free private color registers on unhook | Daniel Eklöf | 2021-02-23 | -11/+6 |
| | | | ||||
| | * | sixel: implement private mode 1070 - private color palette | Daniel Eklöf | 2021-02-23 | -7/+43 |
| |/ | | | | | | | | | When enabled (the default), sixels use private color registers. That is, the color palette from the last sixel is *not* re-used. When disabled, sixels share (i.e. re-use) the same color palette. Closes #362 | |||
| * | Merge branch 'document-control-sequences' | Daniel Eklöf | 2021-02-23 | -1/+630 |
| |\ | | | | | | | Closes #235 | |||
| | * | doc: ctlseq: replace ‘ST’ with the actual characters, ‘\E\’ | Daniel Eklöf | 2021-02-23 | -19/+19 |
| | | | ||||
| | * | doc: ctlseq: re-phrase when DCS is used instead of \EP | Daniel Eklöf | 2021-02-23 | -2/+2 |
| | | | ||||
| | * | doc: ctlseq: add OSC-8 | Daniel Eklöf | 2021-02-23 | -0/+5 |
| | | | ||||
| | * | doc: ctlseq: add missing ‘[’ in example escape sequence | Daniel Eklöf | 2021-02-23 | -1/+1 |
| | | | ||||
| | * | doc: ctlseq: remove excessive highlighting | Daniel Eklöf | 2021-02-23 | -2/+2 |
| | | | ||||
| | * | doc: ctlseq: turn “CC1 - 8-bit control sequences” into a footnote | Daniel Eklöf | 2021-02-23 | -7/+5 |
| | | | | | | | | | | | | | | | | | * 8-bit control characters are virtually never used. Many terminals do not support them. As such, there is no need to draw attention to the fact that foot does not implement them. * Rename the “CC0 - 7-bit control characters” section to “Control characters”. | |||
| | * | doc: ctlseq: “7-bit control sequences” -> “7-bit control *characters*” | Daniel Eklöf | 2021-02-23 | -2/+2 |
| | | | ||||
| | * | doc: ctlseq: add CSI sub headers to index | Daniel Eklöf | 2021-02-23 | -0/+5 |
| | | | ||||
| | * | doc: ctlseq: add XTSMGRAPHICS | Daniel Eklöf | 2021-02-23 | -5/+4 |
| | | | ||||
| | * | doc: ctlseq: document window manipulation sequences (CSI Ps;Ps;Ps t) | Daniel Eklöf | 2021-02-23 | -1/+54 |
| | | | ||||
| | * | doc: ctlseq: don’t highlight literal characters, only parameters | Daniel Eklöf | 2021-02-23 | -13/+13 |
| | | | ||||
| | * | doc: ctlseq: sort “misc” CSI sequences | Daniel Eklöf | 2021-02-23 | -77/+78 |
| | | | ||||
| | * | doc: ctlseq: add most of the remaining CSIs | Daniel Eklöf | 2021-02-23 | -2/+165 |
| | | | ||||
| | * | doc: ctlseq: add ESC prefixed sequences | Daniel Eklöf | 2021-02-23 | -0/+75 |
| | | | ||||
| | * | doc: ctlseq: add ‘origin’ column to OSC escape table | Daniel Eklöf | 2021-02-23 | -1/+17 |
| | | | ||||
| | * | doc: ctlseqs: always write out the actual sequence | Daniel Eklöf | 2021-02-23 | -32/+33 |
| | | | | | | | | | That is, don’t abbreviate ‘\E[‘ with ‘CSI’, or ‘\E]’ with ‘OSC’. | |||
| | * | doc: ctlseqs: document private modes 47, 1047 and 1048 | Craig Barnes | 2021-02-23 | -1/+10 |
| | | | ||||
| | * | doc: ctlseqs: document DECSET/DECRST and supported "private modes" | Craig Barnes | 2021-02-23 | -2/+93 |
| | | | ||||
| | * | doc: ctlseqs: document OSC sequences | Daniel Eklöf | 2021-02-23 | -1/+46 |
| | | | ||||
| | * | doc: ctlseqs: document supported DCS escapes | Daniel Eklöf | 2021-02-23 | -1/+10 |
| | | | | | | | | | Signed-off-by: Daniel Eklöf <daniel@ekloef.se> | |||
| | * | doc: ctlseqs: minor readability tweaks | Daniel Eklöf | 2021-02-23 | -3/+3 |
| | | | ||||
| | * | doc: ctlseqs: copyable -> copiable | Daniel Eklöf | 2021-02-23 | -1/+1 |
| | | | ||||
| | * | doc: ctlseqs: we’ll be using ‘OCS’ instead of \E] and ‘DCS’ instead of \EP | Daniel Eklöf | 2021-02-23 | -3/+3 |
| | | | ||||
| | * | doc: ctlseqs: we use ‘CSI’ not so much in the tables as in text | Daniel Eklöf | 2021-02-23 | -4/+3 |
| | | | ||||
| | * | doc: ctlseqs: left most -> leftmost | Daniel Eklöf | 2021-02-23 | -1/+1 |
| | | | ||||
| | * | doc: ctlseqs: fix weird sounding sentence | Daniel Eklöf | 2021-02-23 | -1/+1 |
| | | | ||||
| | * | doc: ctlseqs: be consistent; use dash between ‘8’ and ‘bit’ | Daniel Eklöf | 2021-02-23 | -1/+1 |
| | | | ||||
| | * | doc: ctlseqs: escape backslashes | Daniel Eklöf | 2021-02-23 | -4/+4 |
| | | | ||||
| | * | doc: ctlseqs: document SGRs, add TODOs | Daniel Eklöf | 2021-02-23 | -9/+123 |
| | | | ||||
| | * | doc: ctlseqs: document CC0 control sequences | Daniel Eklöf | 2021-02-23 | -1/+47 |
| |/ | ||||
| * | Merge branch 'dracula-theme' | Daniel Eklöf | 2021-02-23 | -0/+25 |
| |\ | ||||
| | * | themes: add Dracula | Elias | 2021-02-22 | -0/+25 |
| |/ | ||||
| * | Merge branch 'rename-_errno' | Daniel Eklöf | 2021-02-22 | -28/+29 |
| |\ | ||||
| | * | errno: don’t use ‘_errno’ as a variable name; _ are reserved for use as identifiers | Daniel Eklöf | 2021-02-21 | -28/+29 |
| | | | ||||
| * | | Merge branch 'osc8' | Daniel Eklöf | 2021-02-21 | -94/+654 |
| |\ \ | |/ |/| | | | Closes #13 | |||
| | * | changelog: OSC-8 support | Daniel Eklöf | 2021-02-21 | -2/+2 |
| | | | ||||
| | * | url-mode: use the same key combo for all occurrences of an URL | Daniel Eklöf | 2021-02-21 | -5/+25 |
| | | | ||||
| | * | config: typo: osc8-underline=always means ALWAYS | Daniel Eklöf | 2021-02-21 | -1/+1 |
| | | | ||||
| | * | config: osc8-underline: default to ‘url-mode’ | Daniel Eklöf | 2021-02-21 | -1/+1 |
| | | | ||||
| | * | urls: OSC-8 URLs can now optionally be underlined outside of url-mode | Daniel Eklöf | 2021-02-21 | -3/+65 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new configuration option, ‘osc8-underline=url-mode|always’. When set to ‘url-mode’, OSC-8 URLs are only highlighted (i.e. underlined) in url-mode, just like auto-detected URLs. When set to ‘always’, they are always underlined, regardless of mode, and regardless of their other attributes. This is implemented by tagging collected URLs with a boolean, instructing urls_render() and urls_reset() whether they should update the cells’ ‘url’ attribute or not. The OSC-8 collecter sets this based on the value of ‘osc8-underline’. Finally, when closing an OSC-8 URL, the cells are immediately tagged with the ‘url’ attribute if ‘osc8-underline’ is set to ‘always’. | |||
| | * | grid: refactor: break out allocation of ‘extra’ member to separate function | Daniel Eklöf | 2021-02-21 | -2/+7 |
| | | | ||||
| | * | terminal: osc8_close(): refactor: use grid_row_add_uri_range() | Daniel Eklöf | 2021-02-21 | -5/+1 |
| | | | ||||
| | * | grid: refactor: use grid_row_add_uri_range() | Daniel Eklöf | 2021-02-21 | -12/+3 |
| | | | ||||
| | * | grid: add new function grid_row_add_uri_range() | Daniel Eklöf | 2021-02-21 | -0/+11 |
| | | | ||||
| | * | grid: resize_without_reflow: allocate ‘extra’ on-demand on ‘new’ rows | Daniel Eklöf | 2021-02-21 | -1/+2 |
| | | | | | | | | | | | Even if we have URI ranges on the old row, all those ranges may lay outside the new grid’s range. | |||
| | * | grid: grid_resize_without_reflow: transfer URI ranges | Daniel Eklöf | 2021-02-21 | -1/+21 |
| | | | ||||
| | * | grid: reflow: translate URI ranges | Daniel Eklöf | 2021-02-21 | -22/+137 |
| | | | | | | | | | | | | | | | | | | | | | URI ranges are per row. Translate by detecting URI range start/end coordinates, and opening and closing a corresponding URI range on the new grid. We need to take care when line-wrapping the new grid; here we need to manually close the still-open URI ranges (on the new grid), and re-opening them on the next row. | |||
| | * | grid: grid_row_free(): use grid_row_reset_extra() | Daniel Eklöf | 2021-02-21 | -7/+1 |
| | | | ||||
| | * | terminal: scroll: use grid_row_reset_extra() | Daniel Eklöf | 2021-02-21 | -16/+2 |
| | | | ||||
| | * | grid: add new function, grid_row_reset_extra() | Daniel Eklöf | 2021-02-21 | -0/+15 |
| | | | | | | | | | This function resets (free:s) all ‘extra’ data associated with a row. | |||
| | * | term: osc-8: close: ignore zero-length URLs | Daniel Eklöf | 2021-02-21 | -0/+5 |
| | | | | | | | | | | | | | | | | | | | | | If the client application emitted e.g: \E]8;;http://foo\E\\\E]8;;\E\\ i.e. an anchor without content, then we ended up with an ‘end’ coordinate that lied *before* the ‘start’ coordinate, since we subtract one (column) from the end point to make it inclusive. | |||
| | * | term: osc-8: open: typo: close previous URL if ‘begin’ coords are *non-negative* | Daniel Eklöf | 2021-02-21 | -1/+1 |
| | | | ||||
| | * | config: change default key binding for toggle-url-visible to ‘t’ | Daniel Eklöf | 2021-02-21 | -3/+3 |
| | | | ||||
| | * | urls: add key binding that toggles whether URLs are displayed on jump-label | Daniel Eklöf | 2021-02-21 | -2/+44 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, the URL isn’t shown on the jump-label. For auto-detect URLs, doing so is virtually always useless, as the URL is already visible in the grid. For OSC-8 URLs however, the URL is often _not_ visible in the grid. Many times, seeing the URL is still not needed (if you’re doing ‘ls --hyperlink’, you already know what the URIs are). But it is still useful to have a way to show the URLs. This patch adds a new key binding action that can be used in url-mode to toggle the URL on and off in the jump label. It is bound to ctrl+t by default. | |||
| | * | urls: remove free-form ‘text’ member from URL struct | Daniel Eklöf | 2021-02-21 | -21/+5 |
| | | | ||||
| | * | url-mode: remove duplicate URLs | Daniel Eklöf | 2021-02-21 | -1/+24 |
| | | | | | | | | | | | | | | | | | Remove URLs with the same start and end coordinates. Such duplicate URLs can be created by emitting an OSC-8 URL with matching grid content: \E]8;;http://foo\E\\http://foo\E]8;;\E\\ | |||
| | * | osc-8: fix thinko: can’t use the ID parameters *address* as actual ID | Daniel Eklöf | 2021-02-21 | -4/+4 |
| | | | | | | | | | | | | | | | Doing so means the next OSC-8 URL emitted by the client application, with the same ID, will get a *new* id internally. Instead, hash the string and use that as ID. | |||
| | * | util: add a sdbm hash implementation | Daniel Eklöf | 2021-02-21 | -0/+14 |
| | | | ||||
| | * | term_osc8_close(): the URL *end* column is inclusive | Daniel Eklöf | 2021-02-21 | -0/+6 |
| | | | ||||
| | * | url-mode: activate_url(): ensure ‘scheme’, ‘host’ and ‘path’ are free:d | Daniel Eklöf | 2021-02-21 | -11/+15 |
| | | | | | | | | | | | | | uri_parse() may succeed. But if the scheme isn’t “file”, or if the hostname isn’t localhost, then we failed to free ‘scheme’, ‘host’ and ‘path’. | |||
| | * | url-mode: multiple URL (parts) with the same ID is assigned a single key sequence | Daniel Eklöf | 2021-02-21 | -3/+37 |
| | | | | | | | | | | | | | | | | | | | | | In case an URL is split up into multiple parts, those parts are now treated as a single URL when it comes to key assignment. Only the *first* URL part is actually assigned a key combo. The other parts are ignored. We still highlight them, but for all other purposes they are ignored. | |||
| | * | term: add an ‘id’ member to the the ‘row_uri_range’ struct | Daniel Eklöf | 2021-02-21 | -0/+2 |
| | | | | | | | | | | | term_osc8_close() sets it from the OSC-8 ID tracked in the VT sub-struct. | |||
| | * | term: add ‘id’ parameter to term_osc8_open() | Daniel Eklöf | 2021-02-21 | -4/+7 |
| | | | | | | | | | | | The current OSC-8 URL’s ID is now tracked along with the URI itself, and its starting point. | |||
| | * | osc: 8: parse params, and the ‘id’ parameter specifically | Daniel Eklöf | 2021-02-21 | -1/+22 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications can assign an ID to the URL. This is used to associate the parts of a split up URL with each other: ╔═ file1 ════╗ ║ ╔═ file2 ═══╗ ║http://exa║Lorem ipsum║ ║le.com ║ dolor sit ║ ║ ║amet, conse║ ╚══════════║ctetur adip║ ╚═══════════╝ In the example above, ‘http://exa’ and ‘le.com’ are part of the same URL, but by necessity split up into two OSC-8 URLs. If the application sets the same ID for those two OSC-8 URLs, the terminal can ensure they are handled as one. | |||
| | * | main: initialize pseudo-random generator | Daniel Eklöf | 2021-02-21 | -0/+2 |
| | | | ||||
| | * | url-mode: initial support for OSC-8 URLs | Daniel Eklöf | 2021-02-21 | -0/+31 |
| | | | | | | | | | | | | | | | Things left to do: since OSC-8 URLs are stored as ranges in the per-row ‘extra’ data member, we currently do not handle line-wrapping URLs very well; they will be considered two separate URLs, and assigned two different key sequences. | |||
| | * | osc: parse OSC-8, by calling term_osc8_{open,close} as appropriate | Daniel Eklöf | 2021-02-21 | -0/+43 |
| | | | ||||
| | * | terminal: add term_osc8_{open,close} functions | Daniel Eklöf | 2021-02-21 | -0/+57 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions update the OSC-8 URI state in the terminal. term_osc8_open() tracks the beginning of an URL, by storing the start coordinate (i.e. the current cursor location), along with the URL itself. Note that term_osc8_open() may not be called with an empty URL. This is important to notice, since the way OSC-8 works, applications close an URL by “opening” a new, empty one: \E]8;;https://foo.bar\e\\this is an OSC-8 URL\E]8;;\e\\ It is up to the caller to check for this, and call term_osc8_close() instead of term_osc8_open() when the URL is empty. However, it is *also* valid to switch directly from one URL to another: \E]8;;http://123\e\\First URL\E]8;;http//456\e\\Second URL\E]8;;\e\\ This use-case *is* handled by term_osc8_open(). term_osc8_close() uses the information from term_osc8_open() to add per-row URL data (using the new ‘extra’ row data). | |||
| | * | terminal: add OSC-8 state tracking to the VT sub-struct | Daniel Eklöf | 2021-02-21 | -2/+18 |
| | | | ||||
| | * | grid: enable rows to have ‘extra’ data associated with them | Daniel Eklöf | 2021-02-21 | -4/+44 |
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds an ‘extra’ member to the row struct. It is a pointer to a struct containing extra data to be associated with this row. Initially, this struct contains a list of URL ranges. These define (OSC-8) URLs on this row. The ‘extra’ data is allocated on-demand. I.e. the pointer is NULL by default; it is *not* allocated by grid_row_alloc(). | |||
| | * | url-mode: store URL in UTF-8, not UTF-32 | Daniel Eklöf | 2021-02-21 | -42/+59 |
| |/ | | | | | | | | | | | | | The only time the URL is actually in UTF-32 is when we’re collecting it (auto-detecting it) from the grid, since cells store their character(s) in UTF-32. Everything *after* that prefers the URL in UTF-8. So, do the conversion while collecting the URL. This patch also changes the URL activation code to strip the ‘file://user@host/’ prefix from file URIs that refer to files on the *local* computer. | |||
| * | Merge branch 'restore-signals-when-spawning-subprocess' | Daniel Eklöf | 2021-02-21 | -8/+15 |
| |\ | | | | | | | Closes #366 | |||
| | * | spawn/slave: restore signal mask after fork | Daniel Eklöf | 2021-02-21 | -8/+15 |
| |/ | | | | | | | | | | | | slave: no need to restore signal handlers; they are automatically restored as long as they are not SIG_IGN (which they never are in foot). spawn(): restore signal mask after fork. This fixes an issue where a terminal spawned with ctrl+shift+n did not terminate when its shell exited. Closes #366 | |||
| * | Merge branch 'refactor-subsurface-creation' | Daniel Eklöf | 2021-02-17 | -190/+144 |
| |\ | ||||
| | * | wayland: csd_instantiate(): remove TODO | Daniel Eklöf | 2021-02-17 | -21/+0 |
| | | | | | | | | | The sub-surfaces are working just fine without the initial commit. | |||
| | * | wayland: drop ‘_surface’ suffix from subsurface struct instances | Daniel Eklöf | 2021-02-17 | -43/+42 |
| | | | ||||
| | * | render-timer: use wayl_win_subsurface_new/destroy() | Daniel Eklöf | 2021-02-17 | -20/+10 |
| | | | ||||
| | * | scrollback-indicator: use wayl_win_subsurface_new/destroy() | Daniel Eklöf | 2021-02-17 | -46/+15 |
| | | | ||||
| | * | search: use wayl_win_subsurface_new/destroy() | Daniel Eklöf | 2021-02-17 | -34/+20 |
| | | | ||||
| | * | csd: use wayl_win_subsurface_new/destroy() | Daniel Eklöf | 2021-02-17 | -29/+39 |
| | | | ||||
