1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 12:23:46 +03:00
Commit Graph

4800 Commits

Author SHA1 Message Date
Wez Furlong
8c7072c5ef gui: flesh out test case for wsl -l -v
closes: https://github.com/wez/wezterm/issues/1462
2021-12-27 10:39:26 -07:00
Wez Furlong
780756bea8 gui: don't warn about wsl helper function on unix
Technically is only used on windows, but I'm fine with having
it built and tested on all platforms.
2021-12-27 10:35:11 -07:00
Wez Furlong
ae9a47e8a6 fix unix build for zbus updates 2021-12-27 10:33:41 -07:00
Wez Furlong
7e90a7008c deps: update pulldown_cmark, cargo update 2021-12-27 09:49:22 -07:00
Wez Furlong
4cf90bf7a1 gui: avoid invalidating window when only a modifier key is held down 2021-12-26 12:58:14 -07:00
Wez Furlong
2464e8fb3a gui: use wsl -l -v output for launcher items
Switch to the slightly more structured verbose output of `wsl -l -v`
in the hope that we are less prone to localization issues and
are more robust in the face of future changes.

refs: #1462
2021-12-26 09:19:38 -07:00
Wez Furlong
d51ce704d9 gui: don't use win32 gui subsystem in test configuration
We won't see test output in that case, because the tests won't
be able to write to the console!
2021-12-26 09:16:22 -07:00
Wez Furlong
2e24b0fc22 gui: improve new tab button appearance for fancy tab bar 2021-12-26 08:21:09 -07:00
Wez Furlong
910ad5edb7 mux: add cache around sysinfo
This limits sysinfo process info updates to once per second,
which should help keep tab titles snappier.
2021-12-25 23:15:08 -07:00
Wez Furlong
790b515c21 gui: allow mouse wheel to route to hovered pane
refs: https://github.com/wez/wezterm/issues/798
2021-12-25 15:37:14 -07:00
Wez Furlong
c937f0c77c cargo fmt 2021-12-25 14:01:36 -07:00
Wez Furlong
a1ff2d6415 gui: make another pass over focus/mouse event routing
refs: #1437
2021-12-25 13:59:23 -07:00
Wez Furlong
5bf366f8be logo: crop out padding for linux and windows icons 2021-12-25 13:04:55 -07:00
Wez Furlong
56420205e9 gui: fix over-opacity with split panes and transparent windows
closes: #1459
2021-12-25 12:20:40 -07:00
Wez Furlong
c4257ab8d6 config: fix asymmetric serialization of keycode and modifiers
This adds string serialization for the keycode and modifiers as
used in the config.

We can't simply tell the base types to serialize in this form because
we may serialize and pass those via the mux protocol and the default
derived serializers are more efficient for that purpose.

This allows:

```lua
local wezterm = require 'wezterm'

return {
  keys = {
    {key="a", mods="ALT", action=wezterm.action{SendKey={key="b"}}}
  },
}
```

to parse: previously, wrapping `SendKey` in `wezterm.action` would fail
to round-trip the the `SendKey` and lead to an error loading the
config.
2021-12-25 12:11:59 -07:00
Wez Furlong
a78ff883a9 windows: query the system caption font
Use this for the tab bar font by default
2021-12-25 09:54:31 -07:00
Wez Furlong
714e74e7af fonts: move computation of title font to wezterm-fonts
Rather than hardcode a fixed default value in the config crate, define
the default as optional and leave it to the font crate to compute
the value.

This is a step towards allow introducing system dependent GUI related
code to resolve/understand the title font: we can't put that directly
in the config crate.
2021-12-25 07:49:46 -07:00
Wez Furlong
a0cbea2703 term: ignore first OSC title change sequence on Windows
ConPTY emits a sequence that sets the title to the name of the
program that is initially launched into it.

