Commit Graph
72 Commits
Author SHA1 Message Date
Wez Furlong 981d939298 More gracefully handle running out of texture space
I manually checked this by setting TEX_SIZE to a small value
and watching the log reallocate progressively larger sizes.
2018-02-24 23:05:20 -08:00
Wez Furlong abc06620b8 add support for implicit hyperlinks 2018-02-24 15:43:02 -08:00
Wez Furlong 478c64e05e Parse command line arguments
We can now run something other than the shell.
2018-02-23 08:41:46 -08:00
Wez Furlong 9673c8c1b7 roll back bundling of harfbuzz
This will likely break travis; I'll follow up with something to help with that.

Refs: https://github.com/wez/wezterm/issues/1
2018-02-22 21:07:17 -08:00
Wez Furlong 6232ebf1c6 make refresh rate more regular 2018-02-22 14:34:57 -08:00
Wez Furlong 42323a5be8 plumb clipboard stuff into the wakeup stuff 2018-02-22 09:02:01 -08:00
Wez Furlong 79ebf717e8 provide a more targeted channel for wakeups
This allows using the mio poll timer as the signal for drawing
frames, rather than always drawing them after each byte is read
from the pty.   We're using 50ms as the frame interval at the moment.
2018-02-22 01:44:07 -08:00
Wez Furlong f6a95aafcf use less cpu while idling
This does mean that we paint more frequently (basically after every
read from the pty), so our perf for large files is down.
2018-02-22 01:15:28 -08:00
Wez Furlong ac7d2a9cda simplify child waiting 2018-02-22 00:35:51 -08:00
Wez Furlong 6f3b6d7018 remove unused x11 dep 2018-02-22 00:19:12 -08:00
Wez Furlong bd4e745380 go all-in on glutin and remove my own xcb based code 2018-02-22 00:18:10 -08:00
Wez Furlong 8cb8d7d613 wire up sigchld 2018-02-21 23:51:52 -08:00
Wez Furlong df0e85abaf hook up input events for glutin 2018-02-21 23:37:19 -08:00
Wez Furlong d876d23a28 stub for a glutin based window
It can render the terminal but doesn't handle input of any kind.
2018-02-21 00:16:03 -08:00
Wez Furlong c39dbdc356 stubs for macos font loading 2018-02-20 22:33:09 -08:00
Wez Furlong a7f2757452 rustfmt update 2018-02-20 22:08:19 -08:00
Wez Furlong dd4c9d6683 refactor the font loading code
This is the first step towards making this code more system independent.
2018-02-20 19:53:50 -08:00
Wez Furlong e2529d1837 Move opengl code into its own module 2018-02-20 15:46:05 -08:00
Wez Furlong 4efef794fe move Renderer to its own file
It is now independent of the X11 code
2018-02-20 15:43:42 -08:00
Wez Furlong e1cd44922f move x11 code around
idea is to reduce the cfg attributes and make it easier to
split into system dependent renderers
2018-02-20 15:02:39 -08:00
Wez Furlong 5a99dd143c move hbwrap into harfbuzz crate 2018-02-20 14:32:28 -08:00
Wez Furlong fe1ae0b7eb Be more particular about platform deps 2018-02-20 14:17:28 -08:00
Wez Furlong e7d99024bb build our own harfbuzz for broader compat 2018-02-20 12:33:30 -08:00
Wez Furlong e6f42987ca remove another unused crate 2018-02-20 07:41:19 -08:00
Wez Furlong 1607ba4443 Add untested code for managing a texture atlas 2018-02-17 20:37:07 -08:00
Wez Furlong 20965e786f start hacking on OpenGL ES2 rendering 2018-02-16 21:44:56 -08:00
Wez Furlong 6af3b63d57 make scrollback size configurable 2018-02-10 09:43:54 -08:00
Wez Furlong 3075e47c89 Allow configuring colors 2018-02-10 08:16:20 -08:00
Wez Furlong 4ce67c7f9a Use the palette crate for blending
I wasn't pleased with how text was rendering on a colored background,
and after some research I discovered that I was neglecting to convert
from sRGB to a linear RGB colorspace, and that this was causing the
blending to have inaccurate results.

