| Commit message (Collapse) | Author | Age | Lines | |
|---|---|---|---|---|
| * | Merge branch 'add-missing-short-options-to-usage' | Daniel Eklöf | 2021-02-12 | -11/+11 |
| |\ | ||||
| | * | main/client: add missing short options to usage (--help output) | Daniel Eklöf | 2021-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 SIGCHLD | Daniel Eklöf | 2021-02-11 | -2/+5 |
| | | ||||
| * | Merge branch 'log-level' | Daniel Eklöf | 2021-02-11 | -37/+138 |
| |\ | | | | | | | Closes #337 | |||
| | * | main: client: factor out some common code for "--log-level" option | Craig Barnes | 2021-02-11 | -58/+61 |
| | | | ||||
| | * | changelog: -d,--log-level | Daniel Eklöf | 2021-02-09 | -0/+2 |
| | | | ||||
| | * | completions: fish: -d,--log-level | Daniel Eklöf | 2021-02-09 | -0/+2 |
| | | | ||||
| | * | completions: zsh: -d,--log-level | Daniel Eklöf | 2021-02-09 | -0/+2 |
| | | | ||||
| | * | doc: footclient.1: document -d,--log-level | Daniel Eklöf | 2021-02-09 | -0/+4 |
| | | | ||||
| | * | doc: foot.1: document -d,--log-level | Daniel Eklöf | 2021-02-09 | -0/+4 |
| | | | ||||
| | * | client: add -d,--log-level | Daniel Eklöf | 2021-02-09 | -14/+54 |
| | | | ||||
| | * | main: add -d,--log-level=[debug,info,warning,error] | Daniel Eklöf | 2021-02-09 | -20/+59 |
| | | | ||||
| | * | log: log-level applies to messages logged to stderr too | Daniel Eklöf | 2021-02-09 | -3/+8 |
| | | | ||||
| * | | Merge branch 'fdm-signal-handling' | Daniel Eklöf | 2021-02-11 | -171/+253 |
| |\ \ | ||||
| | * | | reaper: monitor SIGCHLD using the FDM instead of via a signalfd | Daniel Eklöf | 2021-02-11 | -138/+90 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 threads | Daniel Eklöf | 2021-02-11 | -0/+5 |
| | | | | ||||
| | * | | main: monitor SIGINT+SIGTERM using the FDM | Daniel Eklöf | 2021-02-11 | -9/+10 |
| | | | | ||||
| | * | | fdm: add support for managing signals | Daniel Eklöf | 2021-02-11 | -24/+148 |
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||
| * | | Merge branch 'xassert-false' | Craig Barnes | 2021-02-10 | -36/+30 |
| |\ \ | ||||
| | * | | Mark slave_exec() as "noreturn" and convert xassert(false) to BUG(...) | Craig Barnes | 2021-02-10 | -2/+3 |
| | | | | ||||
| | * | | Convert all but 2 remaining uses of xassert(false) to BUG("...") | Craig Barnes | 2021-02-10 | -17/+12 |
| | | | | ||||
| | * | | Convert some more uses of xassert(false) to BUG("...") | Craig Barnes | 2021-02-09 | -5/+5 |
| | | | | ||||
| | * | | Convert some uses of xassert(false) to BUG("some error message") | Craig Barnes | 2021-02-09 | -12/+10 |
| | | | | ||||
| * | | | Merge branch 'turn-meson-terminfo-option-into-a-feature' | Daniel Eklöf | 2021-02-09 | -8/+11 |
| |\ \ \ | |_|/ |/| | | ||||
| | * | | install: add -Dterminfo to list of compile-time options | Daniel Eklöf | 2021-02-09 | -3/+4 |
| | | | | ||||
| | * | | changelog: -Dterminfo changed from boolean to feature option | Daniel Eklöf | 2021-02-09 | -0/+2 |
| | | | | ||||
| | * | | meson: convert -Dterminfo from a boolean to a feature option | Daniel Eklöf | 2021-02-09 | -5/+5 |
| | | | | | | | | | | | | | Patch from Jan Beich | |||
| * | | | csi: add 47+1047 (alt screen) to DECRQM | Daniel Eklöf | 2021-02-09 | -0/+2 |
| | | | | ||||
| * | | | Merge remote-tracking branch 'origin/debug-log' | Daniel Eklöf | 2021-02-09 | -12/+13 |
| |\ \ \ | |_|/ |/| | | ||||
| | * | | debug: make use of log_msg() in fatal_error() and bug() functions | Craig Barnes | 2021-02-09 | -12/+13 |
| |/ / | | | | | | | Instead of writing directly to stderr and/or syslog(3). | |||
| * / | render: use portable HAS_INCLUDE() wrapper instead of __has_include() | Craig Barnes | 2021-02-09 | -1/+9 |
| |/ | ||||
| * | Merge branch 'refactor-key-bindings' | Daniel Eklöf | 2021-02-08 | -330/+144 |
| |\ | ||||
| | * | key-bindings: refactor: use a single type for all key bindings | Daniel Eklöf | 2021-02-08 | -330/+144 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, the various key binding modes (“normal”, “search” and “url”) have used their own struct definitions for their key bindings. The only reason for this was to have a properly typed “action” (using the appropriate “action” enum). This caused lots of duplicated code. This patch refactors this to use a single struct definition for the “unparsed” key bindings handled by the configuration, and another single definition for “parsed” bindings used while handling input. This allows us to implement configuration parsing, keymap translation and so on using one set of functions, regardless of key binding mode. | |||
| * | | Merge branch 'url-parser-recognize-percent' | Daniel Eklöf | 2021-02-08 | -2/+2 |
| |\ \ | | | | | | | | | | Closes #338 | |||
| | * | | url-mode: ‘%’ is a valid URI character (but don’t allow it at the end) | Daniel Eklöf | 2021-02-08 | -2/+2 |
| |/ / | | | | | | | Closes #338 | |||
| * | | Merge branch 'kitty-theme' | Daniel Eklöf | 2021-02-08 | -0/+22 |
| |\ \ | ||||
| | * | | Add kitty theme | Stefan Tatschner | 2021-02-08 | -0/+22 |
| |/ / | ||||
| * | | Merge branch 'prefer-tll_remove-over-tll_free' | Daniel Eklöf | 2021-02-08 | -24/+35 |
| |\ \ | |/ |/| | ||||
| | * | misc: when free:ing tll lists, prefer tll_remove() over tll_free() | Daniel Eklöf | 2021-02-08 | -24/+35 |
| |/ | | | | | | | | | | | | | | | | | | | In many places we have the following pattern: tll_foreach(list, it) free(it->item.thing); tll_free(list); Since all tll functions are macros, and thus inlined, and since tll_free in itself expands to a tll_foreach(), the above pattern expands to more native code than necessary. This is somewhat smaller: tll_foreach(list, it) { free(it->item.thing); tll_remove(list, it); } | |||
| * | Merge branch 'url-detection' | Daniel Eklöf | 2021-02-08 | -138/+1340 |
| |\ | ||||
| | * | url-mode: urls_render(): early exit when URL list is empty | Daniel Eklöf | 2021-02-07 | -0/+3 |
| | | | ||||
| | * | url-mode: generate-key-combos: minor efficiency tweaks | Daniel Eklöf | 2021-02-07 | -7/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | | * Use a do..while loop; this lets us drop the second half of the loop condition. * Call wcslen(prefix) once, *before* iterating the alphabet characters. * Step through the alphabet characters using a pointer, as this avoids an indexed load (with possibly an imul instruction in e.g. -Os builds). | |||
| | * | url-mode: be consistent; use xmalloc() + xrealloc() | Daniel Eklöf | 2021-02-07 | -4/+4 |
| | | | ||||
| | * | url-mode: early exit when assigning key combos to empty list | Daniel Eklöf | 2021-02-07 | -0/+3 |
| | | | ||||
| | * | changelog: URL mode | Daniel Eklöf | 2021-02-07 | -0/+4 |
| | | | ||||
| | * | doc: foot.1: document the new URL mode | Daniel Eklöf | 2021-02-07 | -0/+25 |
| | | | ||||
| | * | readme: document the new URL mode | Daniel Eklöf | 2021-02-07 | -0/+27 |
| | | | ||||
| | * | render: urls: blank out keys already pressed | Daniel Eklöf | 2021-02-07 | -6/+3 |
| | | | ||||
| | * | render: urls: fix string formatter in swprintf() | Daniel Eklöf | 2021-02-07 | -1/+1 |
| | | | ||||
| | * | render: urls: don’t use/allocate maximum allowed characters unless needed | Daniel Eklöf | 2021-02-07 | -1/+1 |
| | | | ||||
| | * | render: render_osd(): remove ‘alpha’ parameter - it’s always 0xffff | Daniel Eklöf | 2021-02-07 | -8/+6 |
| | | | ||||
| | * | url-mode: input: backspace reverts the last key | Daniel Eklöf | 2021-02-07 | -2/+11 |
| | | | ||||
| | * | url-mode: fix key sequence generation | Daniel Eklöf | 2021-02-07 | -33/+53 |
| | | | | | | | | | | | | | | | | | * We were using the ‘back’ element of the list as prefix for the next iteration of sequences, instead of the element at index ‘offset’ * ALEN() on a wchar_t[] includes the NULL terminator. We don’t want that. | |||
| | * | render: urls: reduce vertical margin | Daniel Eklöf | 2021-02-07 | -5/+6 |
| | | | ||||
| | * | render: urls: uppercase the activation key sequence | Daniel Eklöf | 2021-02-07 | -0/+4 |
| | | | ||||
| | * | url-mode: generate key combinations using vimium’s algorithm | Daniel Eklöf | 2021-02-07 | -16/+47 |
| | | | ||||
| | * | url-mode: refresh rendered URLs after accepting a key | Daniel Eklöf | 2021-02-07 | -0/+1 |
| | | | ||||
| | * | render: urls: add TODO: highlight already entered keys | Daniel Eklöf | 2021-02-07 | -0/+6 |
| | | | ||||
| | * | render: urls: don’t display URLs whose key sequence doesn’t match | Daniel Eklöf | 2021-02-07 | -1/+10 |
| | | | ||||
| | * | url-mode: urls_assign_key_combos(): remove URLs when all key combos have been used up | Daniel Eklöf | 2021-02-07 | -15/+24 |
| | | | ||||
| | * | url-mode: add ftp://, ftps://, file://, gemini:// and gopher:// | Daniel Eklöf | 2021-02-07 | -0/+5 |
| | | | ||||
| | * | url-mode: urls_collect(): URL list pointer as an argument | Daniel Eklöf | 2021-02-07 | -54/+60 |
| | | | ||||
| | * | url-mode: underline URLs using the color from colors.urls | Daniel Eklöf | 2021-02-07 | -1/+61 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is implemented by allocating one of the (few!) remaining bits in the cells’ attribute struct to indicate the cell should be “URL highlighted”. render_cell() looks at this bit and draws an underline using the color from colors.urls (defaults to regular3 - i.e. yellow). A new function, url_tag_cells(), iterates the currently detected URLs and sets the new ‘url’ attribute flag on the affected cells. Note: this is done in a separate function to keep urls_collect() free from as many dependencies as possible. urls_reset() is updated to *clear* the ‘url’ flag (and thus implicitly also results in a grid refresh, _if_ there were any URLs). We now exit URL mode on *any* client application input. This needs to be so since we can’t know if the URLs we previously detected are still valid. | |||
| | * | url-mode: store absolute row numbers in start/end coordinates | Daniel Eklöf | 2021-02-07 | -3/+34 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to update the jump label positions when the viewport changes. This in turn allows us to stay in URL mode while the user is using the mouse to scroll in the scrollback history. Scrolling with the keyboard is currently not possible, since input handling in URL mode does not recognize “regular” key bindings. We _could_ add scrollback up/down bindings to URL mode too, but lets not, for the time being. (Note: an alternative to this patch is to disallow mouse scrolling too. Then we could have kept the URL start/end as viewport local coordinates). | |||
| | * | url-mode: make the end coordinate *inclusive* | Daniel Eklöf | 2021-02-07 | -0/+5 |
| | | | ||||
| | * | input: mouse events on jump label surfaces do nothing | Daniel Eklöf | 2021-02-07 | -0/+4 |
| | | | ||||
| | * | term: surface-kind: add TERM_SURF_JUMP_LABEL | Daniel Eklöf | 2021-02-07 | -1/+7 |
| | | | ||||
| | * | readme: add URL mode to the feature list | Daniel Eklöf | 2021-02-07 | -1/+2 |
| | | | ||||
| | * | readme: add ctrl+shift+u, with description, to the list of default key bindings | Daniel Eklöf | 2021-02-07 | -4/+8 |
| | | | ||||
| | * | config: use a bitfield for flags tracking whether to use custom colors for CSD or not | Daniel Eklöf | 2021-02-07 | -9/+9 |
| | | | ||||
| | * | config: add colors.jump_labels and colors.urls | Daniel Eklöf | 2021-02-07 | -15/+84 |
| | | | | | | | | | | | | | | | | | | | | | * colors.jump_labels configures the foreground and background colors used when rendering URL jump labels. Defaults to “regular0 regular3” (i.e. black on yellow). * colors.urls configures the color to use when highlighting URLs in URL mode. Note that we aren’t currently doing any highlighting... Defaults to regular3 (i.e. yellow). | |||
| | * | config: use a packed bitfield for “use custom color” flags | Daniel Eklöf | 2021-02-07 | -4/+9 |
| | | | ||||
| | * | foot.ini: fix default values for csd.button-*-color | Daniel Eklöf | 2021-02-07 | -3/+3 |
| | | | ||||
| | * | url-mode: refactor: break out URL activation to a separate function | Daniel Eklöf | 2021-02-07 | -37/+42 |
| | | | ||||
| | * | url-mode: auto-detect: use wcsncasecmp() instead of towlower() | Daniel Eklöf | 2021-02-07 | -7/+8 |
| | | | | | | | | | | | When matching the URI scheme, use wcsncasecmp() when comparing the strings, instead of calling towlower() on each cell. | |||
| | * | url-mode: auto-detect: don’t store the lower-cased URL; use original casing | Daniel Eklöf | 2021-02-07 | -5/+5 |
| | | | ||||
| | * | config: add show-urls-copy action | Daniel Eklöf | 2021-02-07 | -20/+52 |
| | | | | | | | | | | | | | This works just like show-urls-launch, except that instead of opening the URL (typically using xdg-open), it is placed in the clipboard when activated. | |||
| | * | config: show-urls-launch: change default key binding to ctrl+shift+u | Daniel Eklöf | 2021-02-07 | -3/+3 |
| | | | ||||
| | * | config: rename ‘show-urls’ to ‘show-urls-launch’ | Daniel Eklöf | 2021-02-07 | -6/+7 |
| | | | ||||
| | * | render: urls: tweak positioning | Daniel Eklöf | 2021-02-07 | -4/+6 |
| | | | | | | | | | Don’t offset the labels too much vertically, _or_ horizontally. | |||
| | * | render: reduce URL jump label margins | Daniel Eklöf | 2021-02-07 | -1/+1 |
| | | | ||||
| | * | config: add ctrl+d as (yet another) default binding url-bindings.cancel | Daniel Eklöf | 2021-02-07 | -2/+3 |
| | | | ||||
| | * | url-mode: auto-detect: don’t line-wrap URL is row isn’t line-wrapped | Daniel Eklöf | 2021-02-07 | -0/+3 |
| | | | ||||
| | * | render: url labels: don’t position outside window | Daniel Eklöf | 2021-02-07 | -2/+11 |
| | | | ||||
| | * | url-mode: auto-detect: heuristics for parenthesis and brackets | Daniel Eklöf | 2021-02-07 | -7/+40 |
| | | | | | | | | | | | | | | | | | | | | | While parenthesis and brackets _are_ valid URL characters, there are many times when we do *not* want them to be part of the URL. For example, in markdown we write “[text](url)”, or even “[](url-2)”. Here, the URLs are clearly *not* “url)” or “url-1)](url2)”. | |||
| | * | url-mode: use ‘url-launch’ from config to open URLs | Daniel Eklöf | 2021-02-07 | -1/+16 |
| | | | ||||
| | * | notify: break out command template expansion to spawn_expand_template() | Daniel Eklöf | 2021-02-07 | -60/+97 |
| | | | ||||
| | * | config: add ‘url-launch’ option, defaulting to “xdg-open ${url}” | Daniel Eklöf | 2021-02-07 | -22/+63 |
| | | | ||||
| | * | term: destroy: set term->window = NULL after destroying it | Daniel Eklöf | 2021-02-07 | -1/+3 |
| | | | | | | | | | | | | | This fixes a crash in urls_reset() on destroy, where we tried to access an already free:d window pointer in order to destroy the jump label surfaces. | |||
| | * | render: urls: positioning: place a bit further away from the starting position | Daniel Eklöf | 2021-02-07 | -2/+2 |
| | | | ||||
| | * | url-mode: urls_reset() do an early return if we don’t have any URLs | Daniel Eklöf | 2021-02-07 | -0/+3 |
| | | | ||||
| | * | url-mode: fix ‘n’ parameter to wcstombs() | Daniel Eklöf | 2021-02-07 | -4/+8 |
| | | | ||||
| | * | urls: initial support for detecting URLs and rendering jump-labels | Daniel Eklöf | 2021-02-07 | -28/+503 |
| | | | | | | | | | The jump labels work, but is currently hardcoded to use xdg-open | |||
| | * | config: free URL bindings | Daniel Eklöf | 2021-02-07 | -0/+5 |
| | | | ||||
| | * | config: add infrastructure to handle URL mode specific key bindings | Daniel Eklöf | 2021-02-07 | -1/+190 |
| |/ | | | | | | * Add “show-urls” action to regular key bindings * Add url-bindings section to foot.ini * Add “cancel” action to URL mode key bindings | |||
| * | Merge branch 'xassert-performance-regression-2' | Daniel Eklöf | 2021-02-07 | -7/+1 |
| |\ | ||||
| | * | vt: remove xassert(), that cannot be optimized out, from action_print() | Daniel Eklöf | 2021-02-07 | -2/+0 |
| | | | | | | | | | | | | | | | | | | | | | action_print() is in the hot path, and having if-statement here *does* have an impact on performance. Much more so when that if-statement involves a functional call to wcwidth(). Closes #330 | |||
| | * | ime: enter(): remove assertion on surface kind being TERM_SURF_GRID | Daniel Eklöf | 2021-02-07 | -5/+1 |
| |/ | | | | | | The main surface is the *only* IME capable surface we have. If the compositor is sending an ime::enter event for another surface, it is a compositor bug, not a foot bug. | |||
| * | main: include uname.sysname when logging host architecture | Daniel Eklöf | 2021-02-07 | -1/+2 |
| | | ||||
| * | Merge branch 'mouse-events-never-sent-to-client' | Daniel Eklöf | 2021-02-04 | -109/+89 |
| |\ | ||||