This commit tries to ignore that sequence in that circumstance,
so that the logic in b5d156c282
can more dynamically set the tab title.
2021-12-25 01:10:37 -07:00
Wez Furlong
b5d156c282 mux: use pgrp leader basename as default pane title
If the pane title is the default `wezterm`, then return the
process basename instead.  This makes the tab titles more useful
by default, although on Windows, conpty will set the title
to the initial executable path and defeat this.
2021-12-25 00:14:31 -07:00
Wez Furlong
153861a639 config: fix default WindowFrameConfig
There was a discrepancy between leaving it out of the config
and having it partially initialized; fix that up.

Make the default title font size larger on !Windows, as it
looks a bit better.

We might need to make this larger size mac specific.

refs: #1180
2021-12-24 18:49:01 -07:00
Wez Furlong
3a628527b7 gui: fix right width of right status area in fancy tab bar
refs: #1180
2021-12-24 18:07:24 -07:00
Wez Furlong
ebaf49ad6b gui: use first cell bg/fg color for fancy tab bg/fg
refs: #1180
2021-12-24 17:42:01 -07:00
Wez Furlong
240382bcf1 gui: fix fancy tab height
Always match the height of the background strip, which is
2*metrics.height.

refs: #1180
2021-12-24 16:34:45 -07:00
Wez Furlong
8eb7c3cff4 gui: fancy tab bars are now the default
Adjust the rendering and coloring a bit to make the defaults
look pretty reasonable.

refs: #1180
2021-12-24 16:23:01 -07:00
Wez Furlong
ac3cee3fc6 kitty: improve debug when image id is not found
Poking around at an issue, and thinking that some more context
might be nice.

Haven't managed to reproduce the issue so far though :-/

refs: https://github.com/wez/wezterm/issues/1156
2021-12-24 13:19:55 -07:00
Wez Furlong
e3be779477 docs: add basename to get_foreground_process_name examples
refs: #1421
2021-12-24 13:09:31 -07:00
Wez Furlong
4a01bf9bf2 font: improve alpha channel in rasterizer
Previously, we'd set it to 100% if any non-zero channel was present,
but this resulted in stronger/darker outlines that were especially
noticeable when the window background was transparent and over a
bright background.

This commit sets the alpha based on the coverage provided to us
by freetype and looks better with and without a transparent window
background.

@dmfay: I think this might be behind what you noticed in your last
comment on #1025.

refs: #1325
2021-12-24 10:39:33 -07:00
Wez Furlong
88b8cb3e21 term: fix overinvalidation of selection on Windows
Not 100% sure why this only really manifested on Windows, but
the symptoms were:

* Run powershell in a tab
* Run `dir`
* Hit enter a couple of times to show a couple of prompts
* Try using the mouse to select across the prompt boundaries

The selection would get invalidated crossing the boundaries.
I traced this down to the lines around those regions having
SEQ_ZERO as their sequence, so this commit ensures that lines
that are created as part of scrolling the screen are correctly
tagged with the current seqno from the terminal display.

Why only windows? Not totally sure; perhaps it is related to
something funky happening in the conpty layer and sending us
unusual escapes (eg: scroll margins?)
2021-12-24 08:53:49 -07:00
Wez Furlong
6c1710f87d mux: remove ProgDomain; just pass down default prog/cwd as appropriate
This allows making these values configurable per-domain in the
future.

refs: #1456
2021-12-24 07:52:02 -07:00
Wez Furlong
a38757ef3b mux: improve process leader heuristics on windows
refs: #1417
2021-12-24 07:21:00 -07:00
Wez Furlong
bd6072b320 avoid default_prog, default_cwd when spawning panes via ssh
refs: https://github.com/wez/wezterm/issues/1456
2021-12-23 23:24:42 -07:00
Wez Furlong
98ff4ff903 docs: note about kitty image protocol support 2021-12-23 21:29:12 -07:00
Wez Furlong
225d15c9aa ActivatePaneDirection now supports Next and Prev
This allows cycling through all the panes in a tab

refs: #976
2021-12-23 21:00:26 -07:00
Wez Furlong
c96c36fb6e docs: explain how to build without Wayland support
refs: https://github.com/wez/wezterm/discussions/1455
2021-12-23 20:30:46 -07:00
Wez Furlong
1d064e0913 Add get_foreground_process_name, expose it and cwd in PaneInformation
Add `get_foreground_process_name` to both Pane and the lua wrapper.

