1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-28 07:55:03 +03:00
Commit Graph

864 Commits

Author SHA1 Message Date
Wez Furlong
c5fcfc497c dirty all of the terminal lines when scaling changes 2019-02-23 13:27:59 -08:00
Wez Furlong
f5d688c941 remove now-unused function 2019-02-23 13:08:47 -08:00
Stephane Fontaine
e986ec99f9 remove non needed non-snake-case attributes 2019-02-23 13:04:39 -08:00
Stephane Fontaine
573c7a1aee [travis/linux] Build our own harbuzz again
Needs 1.0.5 but xenial has 1.0.1 -_-
2019-02-23 13:04:39 -08:00
Stephane Fontaine
41314a0deb rustfmt 2019-02-23 13:04:39 -08:00
Stephane Fontaine
e0c83597f1 [travis/linux] move to xenial
we need non ancient version of harfbuzz & xkbcommon
2019-02-23 13:04:39 -08:00
Stephane Fontaine
81d88f1839 rustfmt 2019-02-23 13:04:39 -08:00
Stephane Fontaine
272bfdfb1a trim down key translation 2019-02-23 13:04:39 -08:00
Stephane Fontaine
0fda08693f Return early in process key event 2019-02-23 13:04:39 -08:00
Stephane Fontaine
5dcbd89b9b refactor locale query 2019-02-23 13:04:39 -08:00
Stephane Fontaine
92fe601151 Keep calm, don't panic! 2019-02-23 13:04:39 -08:00
Stephane Fontaine
d233b0f871 Prevent spurious xkb event dispatching
Thnks to the fact that all windows share the same `keyboard` instance
2019-02-23 13:04:39 -08:00
Stephane Fontaine
9981c2d4eb update .travis.yml with xkbcommon dep 2019-02-23 13:04:39 -08:00
Stephane Fontaine
799b0128f7 Add xkbcommon to dependencies 2019-02-23 13:04:39 -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
826a0df380 add helper for calling from TabHost -> TerminalWindow 2019-02-23 00:35:49 -08:00
Wez Furlong
26d7ed9cbf add ctrl +/- font size support to x11 backend
Closes https://github.com/wez/wezterm/issues/2
2019-02-22 23:53:15 -08:00
Wez Furlong
92bb685c0c adjust status/features section of the readme 2019-02-22 22:21:40 -08:00
Wez Furlong
0b4ae38417 remove outdated benchmarks
I ran some numbers on the current build and we're a bit slower
today than we were when I last ran benchmarks.  We've grown
more state in the CellAttributes that we manage so the profiler
shows those as relatively hot spots.

Performance is now on par with iTerm2 (w/ Metal Renderer) on macos
honestly now a little slower than vte based terminals, but still faster
than xterm (everything is faster than xterm!)

Alacritty is impressively holding its own at the front of the pack,
even with scrollback.

There's room for improvement in wezterm, but it still feels fine,
so perf isn't currently top of my list.

Closes https://github.com/wez/wezterm/issues/20
2019-02-22 22:09:34 -08:00
Wez Furlong
819bc247a0 micro optimize clearing a line
Turns out to be faster to clear and then resize than it is to
resize down and manually assign the elements
2019-02-22 21:52:18 -08:00
Wez Furlong
a022d3856a micro optimize setting up the storage length
SmallVec::resize showed up as a hot spot in the profiler
2019-02-22 21:14:37 -08:00
Wez Furlong
983eca1209 enable debug symbols in release builds 2019-02-22 20:59:03 -08:00
Wez Furlong
5dad7019da fixup some warnings on linux 2019-02-22 20:33:07 -08:00
Wez Furlong
b448cfec4d fix shift-insert for paste on linux
the match guard was applying to both arms, so break
this into two separate matches
2019-02-22 20:31:04 -08:00
Wez Furlong
273b903222 upgrade from alpha -> beta, note mac and windows support 2019-02-22 19:01:49 -08:00
Wez Furlong
d113068fb0 add default_prog configuration option
@PedroHLC request this and it is easy enough to add, and gave me
the opportunity to clean up some code a little bit.
2019-02-22 18:48:38 -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
7277559abc fixup linux build for changes I made over on macOS 2019-02-22 15:58:19 -08:00
Wez Furlong
332b0faeaa CoreText renderer is now the default on macOS
I've added dingbats to the fallback list on macos as that is needed
for some symbols we use in tools at work.