This diff pulls in the palette crate to handle the heavy lifting.
It doesn't appear to have any especially fast optimizations for this
though, which is a shame because the blending code I was using
previously was largely integer math with few branches.  The colorspace
conversion has several floating point operations and branches that
are unavoidable :-/

We run a bit hotter on the CPU but the results are much more pleasing
to the eye.
2018-02-09 23:32:35 -08:00
Wez Furlong edd5911535 Add a small font styling engine
This enables selecting an italic font when the cell is italic,
but has more power beyond just that simple property.

This runs a little hot on the CPU so there's probably some caching and
tweaking that can be done to make the evaluation a bit cheaper.
2018-02-07 09:23:24 -08:00
Wez Furlong 7ade4434fe Add basic config file parsing
So that we no longer assume Operator Mono SSm.
We now default to `monospace`.  I just tried this and the font metrics
appear to be wonky, so there's some tweaking to do.
2018-02-07 07:51:04 -08:00
Wez Furlong 401530a899 lookup the $SHELL for the user rather than assume zsh 2018-02-06 22:48:28 -08:00
Wez Furlong 5261f9f3d8 Enable mouse reporting
There's a bit of restructuring of XCB event handling going on to enable
this, and we only support SGR reporting at the moment.
2018-02-04 20:53:03 -08:00
Wez Furlong f89d37401b Enable viewing the scrollback
Both mouse wheel and shift+{PageUp,PageDown} can be used to adjust
the scroll viewport.
2018-02-04 14:19:12 -08:00
Wez Furlong 4c8e3ffd75 improve clustering and cursor rendering
We weren't quite right with handling the cursor around double-width
characters.  We're now a bit more robust at this because we're
clustering and taking pains to consider the printable width of the
cell as well as the width of the shaped (eg: with contextual ligatures)
glyph.

There may still be issues with contextual ligatures of length 3,
but I haven't managed to nail down exactly the issue yet.
2018-02-04 08:28:32 -08:00
Wez Furlong 11e6d538fc move term to its own crate
This makes it harder to accidentally violate separation of concerns.
2018-01-31 10:50:21 -08:00
Wez Furlong 12a839c4ac Adopt slice patterns for parsing CSI 2018-01-28 13:36:17 -08:00
Wez Furlong 1ae85b2349 send keyboard input to the pty 2018-01-27 21:54:57 -08:00
Wez Furlong f879447d59 add xgfx::Connection, store atoms inside it 2018-01-27 14:49:15 -08:00
Wez Furlong ec3c8f04ba move TerminalWindow into its own file 2018-01-27 14:29:07 -08:00
Wez Furlong 8080718c71 Listen for sigchld 2018-01-27 13:41:45 -08:00
Wez Furlong a11a34b031 We're now able to run and render top 2018-01-27 13:38:26 -08:00
Wez Furlong e63f003ad0 move the pty into the TerminalWindow 2018-01-27 08:43:08 -08:00
Wez Furlong eef4487d27 plumb XCB events into the mio loop 2018-01-27 08:18:55 -08:00
Wez Furlong ab74b4c731 proof of concept with having mio drive the pty reads 2018-01-26 09:00:40 -08:00
Wez Furlong 0ecda48f01 Add some code for working with ptys 2018-01-26 08:23:32 -08:00
Wez Furlong 3484b94435 Allow setting full RGB foreground/background color 2018-01-25 21:37:16 -08:00
Wez Furlong 3ec0b3f795 connect model to display, hook up print + some basic SGR 2018-01-24 22:28:03 -08:00
Wez Furlong 342efa810b cell attributes to bitfield, add screen container 2018-01-24 09:13:03 -08:00
Wez Furlong 7e41bb27d4 Add basic attribute setting and rendering 2018-01-23 23:12:30 -08:00