Add `foreground_process_name` and `current_working_dir` fields to
`PaneInformation`.  In order for those to be dynamically fetched,
switch the lua conversion for `PaneInformation` to be a UserData
with field access methods.  It's a little more verbose but allows
us to lazily compute these two new fields.

refs: https://github.com/wez/wezterm/discussions/1421
refs: https://github.com/wez/wezterm/issues/915
refs: https://github.com/wez/wezterm/issues/876
2021-12-23 18:49:17 -07:00
Wez Furlong
38087755e1 quickselect: allow changing label for custom actions 2021-12-23 16:32:20 -07:00
Wez Furlong
b1c58b9376 docs: changelog for #1422
closes: #1422
2021-12-23 14:03:39 -07:00
Wez Furlong
3a5f6f94a6 quickselect: refine out of bounds case
I now understand that it is simply because the number of matches is too
large to be represented by a two character string in the selected
alphabet.
2021-12-23 13:58:10 -07:00
Wez Furlong
d25580d10f cargo fmt 2021-12-23 12:35:20 -07:00
Wez Furlong
0e6c75c026 allow left-button-release to copy to selection when shift is held
This is really a timing issue: if shift-click extension of the mouse
selection is used, the user may release the mouse button slightly
after the SHIFT key (which is fine) or vice versa (which was not
previously matched)

refs: #1204
2021-12-23 12:33:51 -07:00
Wez Furlong
cde8fe0e85 term: don't force zero-width graphemes into cells
This isn't ideal, as we're discarding information, but in #1422
where the problem codepoint is a unicode bidi control, we can't and
don't use that information anyway.

We'll need to figure out how to incorporate that when we get to it.

For now, this makes the presentation work correctly.

refs: #1422
2021-12-23 12:13:38 -07:00
Wez Furlong
4bd29ae5cc gui: fix ringing bell shape
Don't want it to be the block outline

refs: #1432
2021-12-23 11:56:40 -07:00
Wez Furlong
668d41ad5d quickselect: add QuickSelectArgs and helpers for opening urls
This commit expands quick select mode so that you can trigger it
with distinct sets of patterns (eg: urls on one key assignment,
hashes on a different key assignment), different alphabets,
and lastly, the option to perform a different action from
the default copy action.

You can pair this with `action_callback` to run lua code to
do something with the selected text.

This commit also adds `wezterm.open_with`, a helper function
for opening documents/URLs.

refs: #846
refs: #1362
2021-12-23 10:55:44 -07:00
Wez Furlong
6a265d9f72 new ActivateTabRelativeNoWrap key assignment
refs: #1414
2021-12-23 09:32:49 -07:00
Wez Furlong
3856a61527 bleh, cargo fmt 2021-12-23 08:57:24 -07:00
Wez Furlong
becd107600 gui: quickselect: instrument and avoid potential panic
The label dedup code has panicked on me a couple of times.
I managed to capture the line number, so this commit aims to
capture some state to try to understand what's going on,
and importantly, to avoid the actual panic part.

refs: #1271
2021-12-23 08:55:36 -07:00
Autumn Lamonte
0a93a58605 New optional argument 'doNotMoveCursor' for iTerm2 images. This
permits iTerm2 images to be drawn anywhere on screen without
scrolling the cursor, including the bottom row.

Also included is a check in fcwrap.rs to_range_set(), without which
was causing a panic at runtime due to subtraction from unsigned
leading to overflow.
2021-12-23 07:07:08 -08:00
Wez Furlong
bd09b568ed font: add missing bound check for font coverage.
Thanks to @klamonte for finding this!

refs: #1433
2021-12-23 08:05:22 -07:00
Wez Furlong
162d5a79ee gui: fix switched parameters when updating initial geometry
refs: #1387
refs: #1270
2021-12-23 07:58:24 -07:00
Wez Furlong
db3f519a45 term: refine debug logging around image attachment 2021-12-23 07:53:13 -07:00