1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-21 11:50:42 +03:00
Commit Graph

2231 Commits

Author SHA1 Message Date
Wez Furlong
b13ef15f28 Revise doc build for recent CI changes 2020-05-03 17:14:46 -07:00
Wez Furlong
7018720d97 docs: centralize doc building logic to ci script 2020-05-03 16:28:12 -07:00
Wez Furlong
ba804589fd Generate builds for more platforms
tweak some container names

fixup container names and regenerate the config

Ensure that curl is installed

the rust toolchain stuff wants curl

run apt update before apt install

centralize updating apt, and install sudo

revise get-deps script for slimmer debian images

more container related tweaks

get-deps: Don't require lsb-release on debianish systems

more get-deps improvements

Explicitly ask GH actions to recursively checkout the repo

Explicitly install git

fetch tags and tweak git build for debian systems

moar adjustments

remove deb8 (its wayland is too old), fixup debian publish

Ensure git build deps are installed always, tidy up sudo usage
2020-05-03 15:11:35 -07:00
Wez Furlong
cec3b457b6 Update changelog to reflect changes since last release 2020-05-03 10:45:43 -07:00
Wez Furlong
d3cb27129c upgrade to latest smithay client toolkit
This version greatly improves the client side decoration handling
under Wayland and allows rendering the window title in the titlebar
(shocker!).
2020-05-03 10:31:30 -07:00
Wez Furlong
fa32457656 cargo fmt 2020-05-02 17:39:45 -07:00
Wez Furlong
94bccf1dfb fix compilation on windows 2020-05-02 17:04:28 -07:00
Wez Furlong
7f131fa406 fix infinite recursion when enable_tab_bar is disabled
We need to gate with the config generation check as update_title
can be called during the configuration reloading process and
the tab bar state may not reflect the config until after the
config is reloaded!

refs: https://github.com/wez/wezterm/issues/173
2020-05-02 16:04:34 -07:00
Wez Furlong
a32cc31bc9 cargo update 2020-05-02 12:13:10 -07:00
Wez Furlong
14c73f7122 window: linux: set window icon
Teach the window layer about window icons and implement the
plumbing for this on X11.

For Wayland there is no direct way to specify the icon; instead
the application ID is used to locate an appropriate .desktop filename.
We set the app id from the classname but that didn't match the installed
name for our desktop file which is namespaced under my domain, so change
the window class to match that and enable the window icon on Wayland.

refs: https://github.com/wez/wezterm/issues/172#issuecomment-619938047
2020-05-02 12:07:34 -07:00
Wez Furlong
8511bda6cf window: Adjust some debug logging
https://github.com/wez/wezterm/issues/172#issuecomment-619935565
interpreted these as errors but they're really just informational
messages.
2020-05-02 09:32:08 -07:00
Wez Furlong
ea401e1f58 term: add implicit SGR reset when switching alt screen
This was a bit of a pain to track down because this behavior
isn't specified anywhere or called out explicitly.

The issue is that if you use a true color escape sequence such as

```bash
printf "\x1b[38;2;255;100;0mTRUECOLOR\n"
```

the active color would remain active when switching between the
primary and the alt screen until something (eg: `ls --color`) changed
it again.

I hadn't run into this because in my prompt, many many years ago, I had
it set to perform an SGR reset (`\x1b[0m`) as the first thing to ensure
that the shell is in a saner state.

For users that don't do this they end up with a weird looking color
bleed effect.

refs: https://github.com/wez/wezterm/issues/169
2020-04-18 19:26:54 -07:00
Wez Furlong
c634f35b05 cargo update 2020-04-15 08:24:11 -07:00
Wez Furlong
92035e7704 tabout: bump version for termwiz bump 2020-04-15 08:24:11 -07:00
Wez Furlong
b9b0b2b4b0 docs: add wezterm start -- vim ~/.wezterm.lua example
Refs: https://github.com/wez/wezterm/issues/168
2020-04-12 15:10:11 -07:00
Wez Furlong
f1192471fb wezterm: lua: run_child_process CREATE_NO_WINDOW
On windows, prevent console subsystem processes spawned by
lua (such as the `wsl -l` example configuration) from momentarily
popping up and stealing the focus.  This was happening too fast
to see in most cases, but could cause the wezterm window to momentarily
repaint its title bar with lose focus before regaining it.
2020-04-12 10:49:17 -07:00
Wez Furlong
bb9504d626 wezterm: make config error window a singleton
This fixes an annoyance with the configuration error window;
previously we would spawn a new window for each error that
was discovered in the config, which cluttered up the screen
and felt irritating when iterating on the config file.

