aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
| * url-mode: use the same key combo for all occurrences of an URLDaniel Eklöf2021-02-21-5/+25
| |
| * config: typo: osc8-underline=always means ALWAYSDaniel Eklöf2021-02-21-1/+1
| |
| * config: osc8-underline: default to ‘url-mode’Daniel Eklöf2021-02-21-1/+1
| |
| * urls: OSC-8 URLs can now optionally be underlined outside of url-modeDaniel Eklöf2021-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 functionDaniel Eklöf2021-02-21-2/+7
| |
| * terminal: osc8_close(): refactor: use grid_row_add_uri_range()Daniel Eklöf2021-02-21-5/+1
| |
| * grid: refactor: use grid_row_add_uri_range()Daniel Eklöf2021-02-21-12/+3
| |
| * grid: add new function grid_row_add_uri_range()Daniel Eklöf2021-02-21-0/+11
| |
| * grid: resize_without_reflow: allocate ‘extra’ on-demand on ‘new’ rowsDaniel Eklöf2021-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 rangesDaniel Eklöf2021-02-21-1/+21
| |
| * grid: reflow: translate URI rangesDaniel Eklöf2021-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öf2021-02-21-7/+1
| |
| * terminal: scroll: use grid_row_reset_extra()Daniel Eklöf2021-02-21-16/+2
| |
| * grid: add new function, grid_row_reset_extra()Daniel Eklöf2021-02-21-0/+15
| | | | | | | | This function resets (free:s) all ‘extra’ data associated with a row.
| * term: osc-8: close: ignore zero-length URLsDaniel Eklöf2021-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öf2021-02-21-1/+1
| |
| * config: change default key binding for toggle-url-visible to ‘t’Daniel Eklöf2021-02-21-3/+3
| |
| * urls: add key binding that toggles whether URLs are displayed on jump-labelDaniel Eklöf2021-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 structDaniel Eklöf2021-02-21-21/+5
| |
| * url-mode: remove duplicate URLsDaniel Eklöf2021-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 IDDaniel Eklöf2021-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 implementationDaniel Eklöf2021-02-21-0/+14
| |
| * term_osc8_close(): the URL *end* column is inclusiveDaniel Eklöf2021-02-21-0/+6
| |
| * url-mode: activate_url(): ensure ‘scheme’, ‘host’ and ‘path’ are free:dDaniel Eklöf2021-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 sequenceDaniel Eklöf2021-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’ structDaniel Eklöf2021-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öf2021-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 specificallyDaniel Eklöf2021-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 generatorDaniel Eklöf2021-02-21-0/+2
| |
| * url-mode: initial support for OSC-8 URLsDaniel Eklöf2021-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 appropriateDaniel Eklöf2021-02-21-0/+43
| |
| * terminal: add term_osc8_{open,close} functionsDaniel Eklöf2021-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-structDaniel Eklöf2021-02-21-2/+18
| |
| * grid: enable rows to have ‘extra’ data associated with themDaniel Eklöf2021-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-32Daniel Eklöf2021-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öf2021-02-21-8/+15
|\ | | | | | | Closes #366
| * spawn/slave: restore signal mask after forkDaniel Eklöf2021-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öf2021-02-17-190/+144
|\
| * wayland: csd_instantiate(): remove TODODaniel Eklöf2021-02-17-21/+0
| | | | | | | | The sub-surfaces are working just fine without the initial commit.
| * wayland: drop ‘_surface’ suffix from subsurface struct instancesDaniel Eklöf2021-02-17-43/+42
| |
| * render-timer: use wayl_win_subsurface_new/destroy()Daniel Eklöf2021-02-17-20/+10
| |
| * scrollback-indicator: use wayl_win_subsurface_new/destroy()Daniel Eklöf2021-02-17-46/+15
| |
| * search: use wayl_win_subsurface_new/destroy()Daniel Eklöf2021-02-17-34/+20
| |
| * csd: use wayl_win_subsurface_new/destroy()Daniel Eklöf2021-02-17-29/+39
| |
| * url-mode: convert struct wl_url to use wayl_win_subsurface_new()Daniel Eklöf2021-02-17-46/+8
| |
| * wayland: add wayl_win_subsurface_new() and wayl_win_subsurface_destroy()Daniel Eklöf2021-02-17-1/+60
|/ | | | | These are utility functions to create a Wayland subsurface associated with the window.
* csi: ‘CSI 13 ; 2 t’ reply is now (0,0)Daniel Eklöf2021-02-16-3/+4
| | | | | | | | Foot previously responded with window local coordinates. But, XTerm responds with screen *absolute* coordinates. This isn’t possible under Wayland, thus we now report (0,0) instead. Same as we do for ‘CSI 13 ; 0 t’.
* install: add libnotify and xdg-utils as optional dependenciesDaniel Eklöf2021-02-14-0/+6
|
* Merge branch 'notifications-are-inhibited-while-window-has-keyboard-focus'Daniel Eklöf2021-02-14-3/+7
|\ | | | | | | Closes #328
| * doc: foot.ini: notifications are inhibited while we’re focusedDaniel Eklöf2021-02-14-3/+7
|/ | | | Closes #328
* Merge branch 'working-dir-command-line-option'Daniel Eklöf2021-02-14-16/+108
|\ | | | | | | Closes #347
| * client: -D,--working-directory: check path exists and is a directoryDaniel Eklöf2021-02-13-1/+8
| |
| * main: -D,--working-directory: check path exists and is a directoryDaniel Eklöf2021-02-13-1/+7
| |
| * changelog: -D,--working-directory=DIRDaniel Eklöf2021-02-12-0/+2
| |
| * completions: fish: add -D,--working-directoryDaniel Eklöf2021-02-12-0/+2
| |
| * completions: zsh: add -D,--working-directoryDaniel Eklöf2021-02-12-0/+2
| |
| * doc: footclient.1: add -D,--working-directory=DIRDaniel Eklöf2021-02-12-0/+4
| |
| * doc: foot.1: add -D,--working-directory=DIRDaniel Eklöf2021-02-12-0/+4
| |
| * doc: foot.1: add missing short option to --login-shellDaniel Eklöf2021-02-12-1/+1
| |
| * main/client: add -D,--working-directory=DIRDaniel Eklöf2021-02-12-14/+33
| | | | | | | | | | This overrides the CWD the slave process chdir()’s into before exec:ing the client application.
| * server: send exit-code -1 when we fail to instantiate a new terminalDaniel Eklöf2021-02-12-0/+1
| |
| * user-notification: add new function ‘user_notification_add()’Daniel Eklöf2021-02-12-1/+46
| |
* | Merge branch 'url-hint-letters'Daniel Eklöf2021-02-13-22/+57
|\ \ | |/ |/| | | Closes #355
| * readme: mention that the key sequence alphabet can be configuredDaniel Eklöf2021-02-13-2/+2
| |
| * doc: foot.1: mention that the key sequence alphabet can be configuredDaniel Eklöf2021-02-13-2/+2
| |
| * url-mode: use ‘jump-label-letters’ as the alphabet for key sequencesDaniel Eklöf2021-02-13-8/+9
| | | | | | | | | | | | | | Instead of hard coding the alphabet to “sadfjklewcmpgh”, use the letters from ‘jump-label-letters’. Closes #355
| * doc: foot.ini.5: document jump-label-lettersDaniel Eklöf2021-02-13-0/+4
| |
| * foot.ini: add default value of jump-label-lettersDaniel Eklöf2021-02-13-0/+1
| |
| * config: add jump-label-letters optionDaniel Eklöf2021-02-13-0/+13
| |
| * config: refactor: add str_to_wchars(), use it when parsing word-delimitersDaniel Eklöf2021-02-13-8/+24
| |
| * url-mode: do case insensitive comparison when matching key sequenceDaniel Eklöf2021-02-13-2/+2
|/
* Merge branch 'releases/1.6'Daniel Eklöf2021-02-12-16/+33
|\
| * meson/pkgbuild: bump version to 1.6.41.6.4releases/1.6Daniel Eklöf2021-02-12-2/+2
| |
| * changelog: prepare for 1.6.4Daniel Eklöf2021-02-12-3/+1
| |
| * selection: don’t strip formatting C0 control characters in bracketed paste modeDaniel Eklöf2021-02-12-18/+29
| | | | | | | | | | | | | | | | It’s ok to let the receiving end handle formatting C0 control characters in bracketed paste mode. In fact, we *must* let them through. Otherwise it is impossible to paste e.g. tabs into editors and similar applications.
| * changelog: use standard signals for SIGCHLDDaniel Eklöf2021-02-12-0/+3
| |
| * config: selection-target: space-optimize the static ‘value’ arrayDaniel Eklöf2021-02-12-1/+1
| |
| * doc: foot.ini: selection-target=none|primary|clipboard|bothDaniel Eklöf2021-02-12-6/+11
| |
| * changelog: selection-target=none|primary|clipboard|bothDaniel Eklöf2021-02-12-0/+8
| |
| * config: add ‘none’ as a possible value for ‘selection-target’Daniel Eklöf2021-02-12-12/+22
| | | | | | | | | | | | | | When ‘selection-target’ is set to ‘none’, selecting text does not copy the text to _any_ clipboard. This patch also refactors the value parsing to be data driven.
| * selection: copy selected text to the target configured by ‘selection-target’Daniel Eklöf2021-02-12-1/+14
| | | | | | | | Closes #288
| * config: add new option ‘selection-target’Daniel Eklöf2021-02-12-0/+23
| | | | | | | | | | This option controls the clipboard target that selected text should be copied to.
| * reaper: monitor SIGCHLD using the FDM instead of via a signalfdDaniel Eklöf2021-02-12-139/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to letting the FDM do the low-level signal watching, this patch also fixes a bug; multiple SIGCHLDs, be it delivered either through a signal, or via a signalfd, can be coalesced, like all signals. This means we need to loop on waitpid() with WNOHANG until there are no more processes to reap. This in turn requires a small change to the way reaper callbacks are implemented. Previously, the callback was allowed to do the wait(). This was signalled back to the reaper through the callback’s return value. Now, since we’ve already wait():ed, the process’ exit status is passed as an argument to the reaper callback. The callback for the client application has been updated accordingly; it sets a flag in the terminal struct, telling term_destroy() that the process has already been wait():ed on, and also stores the exit status.
| * render: block all signals in the rendering threadsDaniel Eklöf2021-02-12-0/+5
| |
| * main: monitor SIGINT+SIGTERM using the FDMDaniel Eklöf2021-02-12-9/+10
| |
| * fdm: add support for managing signalsDaniel Eklöf2021-02-12-26/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add fdm_signal_add() and fdm_signal_del(). Signals added to the fdm will be monitored, and the provided callback called as “soon as possible” from the main context (i.e not from the signal handler context). Monitored signals are *blocked* by default. We use epoll_pwait() to unblock them while we’re polling. This allows us to do race-free signal detection. We use a single handler for all monitored signals; the handler simply updates the signal’s slot in a global array (sized to fit SIGRTMAX signals). When epoll_pwait() returns EINTR, we loop the global array. The callback associated with each signal that fired is called.
| * install: add -Dterminfo to list of compile-time optionsDaniel Eklöf2021-02-12-3/+4
| |
| * changelog: -Dterminfo changed from boolean to feature optionDaniel Eklöf2021-02-12-0/+2
| |
| * meson: convert -Dterminfo from a boolean to a feature optionDaniel Eklöf2021-02-12-5/+5
| | | | | | | | Patch from Jan Beich
| * ime: Reset terminal's IME state on text_input.leaveTadeo Kondrak2021-02-12-0/+12
| | | | | | | | | | | | | | | | To reproduce issue: - Launch an IME from inside foot - Type in some preedit text - Use Ctrl-C to close the IME - IME text stays in terminal until focus is changed
| * changelog: add section for 1.6.4Daniel Eklöf2021-02-12-0/+11
| |
* | Merge branch 'dont-strip-formatting-chars-when-pasting-in-bracketed-paste-mode'Daniel Eklöf2021-02-12-18/+26
|\ \
| * | selection: don’t strip formatting C0 control characters in bracketed paste modeDaniel Eklöf2021-02-12-18/+26
|/ / | | | | | | | | | | | | | | It’s ok to let the receiving end handle formatting C0 control characters in bracketed paste mode. In fact, we *must* let them through. Otherwise it is impossible to paste e.g. tabs into editors and similar applications.
* | Merge branch 'add-missing-short-options-to-usage'Daniel Eklöf2021-02-12-11/+11
|\ \
| * | main/client: add missing short options to usage (--help output)Daniel Eklöf2021-02-12-11/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially, these options *did not* have short options. Then, in e81388336750a20a2da98a57e9726c8ba1b481e3, the short options were added to footclient’s getopt_long() call. This was in a sense incorrect. But instead of reverting it, the short options were made official in 8eaa1959904ecff0e7e75d152220344457912f76, by adding the short options to foot, documenting them in the man pages, and adding them to the shell completions. Though the commit message of 8eaa1959904ecff0e7e75d152220344457912f76 says the options have now been included in usage(), they were in fact *not* added to usage. This patch does just that.
* | changelog: use standard signals for SIGCHLDDaniel Eklöf2021-02-11-2/+5
| |
* | Merge branch 'log-level'Daniel Eklöf2021-02-11-37/+138
|\ \ | | | | | | | | | Closes #337
| * | main: client: factor out some common code for "--log-level" optionCraig Barnes2021-02-11-58/+61
| | |
| * | changelog: -d,--log-levelDaniel Eklöf2021-02-09-0/+2
| | |
| * | completions: fish: -d,--log-levelDaniel Eklöf2021-02-09-0/+2
| | |