With that, and some tweaks for allowing for missing letter glyphs
when loading a symbol font as a fallback, we can make that the
default for macOS

Closes https://github.com/wez/wezterm/issues/5
2019-02-22 15:51:36 -08:00
Wez Furlong
c818225a5d ctrl|cmd +/- to manipulate font size with glutin backend
Simliar code needs to be added to the x11 backend in a follow on
commit.

Refs: https://github.com/wez/wezterm/issues/2
2019-02-22 15:22:31 -08:00
Wez Furlong
89da009dce Adjust for high dpi displays with the glutin backend
This results in a less blurry display.
As a bonus, this lays down some plumbing for changing the font
size on the fly.

Refs: https://github.com/wez/wezterm/issues/2
2019-02-22 15:22:27 -08:00
Wez Furlong
7e2e48dadc add default metrics accessor to FontConfiguration struct 2019-02-22 15:21:07 -08:00
Wez Furlong
61801eba9c improve non-harfbuzz ft shaping performance 2019-02-22 15:21:07 -08:00
Wez Furlong
c4c7b65933 fixup shaping of emoji when not using harfbuzz 2019-02-22 15:21:07 -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
a5b5f82c6c font fallback now also applies to italic, bold etc.
This means that emoji now render when the text is italic
2019-02-20 20:52:46 -08:00
Wez Furlong
7e2b4f006d rustfmt 2019-02-20 20:52:36 -08:00
Wez Furlong
42fb687759 more fun with keyboard input with glutin/winit
There isn't really any reliable consistency in the virtual_keycodes
being set for simple keys or shifted keys, so we need to go all in
and add our own scancode processing as a fall back.

This makes it even harder to process unicode input, particularly
because we have no idea whether a ReceivedCharacter event will
follow.
2019-02-20 20:30:19 -08:00
Wez Furlong
b0f7a9d797 inching towards sane emoji rendering with glutin frontend 2019-02-20 17:44:35 -08:00
Wez Furlong
e976f1872a ugh, unbreak shifted letters and numbers
Hopefully a happy medium in the short term.  Need a good story around
IME/international input.
2019-02-20 10:17:37 -08:00
Wez Furlong
b256884a8f revise config example in the readme 2019-02-20 09:06:26 -08:00
Wez Furlong
9fa376d2a3 Add command line override for font system 2019-02-20 09:01:36 -08:00
Wez Furlong
8c821bc9e6 Allow specifying the gui system via the cli 2019-02-20 08:53:59 -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
50a882874a ensure we're using a current context when querying surface dimenions
https://github.com/wez/wezterm/issues/19 is a case where a user
runs in this; it seems particular to their opengl implementation
so I can't reproduce it locally.

@Lompik suggests that this resolves the issue, and it doesn't seem
to hurt, so let's apply it!
2019-02-20 07:05:35 -08:00
Wez Furlong
36be587bb9 fixup glutin keypress dispatching
on macos we were receiving unicode text in addition to the scan codes.
This is mostly undesirable, except when it's not
(see https://github.com/wez/wezterm/issues/18)

This diff ignores the unicode input stream and manually decodes
the keys from an english keyboard.
2019-02-20 01:03:08 -08:00
Wez Furlong
6a617aefbb remove coverage bits from travis build
I don't find them valuable and they make it harder for travis
to run on multiple operating systems.
2019-02-19 23:59:02 -08:00
Wez Furlong
99ff395a9a restore spawning windows on x11
compiled but untested
2019-02-19 23:55:29 -08:00
Wez Furlong
314f7cc103 Allow runtime selection of gui system
This allows choosing between X11 and Glutin, which simplifies some
conditional code and allows some short term flexibility on unix
systems.  However, what it really opens up is running a future
headless server mode (think: tmux).

This change comes with the cost of temporarily breaking creating
a new window on x11.
2019-02-19 23:39:13 -08:00
Wez Furlong
feb0af7ca8 traitify bits of futurecore 2019-02-19 22:57:39 -08:00