This commit reuses the connection status UI infra to make a
single persistent error log window.
2020-04-12 10:33:31 -07:00
Wez Furlong
785d41e140 launch menu: add fancy example for windows
This commit adds some helper functions that make it possible to
dynamically discover and add WSL distributions to the launcher
menu.

refs: https://github.com/wez/wezterm/issues/159
2020-04-12 08:51:11 -07:00
Wez Furlong
4858194ef4 wezterm: lua: add glob and read_dir
These functions are useful when dynamically constructing configuration.
2020-04-11 19:21:52 -07:00
Wez Furlong
2ddf73bdda docs: font size and dpi are floating point
TOML didn't care about this, but lua does.  Fixup docs.
2020-04-11 17:32:48 -07:00
Wez Furlong
065e6e7742 add launch_menu section to the configuration
refs: https://github.com/wez/wezterm/issues/159
2020-04-11 17:31:55 -07:00
Wez Furlong
b3a57f0d1c termwiz: line editor: fix a couple of bugs
* ctrl-R to find a line and then hit enter would cause the search
  text rather than the match text to be returned and run!
* When exiting the editor, clear to end of screen to make sure
  that we clean up any UI from the incremental search status
2020-04-10 21:10:42 -07:00
Wez Furlong
d4df39f793 termwiz: line editor: add ChangeSequence helper
This helps us keep track of the extent and cursor position that
we render for the line editor, making it easier to make the editor
rendering more fancy.
2020-04-10 20:42:02 -07:00
Wez Furlong
8963fb76aa termwiz: line editor: add incremental history search 2020-04-10 11:02:59 -07:00
Wez Furlong
79007d9c33 termwiz: line editor: allow custom editor actions
This restructures the LineEditor to allow the hosting application to
override key presses and apply custom edits to the editor buffer.

Methods for performing predefined actions and for accessing the line
buffer and cursor position have been provided/exposed to support this.

One consequence of this change is that the editor instance needs to be
passed through to the host trait impl and that means that the LineEditor
can no longer be generic over `Terminal`.  Instead we now take `&mut dyn
Terminal` which was how the majority of non-example code was using it in
any case.  This simplifies a bit of boilerplate in wezterm but adds an
extra line to the most basic examples.
2020-04-09 07:37:23 -07:00
Wez Furlong
eb1f583e2b termwiz: line editor: allow embedded app to override key map 2020-04-09 06:40:29 -07:00
Wez Furlong
e033e3576f termwiz: History::get() -> Option<Cow<str>>
The BasicHistory impl returned a borrowed reference but the sqlite based
impl I'm adding to wzsh needs to own it.
2020-04-08 22:32:14 -07:00
Wez Furlong
af339f7cfe termwiz: line editor: allow application cursor keys
On Windows, if you run `wsl.exe` from the terminal and start zsh
(maybe bash also?) and it enables application cursor key mode,
exiting zsh doesn't clear application cursor key mode and when we
return to the shell and are using virtual terminal input rather
than the native windows console input, we'll continue to receive
application cursor key sequences instead of regular cursor key
input sequences.

