Wez Furlong
45596f44be
refactor key handling; add KeyAssignment
...
This is a step towards having configurable key bindings
refs: https://github.com/wez/wezterm/issues/32
2019-06-07 21:53:44 -07:00
Wez Furlong
024e1afcda
move CMD-N new window dispatch into guicommon
...
This was blocked by some awkwardness in figuring out which
gui frontend was in use and queueing up the spawn and then
more ugliness in glutin.
That has subsequently been sorted out with the newer executor
stuff, so cut this over.
This is a tiny baby step towards a bigger key binding config
and thus refs: https://github.com/wez/wezterm/issues/32
2019-06-07 20:43:13 -07:00
Wez Furlong
12d49980c8
speculative fix for linux build
2019-06-04 21:34:09 -07:00
Wez Furlong
0c8cba99af
centralize calling Mux::add_tab to Domain::spawn
2019-06-04 08:11:55 -07:00
Wez Furlong
95d2479ea6
gui_executor is intended to be obtainable from any thread
2019-06-04 08:11:55 -07:00
Wez Furlong
d4bc053493
Add Mux::default_domain and use it
...
This tidies up the various spawning call sites and
reduces some code duplication too!
2019-06-04 08:11:55 -07:00
Wez Furlong
f642bd56d6
introduce mux Domain concept
...
All locations that were setting up ptys now do so via the
Domain concept. We still need a way to set up a persistent
global domain.
2019-06-04 08:11:55 -07:00
Wez Furlong
7b8a989e10
point to upstream color schemes repo now that my pr is merged
2019-06-03 20:51:20 -07:00
Wez Furlong
94760653cd
add filetype to code blocks in the readme
2019-06-03 20:49:04 -07:00
Wez Furlong
e9780d6a34
termwiz: bump version for crates.io/streampager
2019-06-02 21:00:26 -07:00
Wez Furlong
43fcca6343
termwiz: ensure that the tty is in blocking mode
...
Refs: https://github.com/markbt/streampager/issues/1
Refs: https://github.com/markbt/streampager/issues/3
2019-06-02 20:36:01 -07:00
Wez Furlong
c0e3bdfb70
termwiz: avoid emitting a wake event on a spurious pipe wakeup
2019-06-02 18:27:15 -07:00
Wez Furlong
ae303fea56
termwiz: avoid emitting a resize event on a spurious sigwinch read
2019-06-02 18:11:07 -07:00
Wez Furlong
d000938fef
emulate poll(2) on macos using select(2)
...
Refs: https://github.com/wez/wezterm/issues/31
2019-06-02 16:15:17 -07:00
Wez Furlong
090c24554f
introduce our own poll function
...
This is just a minor refactoring at this stage
Refs https://github.com/wez/wezterm/issues/31
2019-06-02 14:53:07 -07:00
Wez Furlong
00c1000caa
bump termwiz version for crates.io
2019-06-02 13:55:25 -07:00
Mark Thomas
70741d4f80
set underline and blink in fallback path
...
pull/29 inadvertently removed the fallback path for setting single
underline and slow blink. Restore it.
2019-06-02 13:55:07 -07:00
Wez Furlong
74bbf01014
fix 'already borrowed' panic with large pastes
2019-06-02 13:00:30 -07:00
Mark Thomas
3f16979067
clean up flush_pending_attr
...
The `flush_pending_attr` method does lots of unnecessary comparisons.
If the attributes have changed, then it works by resetting the
attributes and then setting new values. There's no need to emit the
codes for exiting modes.
It also doesn't support double underscore or rapid blink in the cases
where the terminfo capabilities are used, as these capabilities can't
express these attributes. Fall back to CSI sequences when these
attributes are requested.
2019-06-02 12:41:46 -07:00
Mark Thomas
90689d4406
set colors after resetting attributes
...
Changing the terminal attributes (bold, underline, etc.) involves
emitting the `exit_attribute_mode` or SGR reset sequence. This also
resets the colors back to their defaults. If this happens when the
foreground or background colors haven't changed, set the colors again.
2019-06-02 12:41:46 -07:00
Wez Furlong
99919dc807
implement answerback for osc 4, 10-18
...
These codes are used to change the color palette, but if the `?`
string is used in place of a color spec, then we must respond with
the current color value string for that palette entry, so lets
implement that!
2019-06-02 12:19:58 -07:00
Wez Furlong
bf719caaf3
allow using cmd-v to paste on linux
...
This is useful in a vmware vm on macos
2019-06-02 07:44:22 -07:00
Wez Furlong
daac79fe41
Add info about ready-to-use color schemes to the readme
2019-06-01 23:31:17 -07:00
Wez Furlong
8f8d03fc05
support osc 10-19 dynamic color changing
2019-06-01 21:47:25 -07:00
Wez Furlong
276e9aef91
osc 4 accepts multiple parameters
2019-06-01 19:59:44 -07:00
Wez Furlong
4193442ec8
make OSC 4 actually change the palette
2019-06-01 16:15:37 -07:00
Wez Furlong
71fd9c3ed7
thread palette through on each render call
...
This is slightly inefficient in that it copies the palette
for each call, so may want to revisit this if things feel
sluggish.
2019-06-01 16:07:08 -07:00
Wez Furlong
2ec436a4b9
make the frontends get the palette from the terminalstate
...
This isn't complete because it only copies it at startup
into the renderer.
2019-06-01 16:01:00 -07:00
Wez Furlong
6e4db86f7e
add palette to the terminal state
2019-06-01 15:55:08 -07:00
Wez Furlong
d18dbe9ff7
parse OSC 4
...
This code is used to change the color palette at runtime.
We can parse it but not do anything useful with it yet.
2019-06-01 15:39:46 -07:00
Wez Furlong
fb1a5b42d2
bump filedescriptor crate
2019-06-01 08:23:23 -07:00
Wez Furlong
906aa0c95c
termwiz: use filedescriptor crate instead of RawHandle bits
2019-06-01 07:43:06 -07:00
Wez Furlong
38adc117f4
termwiz: use filedescriptor crate instead of RawFd bits
2019-05-31 22:52:40 -07:00
Wez Furlong
45d378565b
probably fixup build for windows
2019-05-29 12:42:20 -07:00
Wez Furlong
98e93ff3a5
Fix a build issue on fedora 30: lib vs lib64
2019-05-29 11:12:32 -07:00
Wez Furlong
3c6552b975
cargo publish wants a.b.c rather than a.b for package.version
2019-05-27 20:09:33 -07:00
Wez Furlong
98bd82e212
bump some deps
2019-05-27 20:08:30 -07:00
Wez Furlong
91ea7cd576
add keywords
2019-05-27 19:57:44 -07:00
Wez Furlong
37f451843c
termwiz: prep for publishing on crates.io
2019-05-27 19:53:52 -07:00
Wez Furlong
3a3755fbe6
moved varbincode to its own repo
2019-05-27 19:44:55 -07:00
Wez Furlong
5976e8d229
lineedit: add tab completion support
2019-05-27 17:39:10 -07:00
Wez Furlong
330c8e8c1f
lineedit: add ctrl-d -> EOF
2019-05-27 16:17:49 -07:00
Wez Furlong
a94c802a74
lineedit: add history
2019-05-27 13:35:24 -07:00
Wez Furlong
2b85d5dca4
termwiz: introduce host concept, prompt and coloring
...
The LineEditorHost trait allows colorizing the line editor.
2019-05-27 12:42:19 -07:00
Wez Furlong
fb5d0464fb
lineedit: ctrl-c cancels the current line
2019-05-27 10:29:22 -07:00
Wez Furlong
3e24ef2ea8
cargo fmt
2019-05-27 10:20:33 -07:00
Wez Furlong
0d2bbcfce6
lineedit: add ctrl-w to delete word up to cursor
2019-05-27 09:21:19 -07:00
Wez Furlong
56885e5bad
lineedit: add word movement commands
2019-05-27 09:18:36 -07:00
Wez Furlong
0f3869be16
lineedit: implement ctrl-k and fixup deletion of emoji
2019-05-27 08:17:24 -07:00
Wez Furlong
8a44344937
lineedit: split out action and movement concepts
...
This makes it a bit easier to implement more key bindings and
to make them configurable in the future
2019-05-27 08:02:38 -07:00