aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* output: initial support for output scalingDaniel Eklöf2019-08-12-6/+156
| | | | | | * Not updated run-time; only scale at start up used * Multiple monitors (outputs) not supported, as we can't track which output we're on (yet).
* render: fix foreground color for non-block cursorDaniel Eklöf2019-08-12-1/+4
| | | | | | | When rendering either the 'bar' or 'underline' cursor styles, only use the configured "cursor color" if it has actually been configured. If it hasn't, use the current foreground color.
* doc: add foot.5 (configuration)Daniel Eklöf2019-08-12-1/+91
|
* config: set to NULL before calling getline()Daniel Eklöf2019-08-12-0/+1
| | | | This fixes a crash on musl-based distros
* config: don't log a NULL pathDaniel Eklöf2019-08-12-2/+2
|
* doc: add foot.1 man pageDaniel Eklöf2019-08-11-0/+49
|
* main: add -h,--help and -v,--version command line optionsDaniel Eklöf2019-08-11-7/+49
|
* README: add description of mouse middle clickDaniel Eklöf2019-08-11-0/+1
|
* READNE: fontconfig's fallback _can_ be used, but isn't preferredDaniel Eklöf2019-08-11-0/+3
|
* font: cleanupDaniel Eklöf2019-08-10-30/+7
|
* font: initial support for fontconfig font fallbackDaniel Eklöf2019-08-10-42/+120
| | | | | | | | When we've exhausted our own fallback list, try the font list provided by fontconfig. This means, the user's fallback fonts have priority, but in case all of them fail, we hopefully get lucky with fontconfig...
* selection: regression: last cell wasn't included in copied textDaniel Eklöf2019-08-10-1/+1
|
* osc: implement copy/paste to/from primaryDaniel Eklöf2019-08-09-70/+113
|
* input: don't paste from primary if client is mouse trackingDaniel Eklöf2019-08-09-2/+3
|
* README: remove empty lines in between list itemsDaniel Eklöf2019-08-08-2/+0
|
* README: initial readmeDaniel Eklöf2019-08-08-0/+59
|
* config: remove old, commented out codeDaniel Eklöf2019-08-08-1/+0
|
* term: don't send mouse events if shift is being pressedDaniel Eklöf2019-08-08-0/+15
|
* selection: allow selection when mouse tracking is enabled *if* shift is pressedDaniel Eklöf2019-08-08-2/+1
|
* render: selection may not be "ordered", since it may not have been finalizedDaniel Eklöf2019-08-08-0/+6
|
* font: improve loggingDaniel Eklöf2019-08-08-6/+6
|
* csi: cancel selection *before* switching gridDaniel Eklöf2019-08-08-3/+4
| | | | This fixes an occasional SIGSEGV
* selection/input: triple click selects an entire rowDaniel Eklöf2019-08-06-12/+32
|
* main: make all polled FDs non-blockingDaniel Eklöf2019-08-05-56/+73
| | | | | | | | | | And handle read() returning EAGAIN. This fixes an issue with the keyboard repeat timer, which sometimes would return EAGAIN. Most likely because POLLIN was set on it, but then before we get to handle it, the timer was canceled (by a key up event).
* term: cancel selection when scrolling wrapsDaniel Eklöf2019-08-05-2/+23
| | | | | | | | | | If we scroll enough, we'll eventually end up wrapping around the entire scrollback buffer. At this point, a selection is no longer valid, so cancel it. Note: this was very obvious when scrolling in the alt screen, since its scrollback buffer is what you see on the screen (i.e. it has no scrollback).
* selection: ensure start < end in finalizeDaniel Eklöf2019-08-05-30/+27
| | | | | When the selection is finalized, swap start/end if necessary, to make sure start <= end.
* input: use a timer fd to handle keyboard key repeatDaniel Eklöf2019-08-05-151/+60
| | | | | | | | | | | Instead of running a repeater thread that writes the key to repeat over a pipe, use a simple timer fd. No more locking or condition signalling. No need to track start/stop/exist states. We simply set up the initial timeout value to be the 'delay', and the interval to be the repeat 'rate'.
* selection: mark-word using spaces only as word separatorDaniel Eklöf2019-08-05-8/+15
| | | | | When the user double-clicks with ctrl pressed, we now select the word under the cursor using spaces only as word separator.
* term: re-order switch-cases to be in X button orderDaniel Eklöf2019-08-05-3/+3
|
* term: fix mouse button mapping to X button numbersDaniel Eklöf2019-08-05-2/+2
| | | | BACK should be 4, FORWARD 5.
* selection: only disable selection when mouse drag/motion is onDaniel Eklöf2019-08-04-1/+2
| | | | | This allows us to select text in e.g. man/less while still being able to use LESS=--MOUSE (i.e. enable scrolling with mouse).
* scrollback: use scroll damage to speed up scrollingDaniel Eklöf2019-08-04-2/+24
| | | | | | When scrolling through the scrollback lines, use scroll damage instead of re-rendering the entire screen whenever it makes sense. I.e. when the number of lines isn't a whole page or more.
* render: make sure the current view is allocated and visibleDaniel Eklöf2019-08-04-8/+8
|
* csi: add 'unimplemented' warnings for things we handle but ignoreDaniel Eklöf2019-08-04-6/+19
|
* selection: insert newlines only when last column is emptyDaniel Eklöf2019-08-04-7/+14
|
* osc: bug: uneven clipboard bytes where not buffered correctlyDaniel Eklöf2019-08-03-2/+4
| | | | | | | | | | | | When responding to a OSC 52 clipboard request, we need to base64 encode the clipboard data. This is done in, potentially, several calls. Since we need at least 3 bytes to be able to produce any base64 output, we may have to buffer up to 2 bytes between the callback calls with clipboard data. This was being done incorrectly, where both bytes were written to index 0 in the buffer.
* term: cell erase: reset *all* attributes *except* backgroundDaniel Eklöf2019-08-03-4/+1
|
* osc: remove TODODaniel Eklöf2019-08-03-2/+0
|
* cell: pack more efficiently and store glyph as a wcharDaniel Eklöf2019-08-02-129/+146
| | | | | | | | | | | The 'attributes' struct is now 8 bytes and naturally packed (used to be 9 bytes, artificially packed). 'cell' struct is now 12 bytes, naturally packed (used to be 13 bytes, artificially packed). Furthermore, the glyph is stored as a wchar instead of a char*. This makes it easier (faster) to do glyph lookup when rendering.
* term: implement resetDaniel Eklöf2019-08-01-2/+86
|
* render: special case worker-count == 0Daniel Eklöf2019-08-01-31/+60
| | | | | Allow render worker count to be 0, in which case the main thread renders the entire screen.
* threads: set thread titlesDaniel Eklöf2019-08-01-0/+15
|
* conf: make number of scrollback lines configurableDaniel Eklöf2019-08-01-2/+17
|
* render: always damage two cells when rendering the cursorDaniel Eklöf2019-07-31-1/+1
| | | | | Hack to render cursor-at-double-width-characters correctly. Should be replaced with something better.
* render: draw cell decorations (cursor, underline etc) correctly for double-width charactersDaniel Eklöf2019-07-31-37/+38
|
* font: initial support for double-width *and* color emoji glyphsDaniel Eklöf2019-07-31-56/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fonts are now loaded with FT_LOAD_COLOR and we recognize and support the FT_PIXEL_MODE_BGRA pixel mode. This is mapped to a CAIRO_FORMAT_ARGB32 surface, that is blitted as-is (instead of used as a mask like we do for gray and mono glyphs). Furthermore, since many emojis are double-width, we add initial support for double-width glyphs. These are assumed to always be utf8. When PRINT:ing an utf8 character, we check its width, and add empty "spacer" cells after the cell with the multi-column glyph. When rendering, we render the columns in each row backwards. This ensures the spacer cells get cleared *before* we render the glyph (so that we don't end up erasing part of the glyph). Finally, emoji fonts are usually bitmap fonts with *large* glyphs. These aren't automatically scaled down. I.e. even if we request a glyph of 13 pixels, we might end up getting a 100px glyph. To handle this, fontconfig must be configured to scale bitmap fonts. When it is, we can look at the 'scalable' and 'pixelsizefixup' properties, and use these to scale the rendered glyph.
* vt: disable flash on bell, it's too annoying in e.g. zshDaniel Eklöf2019-07-30-1/+1
|
* vt: BELL is now logged at info level, and flashes the screenDaniel Eklöf2019-07-30-1/+2
|
* osc: reduce flash interval to 50msDaniel Eklöf2019-07-30-2/+1
|
* term: break out 'flash' to a separate 'term' functionDaniel Eklöf2019-07-30-13/+19
|
* footrc: add 'workers'Daniel Eklöf2019-07-30-0/+1
|
* config: remove commented out codeDaniel Eklöf2019-07-30-2/+0
|
* render: make resize log messages debug messagesDaniel Eklöf2019-07-30-1/+1
|
* main: don't shadow final return value inside poll loopDaniel Eklöf2019-07-30-3/+3
|
* selection: add a couple of word-breaking charactersDaniel Eklöf2019-07-30-4/+22
| | | | | | When "auto-selecting" a word, we used to only break on space characters. Now we break on a number of other characters as well.
* log: syslog: tag unused function arguments as unusedDaniel Eklöf2019-07-30-2/+4
|
* log: log to syslog tooDaniel Eklöf2019-07-30-3/+66
|
* main: font metrics should be debug loggedDaniel Eklöf2019-07-30-3/+1
|
* vt: remove almost all abort() callsDaniel Eklöf2019-07-30-83/+49
| | | | | | Replace with generic error log messages that simply says the ESC/CSI/OSC sequence is unhandled. This can mean either invalid or unimplemented, depending on the context.
* render: don't pass a struct buffer when all we need is a cairo_tDaniel Eklöf2019-07-30-23/+18
|
* render: don't call wl_surface_set_buffer_scale()Daniel Eklöf2019-07-30-3/+4
| | | | | | Since we don't support scaling, don't call wl_surface_set_buffer_scale(). This way, at least will get auto-scaled by the compositor.
* render: remove #if 0 codeDaniel Eklöf2019-07-30-15/+0
|
* vt: remove duplicate initialization warnings (clang)Daniel Eklöf2019-07-30-3/+0
|
* render: fix 'suggest braces around initialization...' warning (clang)Daniel Eklöf2019-07-30-1/+1
|
* input: fix 'comparison ... is always true' warning (clang)Daniel Eklöf2019-07-30-3/+3
|
* render: only explicitly re-render old cursor cell if it isn't dirtyDaniel Eklöf2019-07-30-13/+11
| | | | | If it is dirty, it will be rendered in the normal rendering process.
* render: last_cursor.cell must not be constDaniel Eklöf2019-07-30-1/+1
|
* render: remove all traces of glyph-sequenceDaniel Eklöf2019-07-30-61/+0
| | | | | This was used to optimize the call(s) to cairo_show_glyphs(), which we aren't using anymore.
* input: use keyboard enter serial only for selection serialDaniel Eklöf2019-07-30-7/+0
|
* Merge branch 'multithreaded-renderer'Daniel Eklöf2019-07-30-225/+595
|\
| * main: pty buffers appear to be ~20KB on modern linux kernelsDaniel Eklöf2019-07-30-1/+1
| |
| * font: add support for fallback fontsDaniel Eklöf2019-07-30-125/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A top-level font now has a list of fallback fonts. When a glyph cannot be found, we try each fallback font in turn, until we either find one that has the glyph, or until we've exhausted the list. To make this actually work in practise (read: to make performance acceptable), the cache is re-worked and is now populated on demand. It also supports non-ASCII characters, by using the 4-byte unicode character as index instead. Since having an array that can be indexed by a 4-byte value isn't really viable, we now have a simple hash table instead of an array.
| * render: add a 'clean' bit to each cell; only render cells that aren't cleanDaniel Eklöf2019-07-30-33/+52
| | | | | | | | | | | | | | | | | | | | | | This patch takes a bit from the foreground color value in a cell (todo: split up foreground/background into bitfields with a separate field for 'foreground/background' has been set), and only re-renders cells that aren't marked as clean. Note: we use a 'clean' bit rather than a 'dirty' bit to make it easy to erase cells - we can (keep doing) do that by simply memsetting a cell range to 0.
| * wip: initial multithreaded rendererDaniel Eklöf2019-07-29-89/+287
|/
* Merge branch 'use-freetype-to-render-glyphs'Daniel Eklöf2019-07-29-129/+316
|\
| * font: set FT load and render flags from FontConfig propertiesDaniel Eklöf2019-07-29-21/+129
| |
| * font: populate glyph cache (ASCII characters only) when instantiating fontDaniel Eklöf2019-07-28-82/+44
| |
| * font: add font_glyph_for_utf8()Daniel Eklöf2019-07-28-76/+94
| | | | | | | | | | | | This function fills in a struct glyph with glyph bitmap data for the provided utf-8 character (essentially a FT_Bitmap wrapped in a cairo surface).
| * cairo-ft: remove all usages of cairo-ftDaniel Eklöf2019-07-28-78/+4
| |
| * main: calculate *all* font metrics from the FreeType faceDaniel Eklöf2019-07-28-9/+24
| |
| * render: use FreeType face from font, instead of from cairo's scaled fontDaniel Eklöf2019-07-28-6/+2
| |
| * font: load FreeType face, and set it's pixel sizesDaniel Eklöf2019-07-28-25/+63
| |
| * render: poc: use freetype to render glyphsDaniel Eklöf2019-07-26-0/+124
|/ | | | | | | | | | | | | | Initial POC that uses freetype to render the glyphs. The bitmap produced by freetype contains the alpha value. We use this bitmap in a mask surface and then draw the final glyph with cairo by applying the source rgb using the OVER operator and the freetype generated alpha mask as surface mask. Note that we only support grayscale antialiasing (and no antialiasing). We are probably not setting the antialias options correctly either.
* render: reset "last cursor" when resizingDaniel Eklöf2019-07-26-2/+2
| | | | | The cell pointer is likely invalid since we realloc the grids. Besides. we're redrawing the entire window anyway.
* render: flush glyph sequence after erase previous cursorDaniel Eklöf2019-07-26-4/+8
| | | | | If not, we may have scrolled when we later flush the glyph sequence, causing the glyph to be rendered in wrong location.
* input: generate escape sequences for "other" keysDaniel Eklöf2019-07-26-6/+34
| | | | | This corresponds to xterm's modifyOtherKeys option, though the code needs more testing and cleanup.
* mouse: use discrete axis event if availableDaniel Eklöf2019-07-26-23/+37
| | | | This improves the scroll experience with certain devices
* render: add render_row()Daniel Eklöf2019-07-24-7/+13
|
* render: minorDaniel Eklöf2019-07-24-1/+2
|
* footrc: add cursor colorDaniel Eklöf2019-07-24-0/+1
|
* render: move local static variables into the terminal structDaniel Eklöf2019-07-24-31/+36
|
* render: move frame_callback to term.renderDaniel Eklöf2019-07-24-9/+11
|
* render: add render_refresh()Daniel Eklöf2019-07-24-16/+16
|
* render: bug: previous cursor wasn't always redrawn correctlyDaniel Eklöf2019-07-24-39/+56
| | | | | | | | | | | | | | | | | | | | The main problem is knowing: * The correct *cell* (to be able to render the *content* when erasing the old cursor) * Whether the cursor has moved (to determine whether to stop the rendering loop or not) * Where on the *screen* the cursor is/was (since the terminal may be partly scrolled back) This patch stores three static variables: * last_cursor is used to compare against current cursor to see if the cursor has moved or not * last_cursor_on_screen is the actual screen coordinates the cursor was rendered at (typically the same as last_cursor, but may be offset by the view) * last_cursor_cell is a pointer to the cell to render
* conf: allow the user to configure a fixed cursor colorDaniel Eklöf2019-07-23-15/+81
| | | | | | | | | | | | | | | | | | | The default is to reverse the foreground/background colors in the cell with the cursor. But, if the user configures a specific set of cursor colors, those will always be used, regardless of other cell attributes (dim, reverse etc). The cursor color is specified as two color values, 'text' and 'cursor'. The block cursor uses the 'cursor' color as background, and the 'text' color for the glyph. All other cursor styles uses the 'cursor' color for the cursor, but uses the cell's foreground color for the glyph (meaning, dim/reverse/etc applies).
* csi: ignore CSI ?1036h/l (metaSendsEscape)Daniel Eklöf2019-07-23-0/+9
|
* term: make sure to update 'current row' when restoring saved cursorDaniel Eklöf2019-07-23-3/+20
|
* grid: swap rows doesn't mark rows as dirtyDaniel Eklöf2019-07-23-3/+0
|
* osc: ignore OSC 30 (konsole's "set tab title")Daniel Eklöf2019-07-23-1/+7
|
* csi: implement \E[Z - back tabDaniel Eklöf2019-07-22-1/+10
|