This commit recognizes both flavors as arrow movement
in the line editor to make this feel less broken.
2020-04-08 19:11:15 -07:00
Wez Furlong
5b57f5f9ff termwiz: line editor: exit completion state for a single completion result 2020-04-08 10:07:15 -07:00
Wez Furlong
11c7e29b59 termwiz: windows: toggle autonewline when toggling cooked/raw
Without this, `wzsh` will keep the terminal in raw mode between
line editor invocations, resulting in staggered/stairway output
for any spawned commands.
2020-04-08 08:57:26 -07:00
Wez Furlong
db845db55b termwiz: line editor: allow for multi-line prompts 2020-04-07 22:06:05 -07:00
Wez Furlong
22250662b3 docs: fix typo 2020-04-07 08:49:14 -07:00
Wez Furlong
3ead0906a2 docs: more tweaks 2020-04-07 08:45:57 -07:00
Wez Furlong
38937ce1c3 docs: add more information about the available lua functions 2020-04-07 08:37:40 -07:00
Wez Furlong
56f20d3b80 docs: add missing lua marker to code block 2020-04-07 07:39:00 -07:00
Wez Furlong
912af724f9 docs: add js fixup to the deploy action too 2020-04-06 17:47:57 -07:00
Wez Furlong
d27b9382be docs: add missing lua language markup 2020-04-06 17:41:10 -07:00
Wez Furlong
ae5cfec1f4 docs: enable syntax highlighting for lua
This is a bit gross, but it works!
2020-04-06 17:39:57 -07:00
Wez Furlong
ffa4925da4 docs: update for lua configuration syntax 2020-04-06 16:32:16 -07:00
Wez Furlong
6457dfa0af Update changelog 2020-04-06 15:25:46 -07:00
Wez Furlong
5b700e4d5d wezterm: recognize MS terminal mode 25 for cursor visibility 2020-04-06 13:19:44 -07:00
Wez Furlong
61e3545c68 pty: windows: allow loading a newer conpty dll
This commit allows loading the console functions from `conpty.dll`
instead of `kernel32.dll` which means that we can update and
track newer features than have been deployed to Windows.

In practical terms this means that we can now unlock mouse input
reporting in eg: VIM running under WSL.
refs: https://github.com/microsoft/terminal/issues/376

We're jumping the gun on this issue, which is tracking making
a proper supportable way to deploy this sort of update:
refs: https://github.com/microsoft/terminal/issues/1130

For now it seems easier just for us to bundle our own copy of
these bits.

This includes a speculative change to include those in our
Windows downloads also.

The binaries were built from
4f8acb4b9f
2020-04-06 12:48:54 -07:00
Wez Furlong
d98fee9e0b termwiz: windows: allow ESC to be recognized again
After processing a batch of input records, we need to effectively
flush any pending ambiguous sequences in order to register a lone
ESC key press.
2020-04-06 10:13:49 -07:00
Wez Furlong
b279bb68e0 termwiz: windows: auto-detect virtual terminal support
With the revised native windows console renderer using the various
console APIs more deeply, I've seen a couple of cases where those
API calls fail inside eg: wezterm running via the new pty machinery.

Using the virtual terminal APIs and the terminfo renderer is the
right thing to do in that case.

This commit probes for virtual terminal support and uses the builtin
xterm terminfo, unless the environment has
`TERMWIZ_BYPASS_VIRTUAL_TERMINAL=1` set.  This allows forcing the
use of the windows console layer.
2020-04-06 09:51:15 -07:00
Wez Furlong
92fa32695c termwiz: windows: fixup viewport handling
Some windows APIs have inclusive dimensions and some exclusive;
we were off by one for the height of the display which led to some
weirdness with eg: `sp` and the line editor.

When it comes to scrolling: if the scroll request is for the entire
viewport then we simply adjust the viewport; this is desirable because
it allows data to scroll back into the history in the native console.
2020-04-06 09:33:52 -07:00
Wez Furlong
290bc5567e termwiz: windows: tidy up flushing a bit 2020-04-06 07:52:56 -07:00
Wez Furlong
03ab5ea659 termwiz: windows: fix bounds check for cursor positioning 2020-04-05 21:00:54 -07:00
Wez Furlong
58c07b6da0 termwiz: line editor: fixup cursor positioning for multiline
This fixes the math around cursor positioning for the edge case where
the width of text and the cursor position are close to the width of
the terminal.
2020-04-05 20:46:41 -07:00
Abby Edwards
1b2baa5f76 Preserve clipboard contents on single left click 2020-04-05 19:32:59 -07:00
Wez Furlong
96880a08b4 termwiz: improve performance of windows console renderer
This reduces flickering updates in the native windows console;
it works by taking a copy of the screen buffer, applying the
Change's to that buffer and then copying back to the console.
2020-04-05 19:15:48 -07:00