1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-24 07:46:59 +03:00
Commit Graph

215 Commits

Author SHA1 Message Date
Wez Furlong
5b126b3f1e Restore fullscreen toggle hotkey and fixup for macos 2019-02-23 13:27:59 -08:00
Stephane Fontaine
b94527664f Initial xkbcommon support
Remove detailed xcb select event hack

Only remove consumed "mod5" for now

which is AltGr.

Get actual modifiers from xkb.

it should enable 1:1 match with user's xmodmad

[clippy] allow keys deadcodes

handle mods & keys separately. Allows passing down `ctrl+2`

state.key_get_utf8 will interpret ctrl+2 (or @, space, ~) to 'ctrl \u{0}'

no need to wait for events.

+ Send delete as enum variant not by char value

Hook XKeysym to termwiz::KeyCode

prefer dealing with chars instead of utf8

Actually this breaks multi unicode characters .. such as J́
Others can be found with
perl -lane '/"\s+#/ && print' < /usr/share/X11/locale/en_US.UTF-8/Compose

Anyway we will need to return a Vec of chars for those.

cleanup

apply rustfmt

query locale via libc
2019-02-23 13:04:39 -08:00
Wez Furlong
983eca1209 enable debug symbols in release builds 2019-02-22 20:59:03 -08:00
Wez Furlong
d35dd3721b fixup macos build on !wez's laptop
Refs: https://github.com/servo/rust-harfbuzz/pull/128
2019-02-22 17:59:48 -08:00
Wez Furlong
97096ffc5d implement coretext font rendering
This uses harfbuzz for shaping and thus can render both emoji and
ligatures

Refs: https://github.com/wez/wezterm/issues/5
2019-02-22 15:21:04 -08:00
Wez Furlong
b0c2704118 clap -> structopt
This looks like it will help with some enum parsing
2019-02-20 07:54:31 -08:00
Wez Furlong
98275e78e1 update various crate versions 2019-02-19 20:59:14 -08:00
Wez Furlong
571562351d migrate wezterm to 2018 edition 2019-02-18 23:17:33 -08:00
Wez Furlong
4c39faffbe use the open crate for url clicking 2019-02-18 22:57:40 -08:00
Wez Furlong
ad55946f07 extract freetype font impl to its own module 2019-02-18 12:52:31 -08:00
Wez Furlong
418aa1d458 start teaching rusttype about fallback 2019-02-18 10:22:31 -08:00
Wez Furlong
48cd20a7a9 update coretext dep version 2019-02-18 09:23:18 -08:00
Wez Furlong
4aa1e65505 upgrade glium+glutin to get macos rendering in the center of the window
This makes macos basically usable!
2019-02-18 02:37:05 -08:00
Wez Furlong
dc8af0c2bc basic, comical looking macos support via glium/glutin 2019-02-18 00:34:02 -08:00
Wez Furlong
d69c718a73 use the clipboard crate
This removes some tricksy code in favor of a third party crate,
which unlocks the clipboard on windows.  I'm not sure how well
this will work on the pure x11 impl yet.
2019-02-17 18:49:22 -08:00
Wez Furlong
de52ce356d don't build mio on win32 2019-02-17 14:37:07 -08:00
Wez Furlong
ad41cecd6e make harfbuzz dep optional 2019-02-17 12:55:02 -08:00
Wez Furlong
c650cbbf08 flesh out some of the windows pty impl 2019-02-16 23:46:18 -08:00
Wez Furlong
12e2dcd181 add incomplete shaping plumbing 2019-02-16 17:12:54 -08:00
Wez Furlong
a4e1bd827e start integrating rusttype and font_loader for windows 2019-02-16 16:15:39 -08:00
Wez Furlong
d95da9c159 add feature to force building with glutin on linux
this helps me verify from WSL that I didn't break compilation in
the refactoring to follow
2019-02-16 09:27:22 -08:00
Wez Furlong
9bc99f5f1c tweak windows imports 2019-02-16 08:54:24 -08:00
Wez Furlong
1ec7feb7fa add glium dep for windows 2019-02-16 00:12:41 -08:00
Wez Furlong
3090d5c6f4 update freetype and improve loading of emoji fonts on ubuntu 18.04 2018-09-19 17:53:13 -07:00
Wez Furlong
e2461b2380 add concept of implicit hyperlink to termwiz
Moves that functionality from wezterm+term into termwiz
2018-08-05 09:13:55 -07:00
Wez Furlong
381e572700 relax some of the dep requirements 2018-08-04 15:35:38 -07:00
Wez Furlong
b7a095ef3f Update to use termwiz hosted on github 2018-08-04 09:46:46 -07:00
Wez Furlong
f37de9cbe5 use termwiz to replace most of the escape parsing 2018-08-03 22:37:04 -07:00
Wez Furlong
6efce9943c std::env::home_dir is deprecated, use an alternative 2018-07-11 08:29:11 -07:00
Wez Furlong
41cfcfdb15 Bring back my original xcb+egl window bits 2018-03-04 07:27:18 -08:00
Wez Furlong
079ac49c6b add guiloop as indirection over glutinloop
... and remove dep on glutin.  We don't properly compile yet,
but this is a step to bringing back the egl bits we had originally.
2018-03-03 22:03:12 -08:00
Wez Furlong
048a6403bc Start building out future executor 2018-03-03 08:14:34 -08:00
Wez Furlong
60e89f6328 Fix latency issue with clipboard/selection handling
We now use mio to select on both the xcb connection and the
channel that we're using to bridge the threads.
2018-02-27 23:56:20 -08:00
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
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
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
5a7a543050 since glutin is pulled in anyway, simplify the glium dep 2018-02-20 22:55:16 -08:00
Wez Furlong
dca8b734e9 Use glium + glutin on !linux 2018-02-20 22:48:23 -08:00
Wez Furlong
c39dbdc356 stubs for macos font loading 2018-02-20 22:33:09 -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
3a66f29775 remove some unused feature flags 2018-02-20 07:39:15 -08:00
Wez Furlong
20965e786f start hacking on OpenGL ES2 rendering 2018-02-16 21:44:56 -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
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
a49e4b653b fix an issue with CR processing
This eliminates the zsh reversed % artifact issue.

