2018-02-07 08:32:40 +03:00
# Wez's Terminal
2019-02-23 06:01:49 +03:00
A terminal emulator implemented in Rust, using OpenGL for rendering.
2018-02-07 08:32:40 +03:00
2018-02-21 00:50:45 +03:00
[![Build Status ](https://travis-ci.org/wez/wezterm.svg?branch=master )](https://travis-ci.org/wez/wezterm)
2018-02-20 09:10:59 +03:00
![Screenshot ](screenshots/one.png )
2018-02-20 09:15:11 +03:00
*Screenshot of wezterm on X11, running vim*
2018-02-07 08:32:40 +03:00
## Quickstart
2018-08-06 03:04:37 +03:00
* Install `rustup` to get the `rust` compiler installed on your system.
2018-02-07 08:32:40 +03:00
https://www.rust-lang.org/en-US/install.html
2018-08-06 03:04:37 +03:00
* Build in release mode: `cargo build --release`
* Run it via either `cargo run --release` or `target/release/wezterm`
2018-02-07 08:32:40 +03:00
2018-02-26 08:09:21 +03:00
You will need a collection of support libraries; the [`get-deps` ](get-deps ) script will
attempt to install them for you. If it doesn't know about your system,
[please contribute instructions! ](CONTRIBUTING.md )
2018-02-07 09:24:36 +03:00
```
2018-08-04 08:37:04 +03:00
$ curl https://sh.rustup.rs -sSf | sh -s
2018-02-21 00:17:23 +03:00
$ git clone --depth=1 --branch=master https://github.com/wez/wezterm.git
$ cd wezterm
2018-02-25 20:29:43 +03:00
$ sudo ./get-deps
2018-08-06 03:04:37 +03:00
$ cargo build --release
2019-03-14 04:36:00 +03:00
$ cargo run --release -- start
2018-02-07 09:24:36 +03:00
```
2017-12-07 19:20:29 +03:00
## What?
Here's what I'm shooting for:
* A terminal escape sequence parser
2018-02-07 08:32:40 +03:00
* A model of a terminal screen + scrollback that is OS independent
* Textual and GUI rendering of the model
* A differential protocol for the model
2017-12-07 19:20:29 +03:00
This would manifest as a common core that could run as both a textual
terminal multiplexer and a gui terminal emulator, where the GUI part
could automatically provide a native UI around the remotely multiplexed
terminal session.
2019-02-23 06:01:49 +03:00
## Status / Features - Beta Quality
2018-02-25 20:36:27 +03:00
*There may be bugs that cause the terminal to panic. I'd recommend using
`tmux` or `screen` to keep your session alive if you are working on something important!*
Despite the warning above, I've been using `wezterm` as my daily driver since
2018-02-26 08:12:24 +03:00
the middle of Feb 2018. The following features are done:
2018-02-07 08:32:40 +03:00
2019-02-23 09:21:40 +03:00
- [x] Runs on
2019-02-27 22:12:54 +03:00
* Linux under X (requires OpenGL ES 3)
2019-02-23 09:21:40 +03:00
* macOS
* Windows 10 with [ConPty ](https://blogs.msdn.microsoft.com/commandline/2018/08/02/windows-command-line-introducing-the-windows-pseudo-console-conpty/ )
2018-02-07 08:32:40 +03:00
- [x] True Color support
2018-02-20 09:15:11 +03:00
- [x] Ligatures, Color Emoji and font fallback
2019-02-23 09:21:40 +03:00
- [x] Hyperlinks per: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
- [x] Scrollback (use mouse wheel and Shift Page{Up|Down})
2018-02-26 08:09:21 +03:00
- [x] xterm style selection of text with mouse; paste selection via Shift-Insert (bracketed paste is supported!)
2018-02-08 07:18:24 +03:00
- [x] SGR style mouse reporting (works in vim and tmux)
2018-02-26 08:09:21 +03:00
- [x] Render underline, double-underline, italic, bold, strikethrough
2018-02-20 09:15:11 +03:00
- [x] Configuration file to specify fonts and colors
2018-03-05 04:17:37 +03:00
- [x] Multiple Windows (Hotkey: `Super-N` )
- [x] Tabs (Hotkey: `Super-T` , next/prev: `Super-[` and `Super-]` , go-to: `Super-[0-9]` )
2018-02-07 08:32:40 +03:00
There's a good number of terminal escape sequences that are not yet implemented
2018-02-26 08:09:21 +03:00
and that will get fleshed out as the applications I use uncover them, or as folks
2018-02-26 08:12:24 +03:00
report them here and raise the priority. Similarly for key mappings. Please don't
be shy about [contributing support for missing things! ](CONTRIBUTING.md )
2018-02-07 08:32:40 +03:00
2018-02-26 08:12:24 +03:00
Things that I'd like to see happen and that have no immediate priority;
[contributions to get closer to these are welcomed! ](CONTRIBUTING.md )
2018-02-07 08:32:40 +03:00
2018-02-10 02:47:41 +03:00
- [ ] Sixel / iTerm2 graphics protocol support
2018-02-07 08:32:40 +03:00
- [ ] Textual renderer. Think `tmux` or `screen` .
2018-02-26 08:09:21 +03:00
- [ ] Run on Linux with Wayland (use XWayland for now; See https://github.com/tomaka/winit/issues/306 for upstream blockers)
2018-02-07 18:51:04 +03:00
2018-02-10 02:47:41 +03:00
2018-02-07 18:51:04 +03:00
## Configuration
`wezterm` will look for a TOML configuration file in `$HOME/.config/wezterm/wezterm.toml` ,
and then in `$HOME/.wezterm.toml` .
Configuration is currently very simple and the format is considered unstable and subject
2018-02-10 19:43:36 +03:00
to change. The code for configuration can be found in [`src/config.rs` ](src/config.rs ).
2018-02-07 18:51:04 +03:00
I use the following in my `~/.wezterm.toml` :
```
font_size = 10
2019-02-20 20:06:26 +03:00
font = { font = [{family = "Operator Mono SSm Lig Medium"}] }
2018-02-10 20:43:54 +03:00
# How many lines of scrollback to retain
scrollback_lines = 3500
2018-02-07 20:23:24 +03:00
[[font_rules]]
italic = true
2019-02-20 20:06:26 +03:00
font = { font = [{family = "Operator Mono SSm Lig Medium", italic=true}]}
2018-02-08 07:18:24 +03:00
[[font_rules]]
italic = true
intensity = "Bold"
2019-02-20 20:06:26 +03:00
font = { font = [{family = "Operator Mono SSm Lig", italic=true, bold=true}]}
2018-02-08 07:18:24 +03:00
[[font_rules]]
intensity = "Bold"
2018-02-10 19:36:34 +03:00
[font_rules.font]
2019-02-20 20:06:26 +03:00
font = [{family = "Operator Mono SSm", bold=true}]
2018-02-10 19:37:40 +03:00
# if you liked xterm's `boldColor` setting, this is how you do it in wezterm,
# but you can apply it to any set of matching attributes!
2018-02-10 19:36:34 +03:00
foreground = "tomato"
2018-02-08 07:18:24 +03:00
[[font_rules]]
intensity = "Half"
2019-02-20 20:06:26 +03:00
font = { font=[{family = "Operator Mono SSm Lig Light" }]}
2018-02-07 18:51:04 +03:00
```
The default configuration will attempt to use whichever font is returned from
fontconfig when `monospace` is requested.
2018-02-10 19:16:20 +03:00
### Colors
You can configure colors with a section like this. In addition to specifying
SVG/CSS3 color names, you can use `#RRGGBB` to specify a color code using the
2018-02-10 19:42:10 +03:00
usual hex notation; eg: `#000000` is equivalent to `black` :
2018-02-10 19:16:20 +03:00
```
[colors]
foreground = "silver"
background = "black"
2018-02-23 18:52:14 +03:00
cursor_bg = "springgreen"
2018-02-10 19:16:20 +03:00
ansi = ["black", "maroon", "green", "olive", "navy", "purple", "teal", "silver"]
brights = ["grey", "red", "lime", "yellow", "blue", "fuchsia", "aqua", "white"]
```
2018-02-19 19:41:54 +03:00
## Performance
While ultimate speed is not the main goal, performance is important!
Using the GPU to render the terminal contents helps keep CPU usage down
and the output feeling snappy.
2019-02-23 09:09:34 +03:00
If you want the absolute fastest terminal emulator, [alacritty ](https://github.com/jwilm/alacritty )
is currently king of the crop.
2018-02-26 20:08:37 +03:00
## Getting help
This is a spare time project, so please bear with me. There are two channels for support:
* You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one: https://github.com/wez/wezterm/issues
* There is a gitter room for (potentially!) real time discussions: https://gitter.im/wezterm/Lobby
2018-02-26 20:09:41 +03:00
The gitter room is probably better suited to questions than it is to bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.
2018-02-26 20:08:37 +03:00