Added a feature flag to turn on diagnostics even in release mode;

`cargo run --release --features debug-escape-sequences`
2018-01-31 19:00:15 -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
be30b1cb54 there's already a wterm, rename to wezterm 2018-01-28 23:52:21 -08:00
Wez Furlong
dbeda14566 Add ShmImage, a shared memory Pixmap
Using the SHM extension of the X server saves us from sending ~1MB of
bitmap data to the server on many screen update operations for a
modestly sized terminal window.

SHM may not be available in some situations so we need to keep a
fallback that basically works.  This is done via a helper enum
in xwin.rs.

I've removed the unused Pixmap class; the pixmap concept makes the
most sense for us only when SHM is available.
2018-01-28 09:43:36 -08:00
Wez Furlong
1ae85b2349 send keyboard input to the pty 2018-01-27 21:54:57 -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
641e85650d add terminal cell and colors 2018-01-23 08:57:59 -08:00
Wez Furlong
fb53f2c16b remove cairo dependency
It's a PITA to make it work with pixels without scaling and blurring
2018-01-22 18:54:18 -08:00
Wez Furlong
aef4e340e8 add xcb_util, set window name 2018-01-22 09:02:28 -08:00
Wez Furlong
aa18b273f9 remove sdl. use cairo + xcb
The spacing between glyphs seems too wide.  Need to figure this out.
A bunch of the integer vs float changes in this diff were a result
of trying to run this down, but success has been limited, and in fact
the spacing has increased as a result of making this more correct(!)
2018-01-21 01:32:59 -08:00
Wez Furlong
67c04e7a2a start playing around with xcb+cairo 2018-01-20 14:54:11 -08:00
Wez Furlong
144d8cc3eb start pulling in cairo 2018-01-18 07:20:29 -08:00
Wez Furlong
79bf022f68 move font code into main source
Initially I wanted to make the font code separate from
the main wterm executable in the hope that it would be
reusable.  However, we do need to be able to reach in
to both the font implementation and the SDL texture
implementation in order to capture the glyph data
into textures, so let's just embrace it all being
in the same crate.
2018-01-16 23:32:23 -08:00
Wez Furlong
611e4b3505 fixup bearing_x handling and unicode width
Trigger x-scaling based on the x_advance rather than the bitmap width.
Also account for the unicode width of the fragment when scaling.

The use of bearing_x was incorrect; we were subtracting it rather
than adding it and making the glyphs look terrible at smaller sizes.
2018-01-16 22:50:47 -08:00
Wez Furlong
02bab4fcc7 Add fontconfig support to locate fonts
Also restructure things a little bit to facilitate more robust
fallback implementation.
2018-01-15 17:32:31 -08:00
Wez Furlong
d82860ef5a Render text on sdl using harfbuzz and freetype 2018-01-14 23:34:59 -08:00