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

820 Commits

Author SHA1 Message Date
Wez Furlong
61fb3dffe4 docs: window:gui_window, wezterm.gui.screens() and friends 2022-07-06 16:33:47 -07:00
Wez Furlong
dc9e6ad3ef docs: changelog for #2225 #2226 2022-07-05 22:13:43 -07:00
Wez Furlong
00fb0c58f3 Add window:get_selection_escapes_for_pane()
This method extracts the selected text in a form that includes
escape sequences.

refs: https://github.com/wez/wezterm/issues/2223
2022-07-05 22:01:16 -07:00
Wez Furlong
741cd37bd4 lua: add window:copy_to_clipboard method
refs: https://github.com/wez/wezterm/issues/2223
2022-07-05 21:59:00 -07:00
Wez Furlong
7d77316fd7 docs: changelog for https://github.com/wez/wezterm/issues/2204 2022-07-05 06:59:33 -07:00
Wez Furlong
8fb1c091ae update harfbuzz to 4.4.1 2022-07-04 15:26:42 -07:00
Wez Furlong
1e85e79fc7 keys: add ActivateKeyTable::until_unknown=true
This will implicitly pop key table entries if they don't match keys.

refs: https://github.com/wez/wezterm/issues/2178
2022-06-30 07:14:22 -07:00
Wez Furlong
556a6b855a docs: tweak changelog text 2022-06-29 16:15:02 -07:00
Wez Furlong
ad42f1d7c4 lua: we now watch require'd files in addition to the main config file
Finally got around to https://github.com/wez/wezterm/discussions/914#discussioncomment-960983
2022-06-29 15:13:37 -07:00
Wez Furlong
eb50c68228 config: allow reloading after config errors detected
This commit adjusts the config loading code so that we can return
information about the paths the should be watched for a subsequent
reload even in the more common error cases.

refs: #1174
2022-06-29 14:34:28 -07:00
Wez Furlong
de564f9018 docs: changelog for https://github.com/wez/wezterm/issues/2198 2022-06-29 06:06:32 -07:00
Wez Furlong
a10dc25e0c fix colors.indexed in toml file
refs: https://github.com/wez/wezterm/issues/2197
2022-06-28 06:22:31 -07:00
Wez Furlong
fb1a659c4c fix wezterm connect sshdomain when password auth is needed
We need the mux window builder to notify in order for the ConnectionUI
to show up, but we wouldn't trigger the notify (which happens on drop)
until we'd awaited the connection ui completing password auth.

Force it to drop earlier to unblock.

refs: https://github.com/wez/wezterm/issues/2194
2022-06-27 16:49:05 -07:00
Wez Furlong
9076bb312b docs: https://github.com/wez/wezterm/issues/2185 2022-06-26 17:05:02 -07:00
Wez Furlong
f2627bc39e ActivateKeyTable replace_current wasn't actually optional
The issue here was that the from_dynamic impl derived for a struct
that was inlined in an enum didn't respect the the field properties
defined for the struct.

Refactor to reuse the same field_info helper used by the struct
code.

Update docs to clarify what the default value actually is.

refs: https://github.com/wez/wezterm/issues/2179
2022-06-25 19:38:39 -07:00
Wez Furlong
3556c15f35 docs: wezterm.action ergnomics
I forgot about this! This is in the most recent release.

refs: https://github.com/wez/wezterm/issues/1150
2022-06-25 06:10:41 -07:00
Wez Furlong
fc14ac87fc docs: update for release 2022-06-24 14:59:19 -07:00
Wez Furlong
bd1b7c5d9a docs: more tweak 2022-06-24 14:11:44 -07:00
Wez Furlong
dee4fbf760 docs: tweak changelog 2022-06-24 14:10:15 -07:00
Wez Furlong
80671f29bd add wezterm show-keys command
This prints out the key and mouse assignments

refs: https://github.com/wez/wezterm/issues/2134
2022-06-22 09:14:34 -07:00
Wez Furlong
2393ac262e docs: changelog for #1913 #2158 2022-06-22 06:23:36 -07:00
Wez Furlong
d4219444d8 docs: changelog for #2106 2022-06-21 14:54:02 -07:00
Wez Furlong
42b83626f2 docs: update changelog for #2150 and #2086 2022-06-21 13:52:57 -07:00
Wez Furlong
55e63d867b docs: keyboard encoding
refs: https://github.com/wez/wezterm/issues/2152
2022-06-21 09:36:59 -07:00
Wez Furlong
1b2efe8c70 x11: fix copy and paste between wezterm windows race
This commit adds more trace logging around selection
related events.

That tracing uncovered a situation, when multiple wezterm windows within
the same process were involved, where one window didn't receive a
selection-clear event notification.

Since Window::get_clipboard trusted our local understand of the
clipboard contents, it would return those until the selection was
changed in that window.

This commit changes that code to always ask the X server for the
selection. It makes pasting slightly slower, but should always produce
consistent results.

refs: https://github.com/wez/wezterm/issues/2110
2022-06-21 07:32:53 -07:00
Wez Furlong
ae952e275c docs: wayland drop and drop
refs: #2148
2022-06-20 13:28:39 -07:00
Wez Furlong
f58f47522d docs: fix anchors for some color schemes
they all need to be lowercase
2022-06-19 08:04:35 -07:00
Wez Furlong
dbcc0cb22a sync color schemes
closes: https://github.com/wez/wezterm/pull/2137
2022-06-19 07:35:48 -07:00
Wez Furlong
61510b8393 term: add enable_kitty_keyboard config option
It's been reported that something is funky with nvim, so default
this to false for now until I have time to debug it.

refs: https://github.com/wez/wezterm/issues/1141
2022-06-18 22:44:35 -07:00
Wez Furlong
5bcb0de442 lua: add wezterm.GLOBAL 2022-06-18 21:31:53 -07:00
Wez Furlong
5c172e4ed2 term: support kitty keyboard protocol
This enables tentative support for https://sw.kovidgoyal.net/kitty/keyboard-protocol

It's only been lightly tested with the notcurses-input program and
eyeballed against a few random keypresses in kitty running

`printf "\x1b[=11u" ; od -c`

I tried with neovim, but it doesn't seem like the version available
in Fedora 36 supports this yet.

refs: https://github.com/wez/wezterm/issues/1141
2022-06-18 16:16:17 -07:00
Wez Furlong
32fe7106a9 remove x11_focus_change_repaint_delay_ms code
We found the real root of the problem in so we shouldn't need this any
longer

refs: https://github.com/wez/wezterm/issues/1992
refs: https://github.com/wez/wezterm/issues/1628
refs: https://github.com/wez/wezterm/issues/2063
2022-06-18 07:39:56 -07:00
Wez Furlong
4c03df884b docs: gui-startup, mux-startup and wezterm.mux
refs: #1949
refs: #674
2022-06-17 16:57:52 -07:00
Wez Furlong
479b1384bb Add docs for wezterm cli
refs: #1253
2022-06-16 07:53:34 -07:00
Wez Furlong
adf9679461 macos: use shift-tab hack with ctrl-shift-tab as well
refs: #1902
2022-06-15 22:23:15 -07:00
Wez Furlong
84c429f8ec docs: changelog for https://github.com/wez/wezterm/issues/2063
closes: https://github.com/wez/wezterm/issues/2063
2022-06-15 22:14:02 -07:00
Wez Furlong
297377ae9a rename focus_change_repaint_delay -> x11_focus_change_repaint_delay_ms
and add changelog!

refs: #2111
2022-06-15 20:50:33 -07:00
Wez Furlong
3b9be25161 avoid spawn failures after using sudo -i
The heart of the issue is that `sudo -i` sets the cwd to the homedir
of the root user, and that isn't accessible to the regular unprivileged
user, and cannot be set as the cwd for the newly spawned panes/tabs.

A secondary issue is that it is hard to see what the error is without
improved diagnostics.

So this improves the diagnostics, and then changes the existence
check that we were doing for local domain spawns to try to read the
directory instead.

refs: https://github.com/wez/wezterm/issues/2120
2022-06-15 10:37:57 -07:00
Wez Furlong
dfeeccbf2c docs: changelog for #2125 #2052 2022-06-15 07:44:56 -07:00
Wez Furlong
62744bf09c exit_behavior = "Close" is now the default
Tired of fielding questions about it :-/

refs: https://github.com/wez/wezterm/issues/2105
2022-06-14 09:48:17 -07:00
Wez Furlong
45a16fa493 make enable_wayland = true the default
refs: https://github.com/wez/wezterm/issues/2104
2022-06-14 09:48:17 -07:00
Wez Furlong
5017d57d0a docs: freetype_pcf_long_family_names
closes: #2100
2022-06-10 06:37:01 -07:00
Wez Furlong
b59b51ee2a windows: default allow_win32_input_mode=true
refs: #2098
refs: #2009
refs: #1904
closes: #1509
2022-06-09 07:26:53 -07:00
Wez Furlong
e7258e0e03 fonts: fix automatic bold synthesis
For fonts like Lucida Console on Windows which do not have a bold
variant, we were not synthesizing bold.

The reason was that the config-level "make bold" logic works by adding
200 to the weight which takes normal -> demibold, but the bold synthesis
logic is enabled only for bold and higher.

This commit changes the threshold for synthesis to demibold or higher.

refs: https://github.com/wez/wezterm/issues/2074
2022-06-05 06:35:31 -07:00
Wez Furlong
1ae72bccae term: avoid fragmenting version/attribute query responses
Keep them in a single write call to minimize the chances of issues
like https://github.com/wez/wezterm/issues/2060
2022-06-01 07:56:41 -07:00
Wez Furlong
4ba0d4b50b docs: fix typo in changelog 2022-06-01 05:24:05 -07:00
Wez Furlong
d9f54a7c41 docs for new background config 2022-05-31 23:20:11 -07:00
Wez Furlong
40afbf1ec9 sync color schemes with upstream
Sync with 021a00ba1e532e34071a48f999dfa302072e9c43 of https://github.com/mbadolato/iTerm2-Color-Schemes

closes: #2013
2022-05-31 18:06:51 -07:00
Wez Furlong
bc95d88227 Install bash and zsh completions in rpm and deb packages 2022-05-28 12:47:18 -07:00
Wez Furlong
1df1390079 docs: changelog for https://github.com/wez/wezterm/issues/1727 2022-05-28 11:53:52 -07:00
Wez Furlong
509fd98b03 docs: changelog for https://github.com/wez/wezterm/pull/2038 2022-05-26 16:47:15 -07:00
Wez Furlong
17d1170b2a windows: fix divined current working directory
The issue was that we were generating an invalid file URI; fix
that up!

refs: #2036
2022-05-26 05:56:57 -07:00
Wez Furlong
65889217c6 docs for PaneSelect
refs: #1975
refs: #1842
2022-05-25 09:30:17 -07:00
Wez Furlong
385f3c99d3 wezterm cli: add send-text --no-paste option
refs: https://github.com/wez/wezterm/issues/888#issuecomment-1123462175
2022-05-25 07:45:34 -07:00
Wez Furlong
e298bb7a11 shaping: fix repeated glyphs for Unicode NFD text
harfbuzz can return incomplete overlapping runs when it processes
text in unicode NFD.  Add another check for the case where we've
accumulated the bytes in the range 0-12 and then harfbuzz returns
another range of 6-12.  We coalesce the two together so that we can
pass the full unresolved sequence to the next fallback pass.

refs: https://github.com/wez/wezterm/issues/2032
2022-05-25 06:51:31 -07:00
Wez Furlong
e114534bee docs: fix typo in changelog 2022-05-24 20:26:49 -07:00
Wez Furlong
8f880551a0 deps: harfbuzz -> 4.3.0 2022-05-24 18:43:10 -07:00
Wez Furlong
a75ee702dd docs: tweak changelog to reflect search mode per-tab state 2022-05-24 18:41:09 -07:00
Wez Furlong
478b0df58b Add wezterm.strftime_utc 2022-05-24 17:24:19 -07:00
Wez Furlong
a70ddd9212 docs: changelog for https://github.com/wez/wezterm/pull/2022 2022-05-24 09:38:39 -07:00
Wez Furlong
89e88c876d docs: changelog for #2006 2022-05-22 06:07:32 -07:00
Wez Furlong
ecd05547d5 Add SplitPane assignment
This, along with the plumbing included here, allows specifying
the destination of the split (now you can specify top/left, whereas
previously it was limited to right/bottom), as well as the size
of the split, and also whether the split targets the node at the
top level of the tab rather than the active pane--that is referred
to as full-width in tmux terminology.

https://github.com/wez/wezterm/issues/578
2022-05-21 21:09:11 -07:00
Wez Furlong
d2d4257f79 Add RotatePanes key assignment 2022-05-21 17:10:04 -07:00
Wez Furlong
da7da888cd config: generate errors for things like --config tarm=foo
Invalid option names, or values that evaluate as nil (such as the `foo`
above: that's treated as a global variable reference, but `foo` isn't a
defined global and evaluates as `nil`) will now cause the program
startup to error out with an actionable error message.

Previously, the invalid config name would generate a warning, and the
invalid value would silently have no effect as it has the same effect as
omitting the named value and leaving it as its default value.

I think these cases should both immediately error out and stop
further processing, so that's what we're doing.

This commit also adds support for adding:

```
   #[dynamic(deprecated = "use newer option instead")]
   pub some_config_value: bool,
```

but not options currently use this.
2022-05-21 13:10:30 -07:00
Wez Furlong
736169a752 add min_scroll_bar_height config option
refs: https://github.com/wez/wezterm/issues/1936
2022-05-21 10:06:18 -07:00
Wez Furlong
107d3d2378 search mode can now default to searching the selection text
To do this, we split `Pattern` into the underlying pattern for the mux
layer (which is part of the codec), and another for the config layer,
so that we can specify this new mode.

At the gui layer, we translate the selection variant into the actual
selection text and map it to the mux Pattern enum.

When taking the selection text, we restrict it to just the first line.

refs: https://github.com/wez/wezterm/issues/1912
2022-05-21 07:24:50 -07:00
Wez Furlong
c04d831ee5 add cell_width config to scale cell_width
This works similarly to line_height

refs: #1979
2022-05-21 06:10:03 -07:00
Wez Furlong
b312479266 quickselect: allow multiline matches
Turn on multi-line mode by default, and improve the localpane
search function to collapse runs of trailing whitespace into
just a newline.

That allows:

```
./target/debug/wezterm -n --config 'quick_select_patterns={"foo$"}'
```

to match the first line from this, but not the second:

```
printf "foo\nfoobar\n"
```

and this to match both:

```
./target/debug/wezterm -n --config 'quick_select_patterns={"^foo"}'
```

refs: https://github.com/wez/wezterm/issues/2008
2022-05-20 09:47:08 -07:00
Wez Furlong
55767c69b1 quickselect: avoid jumping to bottom of viewport when activated 2022-05-20 06:16:31 -07:00
Wez Furlong
53b9a68a9c docs: changelog for #2001 2022-05-17 07:43:53 -07:00
Funami580
9600d52cd8 rectangular selection: add option to select with Alt+Shift 2022-05-16 19:43:30 -07:00
Wez Furlong
e927ecfd46 docs: changelog for https://github.com/wez/wezterm/issues/1385
refs: https://github.com/wez/wezterm/pull/1994
2022-05-16 14:20:40 -07:00
Wez Furlong
0203c06215 docs: changelog for https://github.com/wez/wezterm/pull/1997 2022-05-16 14:16:45 -07:00
Wez Furlong
b833ee73b3 mux: don't kill panes when the domain is detached!
refs: #1993
2022-05-15 17:02:24 -07:00
Wez Furlong
64b6e63fcb docs: changelog for #1990 #1986 2022-05-14 17:59:33 -07:00
Wez Furlong
97f0bd16f2 launcher: allow CTRL-G to cancel
refs: https://github.com/wez/wezterm/issues/1977
2022-05-12 14:27:30 -07:00
Wez Furlong
64921bf8a1 docs: changelog for #1976 2022-05-12 09:02:39 -07:00
Wez Furlong
8523a1b0e7 docs: changelog for https://github.com/wez/wezterm/pull/1953 2022-05-09 07:40:38 -07:00
Wez Furlong
7858f652fb input: fix ALT when used for the leader key
The issue here was that we'd try to match this:

```
key_event RawKeyEvent { key: Char('t'), modifiers: ALT | LEFT_ALT, phys_code: Some(T), raw_code: 17, repeat_count: 1, key_is_down: true, handled: Handled(false) }
```

which has mods=`ALT|LEFT_ALT` against `ALT` and would fail.

We need to strip out the positional ALTs from the modifiers
in order to successfully match.

refs: https://github.com/wez/wezterm/issues/1958
2022-05-08 22:34:36 -07:00
Wez Furlong
c44fd1a006 docs: changelog for #1592 and #993 2022-05-06 19:53:07 -07:00
Wez Furlong
39f53161be copy mode: ctrl-v enables rectangular selection
refs: https://github.com/wez/wezterm/issues/1656
2022-05-05 21:10:06 -07:00
Wez Furlong
ef4a95211e add rectangular selection
Alt-dragging will use rectangular selection in the default mouse
assignments.

refs: https://github.com/wez/wezterm/issues/1361
2022-05-05 20:49:22 -07:00
Wez Furlong
dc0fde7ae0 search: save last used search term and restore it
When search mode is activated with an empty pattern, restore
the most recently used search term in any pane.

refs: https://github.com/wez/wezterm/issues/1912
2022-05-05 12:12:06 -07:00
Wez Furlong
94bb4ad09d key tables: we now search the whole stack for match
This change causes key table activations to effectively layer
over prior key table activations.

This is necessary for the copy mode key assignment changes to
work.

refs: https://github.com/wez/wezterm/issues/993
2022-05-04 23:09:21 -07:00
Wez Furlong
cee50fffb8 flush after replying to DECRQM
refs: https://github.com/wez/wezterm/issues/1950
2022-05-03 17:34:33 -07:00
Wez Furlong
d91bd1fa4d docs: changelog for https://github.com/wez/wezterm/issues/1726
refs: https://github.com/wez/wezterm/pull/1938
2022-05-01 10:12:41 -07:00
Wez Furlong
0ec4552bd7 docs: changelog for https://github.com/wez/wezterm/pull/1939 2022-05-01 08:59:31 -07:00
Wez Furlong
8005c9df98 windows: fix stuck IME composition when switching input methods
refs: https://github.com/wez/wezterm/issues/1922
2022-04-26 07:29:48 -07:00
Wez Furlong
f309f81274 docs: tweak backslashes in registry key names 2022-04-25 09:52:51 -07:00
Wez Furlong
b3786fdbd6 docs: changelog for https://github.com/wez/wezterm/pull/1868 2022-04-25 09:51:19 -07:00
Wez Furlong
3246651c63 docs: changelog for https://github.com/wez/wezterm/pull/1911 2022-04-25 07:47:15 -07:00
Wez Furlong
9bf732bcae update harfbuzz to 4.2.1 2022-04-24 16:40:53 -07:00
Wez Furlong
6ec1989f14 docs: changelog for https://github.com/wez/wezterm/issues/1848 2022-04-24 16:24:12 -07:00
Wez Furlong
8f2059e580 docs for https://github.com/wez/wezterm/issues/1900 2022-04-21 07:56:35 -07:00
Wez Furlong
b92f31e7a6 macos: fix CTRL-Backslash on German layouts
refs: https://github.com/wez/wezterm/issues/1891
2022-04-19 14:17:04 -07:00
Wez Furlong
ea6368b2fe docs: clarify/grammarr fix 2022-04-19 07:53:43 -07:00
Wez Furlong
f7b34438ed add clean_exit_codes config
refs: https://github.com/wez/wezterm/issues/1889
2022-04-19 07:48:49 -07:00
Wez Furlong
5b8b9630a3 Add treat_east_asian_ambiguous_width_as_wide option
I've bundled this into termwiz's UnicodeVersion type as that is
a similar concept that is already routed through to the appropriate
function.

refs: https://github.com/wez/wezterm/issues/1888
2022-04-19 06:56:39 -07:00
Wez Furlong
77ecbe29b1 x11: set _NET_WM_NAME for clients like polywins/polybar 2022-04-18 08:05:20 -07:00
Wez Furlong
66e8ec1586 mux: implicitly attach the domain referenced in a SpawnCommand
refs: https://github.com/wez/wezterm/issues/1874
2022-04-17 23:02:39 -07:00
Wez Furlong
8fbb1d0c0b mux: add AttachDomain and DetachDomain key assignments
The launcher menu code to perform attaching has been generalized
into a key assignment action and reimplemented in terms of that
action.

A detach action has been added to disconnect and detach.

refs: https://github.com/wez/wezterm/issues/1874
2022-04-17 21:41:50 -07:00
Wez Furlong
03d8f10d11 mux: pass current window_id to Domain::attach
This commit allows the currently active window to:

* Spawn a new tab in the active window (rather than spawning
  a new window) to host the connection status
* Auto-close that connection UI tab (rather than the whole window)
  when the window is no longer needed
* Pass the current window through to use as the primary window when
  assigning remote window/tabs.

The net effect of this is that there are fewer transient windows,
and that it is easier to connect a set of domains to the active
workspace.

refs: https://github.com/wez/wezterm/issues/1874
2022-04-17 18:07:58 -07:00
Wez Furlong
19db4228f0 docs: changelog for https://github.com/wez/wezterm/pull/1883 2022-04-17 11:06:09 -07:00
Wez Furlong
813ad3b34d docs: changelog for #1866 #1882 2022-04-17 08:15:27 -07:00
Wez Furlong
83e0f97ce3 docs: changelog for https://github.com/wez/wezterm/pull/1880 2022-04-16 11:04:39 -07:00
Wez Furlong
756a9789c8 Add PaneInformation.domain_name and pane:get_domain_name()
refs: https://github.com/wez/wezterm/issues/1881
2022-04-16 10:53:23 -07:00
Wez Furlong
8002f770a0 docs: changelog for https://github.com/wez/wezterm/pull/1875 2022-04-15 20:55:11 -07:00
Wez Furlong
fdb3471017 xkeyboard: resolve ambiguous CTRL-i / CTRL-Tab
We want to avoid normalizing control key presses; there were
two places where it was happening; one in our own code and
the other was in the xkeyboard mapping stuff itself.

refs: https://github.com/wez/wezterm/issues/1851
2022-04-15 07:27:01 -07:00
Wez Furlong
ba99c92cbd docs: changelog for https://github.com/wez/wezterm/issues/1864 2022-04-12 20:22:48 -07:00
Wez Furlong
fb6658aac2 docs for https://github.com/wez/wezterm/issues/1867 2022-04-12 17:46:00 -07:00
Wez Furlong
2b34587379 docs: changelog for https://github.com/wez/wezterm/issues/1850 2022-04-10 11:53:45 -07:00
Wez Furlong
317bfeef41 docs: remove bit about cursor alpha; it's not complete 2022-04-08 18:00:43 -07:00
Wez Furlong
7885b9269e docs: update for 20220408-101518-b908e2dd release 2022-04-08 17:44:41 -07:00
Wez Furlong
58f8ace8b5 docs: changelog for https://github.com/wez/wezterm/issues/1841 2022-04-08 17:39:34 -07:00
Wez Furlong
e8ad5f2b56 docs: changelog for https://github.com/wez/wezterm/pull/1840 2022-04-08 07:51:57 -07:00
Wez Furlong
d356b72ca9 cursor_fg, cursor_bg, cursor_border now accept alpha values
refs: https://github.com/wez/wezterm/issues/1835
2022-04-07 21:55:28 -07:00
Wez Furlong
a2da7efbf7 remove send_composed_key_when_alt_is_pressed option
refs: https://github.com/wez/wezterm/issues/1826
2022-04-07 21:21:14 -07:00
Wez Furlong
ad91e37768 Secondary DA response -> vt220, version 277
This persuades vim to set ttymouse=sgr by default.
We're carefully sitting below 279 which triggers
some queries for things that we don't respond to yet.

refs: https://github.com/wez/wezterm/issues/1825
2022-04-06 20:45:37 -07:00
Wez Furlong
1b0f5cf256 fonts: treat "charcell" spacing as monospace
Some versions of fontconfig classify some fonts as having charcell
spacing.  We need to consider those as monospace as well.

refs: https://github.com/wez/wezterm/issues/1820
2022-04-06 08:11:34 -07:00
Wez Furlong
dc33a5b081 docs: clarify Menlo fi ligature changelog entry 2022-04-05 07:13:30 -07:00
Wez Furlong
30bc258628 docs: fix typo in changelog 2022-04-05 07:12:40 -07:00
Wez Furlong
c62e2364dd docs: changelog for https://github.com/wez/wezterm/issues/1794
closes: https://github.com/wez/wezterm/issues/1794
2022-04-04 20:51:48 -07:00
Wez Furlong
520f1e994a docs: changelog for https://github.com/wez/wezterm/issues/1804
closes: https://github.com/wez/wezterm/issues/1804
2022-04-04 20:49:49 -07:00
Wez Furlong
327984d1d1 docs: add info about key tables. break key binding apart
The keys section was way too big; this splits it up into more
manageable pieces, adds a nice flow chart to show how key events
are processed and adds an example of using the new key tables feature.
2022-04-04 09:30:04 -07:00
Wez Furlong
e76525b695 deps: harfbuzz -> 4.2.0 2022-04-03 18:37:25 -07:00
Wez Furlong
2629e50a93 docs: changelog for #1805
closes: https://github.com/wez/wezterm/issues/1199
closes: https://github.com/wez/wezterm/issues/1386
closes: https://github.com/wez/wezterm/issues/354
2022-04-03 18:32:39 -07:00
Wez Furlong
366c2fd807 docs: changelog for https://github.com/wez/wezterm/pull/1810 2022-04-03 13:01:49 -07:00
Wez Furlong
508baabc79 keys: default assignments can now be set to mapped or physical
A bit of a PITA, this commit:

* Introduces a DeferredKeyCode type that defers resolving a concrete
  keycode
* Adds key_map_preference config which can be Mapped or Physical
* Key map building resolves the keycode using key_map_preference
* Default key assignments have been re-phrased in order to produce
  DeferredKeyCodes
* User-specified keys without `mapped:` or `phys:` prefixes will
  resolve according to key_map_preference

refs: https://github.com/wez/wezterm/issues/1788
refs: https://github.com/wez/wezterm/issues/1784
2022-04-01 08:07:23 -07:00
Wez Furlong
675ea03338 docs: changelog for https://github.com/wez/wezterm/issues/1787
closes: https://github.com/wez/wezterm/issues/1787
2022-03-31 19:30:19 -07:00
Wez Furlong
210999b915 clipboard: restructure how we capture OSC 52
Previously, we'd create a clipboard handler associated with a GUI window
and take care to pass that down to the underlying Pane whenever we
spawned a new pane.

For the mux server, instead of being associated with a GUI window, the
clipboard was a special RemoteClipboard that would send a PDU through
to the client that spawned the window.

The bug here was that when that client went away, the clipboard for
that window was broken.

If the mux server was the built-in mux in a gui process this could
leave a tab without working OSC 52 clipboard support.

This commit restructures things so that the Mux is responsible for
assigning a clipboard handler that rephrases the clipboard event
as a MuxNotification.

Both the GUI frontend and the mux server dispatcher already listen
for mux notifications and translate those events into appropriate
operations on the system clipboard or Pdus to send to the client(s).

refs: #1790
2022-03-31 09:55:51 -07:00
Wez Furlong
1b31ee5f94 docs: changelog for #1800 2022-03-31 07:17:06 -07:00
Wez Furlong
e23e972c5c sync color schemes
Sync with upstream: ba8c68f212
closes: https://github.com/wez/wezterm/pull/1767
2022-03-30 20:46:34 -07:00
Wez Furlong
6015957cd2 docs: changelog for #1525 2022-03-29 09:24:19 -07:00
Wez Furlong
f478672fd8 mux: fix artifacts in multi-pane layouts after closing a pane
refs: https://github.com/wez/wezterm/issues/1277
refs: https://github.com/wez/wezterm/issues/783
2022-03-28 22:47:32 -07:00
Wez Furlong
b398eaf656 mux: fix CloseCurrentPane={confirm=false}
After killing the remote pane, we no longer trigger the renderable
poll stuff that would detect that the pane was dead.

Let's speculatively set it to dead so that we don't get stuck with
stray tabs/panes.

https://github.com/wez/wezterm/issues/1752
2022-03-28 22:18:53 -07:00
Wez Furlong
1c9bd347c2 multiplexer: improve handling of image attachments
There were a a couple of issues:

* `ImageData::hash` would re-hash the image on every call, and this was
  called for every cell that comprised an image on the mux server side
* `SerializedLine` needed to understand how to remove the `Arc<ImageData>`
  image attachments so that we didn't serialize a complete copy of the
  image per cell that comprised the image.

A new RPC was introduced to attempt to fetch `ImageData` given its
content hash and pane, row and cell index as a hint to locate it.

A client side LRU of content hash to `ImageData` is used to avoid
issuing repeat calls to that new RPC.

refs: #1237
2022-03-28 20:28:05 -07:00
Wez Furlong
72214b7db9 Disable ligatures for Menlo and Monaco
refs: https://github.com/wez/wezterm/issues/1736
refs: https://github.com/wez/wezterm/issues/1786
2022-03-28 19:32:00 -07:00
Wez Furlong
20688c4a62 docs for fallback font scaling
refs: #1761
2022-03-28 07:55:41 -07:00
Wez Furlong
6bd6d844ca term: fix XTGETTCAP response
refs: https://github.com/wez/wezterm/issues/1781
refs: https://github.com/dankamongmen/notcurses/issues/2637
2022-03-27 19:34:12 -07:00
Wez Furlong
a7f70ccf35 docs: sixel perf in the changelog 2022-03-27 16:32:36 -07:00
Wez Furlong
5b0edfddea hyperlink rules: avoid panic when a capture is missing
```
./target/debug/wezterm -n --config 'hyperlink_rules={{regex="pr-(\\d+)(-\\d)?",format="https://github.com/NixOS/nixpkgs/pull/$1"}}'
```

then output `pr-1`.

refs: #1780
2022-03-27 11:12:16 -07:00
Wez Furlong
26acdae1d9 docs: changelog for #1757 #1710 2022-03-27 07:57:52 -07:00
Wez Furlong
4e343eb1e5 macos: try to avoid the notch
Flesh out the get_os_parameters impl for macOS.  When running on a
system that provides `NSScreen::safeAreaInsets`, use that to determine
the border required to avoid the "notch" on certain models of mac.

In the GUI layer: when the os parameters include a border, adjust
the render position to account for it.

This is a bit of a speculative change, as I don't have a mac with
a notch.

refs: https://github.com/wez/wezterm/issues/1737
2022-03-26 22:47:42 -07:00
Wez Furlong
98079b6b46 docs: changelog for #1771 #1773 #1725 #949 2022-03-26 17:48:56 -07:00
Wez Furlong
8eb497fa19 deps: harfbuzz -> 4.1.0 2022-03-26 10:51:35 -07:00
Wez Furlong
6d7f3e2e0b docs for https://github.com/wez/wezterm/issues/1745 2022-03-26 10:01:58 -07:00
Wez Furlong
4035860f45 update retro tab bar hover state in more cases
refs: https://github.com/wez/wezterm/issues/1764
2022-03-26 09:45:12 -07:00
Wez Furlong
7f3a29dccb docs: changelog for #1761 2022-03-26 08:20:44 -07:00
Wez Furlong
895a96f842 docs: changelog for #1502 and #1675 2022-03-26 07:57:14 -07:00
Wez Furlong
e500c9c5c0 Fix quoting of style field in ls-fonts
refs: https://github.com/wez/wezterm/issues/1762
2022-03-24 18:06:13 -07:00
Wez Furlong
623f617951 x11: window icon had red/blue channels swapped
closes: #1754
closes: #1755
2022-03-23 07:01:26 -07:00
Wez Furlong
5b09ff1dd0 fix incorrect csi-u encoding with non-ascii characters
refs: https://github.com/wez/wezterm/issues/1746
2022-03-21 20:38:42 -07:00
Wez Furlong
ee5d5714ca docs: update for 20220319-142410-0fcdea07 2022-03-19 16:37:27 -07:00
Wez Furlong
bd9088372a wayland: speculative handling of pointer when seat changes
It compiles and launches under weston, so that's promising.
I can't test the suspend/resume case on the hardware I have available.

refs: #1497
2022-03-19 05:47:04 -07:00
Wez Furlong
29995c7cb3 add wezterm.enumerate_ssh_hosts() helper
This helper extracts the concrete set of hosts and their configurations
from the ssh config, and arranges to reload the wezterm config if they
are changed.

This is useful when constructing ssh domain configs.

refs: https://github.com/wez/wezterm/discussions/1731
2022-03-18 07:48:12 -07:00
Wez Furlong
51e27acf1e docs: changelog for #1092 2022-03-17 16:37:51 -07:00
Wez Furlong
0b4e5570a8 docs for https://github.com/wez/wezterm/discussions/796 2022-03-16 06:34:24 -07:00
Wez Furlong
d290f532d4 fix hang with open crate when spawning the browser
The `open` crate blocks forever when spawning the browser via xdg-open,
which feels kinda "wrong" to me, but does offer a method that can stick
that in a background thread, so that's what we do here.

refs: #1721
2022-03-15 07:50:08 -07:00
Wez Furlong
d22b7a51c5 docs: https://github.com/wez/wezterm/issues/1646 2022-03-12 15:06:07 -07:00
Wez Furlong
d64f0c2189 deps: harfbuzz -> 4.0.1 2022-03-12 07:06:54 -07:00
Wez Furlong
6d45a32eaa docs: changelog for #1423 #1708 2022-03-12 06:44:09 -07:00
Wez Furlong
5d7de61e9e docs: changelog for https://github.com/wez/wezterm/issues/1434 2022-03-11 09:28:30 -07:00
Wez Furlong
3234ef0ec9 x11: add fallbacks when loading xcursor themes
refs: #1655
2022-02-23 08:53:11 -07:00
Wez Furlong
85a8434ecb docs: fix autumnmeowmeow's links 2022-02-18 07:16:28 -07:00
Wez Furlong
77222e0630 docs: fix typo in changelog 2022-02-18 07:14:41 -07:00
Wez Furlong
55b41664d6 docs: changelog links to phys vs mapped section
refs: https://github.com/wez/wezterm/issues/1483
2022-02-18 06:34:16 -07:00
Wez Furlong
6e972d3f08 docs: adjust changelog for https://github.com/wez/wezterm/issues/1483
closes: https://github.com/wez/wezterm/issues/1483
2022-02-18 06:05:36 -07:00
Wez Furlong
c232817270 docs: changelog for https://github.com/wez/wezterm/issues/1633
closes: https://github.com/wez/wezterm/issues/1633
2022-02-18 06:00:42 -07:00
Wez Furlong
a79fc87586 deps: harfbuzz -> 3.4.0 2022-02-12 16:00:58 -07:00
Wez Furlong
48d6935f91 fix matching iosevka font when multiple ttcs were installed
refs: https://github.com/wez/wezterm/issues/1630
2022-02-12 14:07:26 -07:00
Wez Furlong
18c63c0526 fix copying trailing whitespace from wrapped lines
refs: #1635
2022-02-12 09:47:03 -07:00
Wez Furlong
3316695dc0 docs: changelog for https://github.com/wez/wezterm/pull/1577 2022-02-09 19:51:01 -07:00
Wez Furlong
dbf190d414 gui: changing cursor color with escape sequences > force_reverse_video_cursor
refs: 1625
2022-02-08 06:46:31 -07:00
Wez Furlong
7a5956d3b8 gui: blinking cursor now eases rather binary blinks
Also: I recently broke force_reverse_video_cursor with the recent
glyph rendering fixes; this commit restores that functionality.
2022-02-06 22:09:52 -07:00
Wez Furlong
842e4800b5 blinking text is now eased between bg and fg color 2022-02-06 18:28:45 -07:00
Wez Furlong
7956e71b34 docs: mention bidi in changelog 2022-02-06 07:37:01 -07:00
Wez Furlong
2fedc0ca21 docs: changelog for https://github.com/wez/wezterm/issues/1615 2022-02-06 07:29:33 -07:00
Wez Furlong
1b63b4b7c9 deps: harfbuzz -> 3.3.2 2022-02-06 06:44:59 -07:00
Wez Furlong
1e32ccbd2f shaping: fix an issue where we'd lose combining marks like U+20d7
For a sequence like `e U+20d7` the intent is to render the `e` with
a vector arrow over the top.

This is typically implemented by fonts as an `e` followed by the
vector glyph (or vice versa), where either one of those may have
a zero advance so that the two elements are combined.

There were two problems here:

* During shaping we'd see the zero advance and assume that the entry
  was useless and skip it
* During rendering, if we didn't think it had any cell width, we'd
  not render it

Cursoring through that particular sequence can hide the vector
mark if the cursor is set to the default block cursor due to annoyances
in how the block cursor is rendered (it changes the fg color to match
the bg, but for elements outside where we think the cursor is, this
makes those elements invisible).

refs: https://github.com/wez/wezterm/issues/1617
2022-02-05 06:19:25 -07:00
Wez Furlong
794113807b docs: changelog for https://github.com/wez/wezterm/issues/1601
closes: https://github.com/wez/wezterm/issues/1601
2022-02-03 23:09:40 -07:00
Wez Furlong
7577eb327f docs: changelog for https://github.com/wez/wezterm/issues/1610 2022-02-03 23:08:22 -07:00
Wez Furlong
05354fe8e5 deps: update harfbuzz to 3.3.1 2022-01-31 20:32:20 -07:00
Wez Furlong
3b1396dc9c docs: changelog for https://github.com/wez/wezterm/pull/1518 2022-01-28 17:24:29 -07:00
Wez Furlong
ebaa796b70 docs: for canonicalize_pasted_newlines changes
refs: #1575
2022-01-22 10:07:47 -07:00
Wez Furlong
7ccce20544 fonts: allow harfbuzz to guess the script
Our default meant that harfbuzz wouldn't engage preprocessing
steps that normalized the text to NFC.  With this change we now
correctly normalize and render certain compositions that were
totally borked previously.

refs: https://github.com/wez/wezterm/issues/1573
refs: https://github.com/wez/wezterm/issues/1474
2022-01-21 10:10:39 -07:00
Wez Furlong
c930e333c4 fix an issue where ScrollToPrompt got confused by two prompts on same line
refs: https://github.com/wez/wezterm/issues/1121
2022-01-17 22:48:53 -07:00
Wez Furlong
6a167252b6 docs: SwitchToWorkspace
refs: https://github.com/wez/wezterm/issues/1531
2022-01-17 11:32:23 -07:00
Wez Furlong
b6d121dd52 Add wezterm cli send-text command
refs: #888
2022-01-17 10:23:22 -07:00
Wez Furlong
db8f588c5e Add SwitchWorkspaceRelative key assignment 2022-01-17 09:54:11 -07:00
Wez Furlong
8d3d3e02a7 add default_workspace config option
refs: #1322
refs: #1531
2022-01-17 09:31:20 -07:00
Wez Furlong
e8900d47cd add window:active_workspace()
refs: #1531
refs: https://github.com/wez/wezterm/discussions/1322#discussioncomment-1984256
2022-01-17 09:11:06 -07:00
Wez Furlong
7eec41c284 Add ShowLauncherArgs key assignment
refs: https://github.com/wez/wezterm/issues/1485
2022-01-17 08:16:18 -07:00
Wez Furlong
d164178b9d docs for wezterm.nerdfonts
refs: https://github.com/wez/wezterm/issues/1521
2022-01-16 18:45:13 -07:00
Wez Furlong
070c4030c6 Bundle Symbols Nerd Font Mono
Built using:

```
./FontForge-2020-11-07-21ad4a1-x86_64.AppImage --script $PWD/font-patcher "$PWD/src/unpatched-fonts/NerdFontsSymbolsOnly/NerdFontsSymbolsOnly Template 1000 em.ttf" --powerline --use-single-width-glyphs -out /tmp/nerd-fonts-out --fontawesome --fontawesomeextension --fontlinux --octicons --codicons --powersymbols --powerline --powerlineextra --mdi --weathericons
```

which is everything *except* Pomicons at the time of writing, pending
clarifications of its distribution license
(https://github.com/ryanoasis/nerd-fonts/issues/266)

refs: https://github.com/wez/wezterm/issues/1521
2022-01-16 16:04:35 -07:00
Wez Furlong
a9427aca63 Remove ALT-number default key assignments
The issue is that we work hard to match the keys pre-composition,
but for French and Norwegian layouts ALT-number are valid,
useful punctuation keys.  It's awkward to make exceptions for
ALT keys when matching assignments, especially on macOS, and
the simplest thing to do is simply to remove the assignments
and leave it to our users to add their own if they want them.

The ctrl-shift and cmd based assignments are generally much
easier to keep, because those key combinations are not widely
used default mappings on any keyboard layout.

refs: #1543
refs: #1542
refs: https://github.com/wez/wezterm/pull/1132
2022-01-14 22:24:40 -07:00
Wez Furlong
b5dfbc392c make use_ime=true the default for all platforms
The key repeat issues that were blocking this from being enabled
on macos have been resolved.
2022-01-13 09:19:23 -07:00
Wez Furlong
507267aeee docs: changelog for https://github.com/wez/wezterm/pull/1534 2022-01-12 18:03:20 -07:00
Wez Furlong
d1018c37ff docs: changelog for #1526 2022-01-10 18:56:57 -07:00
Wez Furlong
1fd53d4a5d mux: propagate User Vars across to the client
user vars were stubbed out.  This commit adds storage for them
in the mux client and adds a new notification that publishes each
var as it is changed.  That differential stream is applied to the
storage in the mux client when it is received.

```lua
local wezterm = require 'wezterm'

wezterm.on("update-right-status", function(window, pane)
  local woot = pane:get_user_vars().woot
  window:set_right_status(tostring(woot))
end);

return {
  unix_domains = {
    {name="unix"},
  },
}
```

then running:

* `wezterm connect unix`
* in that session: `printf "\033]1337;SetUserVar=%s=%s\007" woot `echo -n nice | base64``

causes `nice` to show in the status area.

refs: #1528
2022-01-10 18:33:32 -07:00
Wez Furlong
8e0a92b2ec docs: WslDomain, default_domain, wsl_domains
refs: #1242
2022-01-09 12:23:14 -07:00
Wez Furlong
373c5900e8 changelog: associate Windows wait_message latency fix w/ more issues 2022-01-09 10:59:43 -07:00
Wez Furlong
0c73a2359f docs: changelog fix typo 2022-01-09 10:56:41 -07:00
Wez Furlong
b7e142f407 docs: revise changelog for xkbd composition changes 2022-01-09 10:55:57 -07:00
Wez Furlong
3ad91ff93e docs: changelog: note about allow_win32_input_mode option 2022-01-09 08:46:09 -07:00
Wez Furlong
41953ee5e9 docs: changelog revise wording around compose_cursor 2022-01-09 08:44:38 -07:00
Wez Furlong
627001762e rename dead_key_is_active -> composition_status, dead_key_cursor -> compose_cursor
Since the composition state isn't strictly tied to dead keys, use
a name that better reflects that.
2022-01-09 08:39:21 -07:00
Wez Furlong
430e34ad37 docs: missing changelog for https://github.com/wez/wezterm/issues/1459 2022-01-08 21:53:44 -07:00
Wez Furlong
10ea932965 docs: changelog for https://github.com/wez/wezterm/issues/1398
and https://github.com/wez/wezterm/issues/1013
2022-01-07 21:23:15 -07:00
Wez Furlong
f2ed459359 docs: changelog for key input stuff
closes: #601
closes: #1080
closes: #1391
2022-01-07 21:18:30 -07:00
Wez Furlong
c383ee218d docs: changelog for https://github.com/wez/wezterm/issues/877
closes: https://github.com/wez/wezterm/issues/877
2022-01-07 21:14:42 -07:00
Wez Furlong
2a6a842362 docs: changelog for https://github.com/wez/wezterm/issues/1131
closes: https://github.com/wez/wezterm/issues/1131
2022-01-07 21:13:04 -07:00
Wez Furlong
3ca840a0ab docs: changelog for win32-input-mode
closes: #318
closes: #1509
closes: #1510
2022-01-07 21:08:50 -07:00
Wez Furlong
97d5429baa term: fix cursor location on primary when resizing with alt screen active
refs: https://github.com/wez/wezterm/issues/1512
2022-01-07 20:55:29 -07:00
Wez Furlong
3c6bc2c366 add ActivatePaneByIndex key assignment action
refs: #1517
2022-01-07 07:30:17 -07:00
Wez Furlong
17a9d6159a wezterm cli now prefers to talk to main GUI instance
When spawned with no WEZTERM_UNIX_SOCKET environment set,
we now prefer to resolve the gui instance, falling back to
the mux if it doesn't look like the gui is running.

`wezterm cli --prefer-mux` will use the original behavior of
trying to resolve the path from the unix domain in the config.
2022-01-06 22:31:42 -07:00
Wez Furlong
91a423da96 docs: changelog for 2a0de16b7b
refs: https://github.com/Canop/broot/issues/473
2022-01-05 20:15:56 -07:00
Wez Furlong
1131f2dce6 docs: changelog for IME/dead key composition 2022-01-05 20:11:41 -07:00
Wez Furlong
32c39fe5ae docs: changelog for #1457 2022-01-04 20:51:58 -07:00
Wez Furlong
359fd15416 docs: fix typo in changelog 2022-01-03 17:20:12 -07:00
Wez Furlong
d4ee3d8958 docs: changelog for #1491
closes: #1491
2022-01-03 17:09:05 -07:00
Wez Furlong
0e92894dad docs: changelog for #1499 2022-01-03 15:03:49 -07:00
Wez Furlong
0f3dcc2c2b docs: changelog for #1498 2022-01-03 12:54:50 -07:00
Wez Furlong
672187973b docs: changelog for #1483 2022-01-03 12:36:22 -07:00
Benoit de Chezelles
462a256e83 Add missing New in latest release's changelog 2022-01-03 07:04:01 -08:00
Wez Furlong
028026049d add window:dead_key_is_active window:leader_is_active
This commit adds a couple of helper methods that provide insight into
the state of the keyboard layer.

The intent is for users to add status information about the keyboard
state.

This commit also ensures that we schedule an update when the leader
key duration expires, and ensures that we close out the leader state
for an invalid key press.

refs: #686
closes: #688

```lua
local wezterm = require 'wezterm';

wezterm.on("update-right-status", function(window, pane)
  local leader = ""
  if window:leader_is_active() then
    leader = "LEADER"
  end
  local dead = ""
  if window:dead_key_active() then
    dead = "DEAD"
  end
  window:set_right_status(leader .. " " .. dead)
end);

return {
  leader = { key="a", mods="CTRL" },
  colors = {
    dead_key_cursor = "orange",
  },
}
```
2022-01-02 19:41:21 -07:00
Wez Furlong
2d62bffe41 window: fix CTRL+C with Russian keyboard on windows
Turns out that we had the same issue on Windows

refs: #678
2022-01-02 16:50:26 -07:00
Wez Furlong
43d9392c52 window: x11/wayland: extract utf8 version of key from key state
Previously, we'd take a couple of guesses at how to map the key
to a utf8 value, but! the keyboard state has a method that can tell
us what to use.

This is important in non-latin keymaps where, for example, the `c`
key generates cyrillic small letter es and we'd end up sending
CTRL + that through to the terminal when CTRL is held down.

If we get the utf8 string from the keyboard layer then we get
CTRL+c instead, and that is what we want.

refs: https://github.com/wez/wezterm/issues/678
2022-01-02 11:16:52 -07:00
Wez Furlong
c05491f831 fonts: fix fontconfig monospace alias resolution
This got broken by 58ece29f00
This commit structures things so that we're less likely to overlook
this in the future!

cc: @unrelentingtech

refs: #1250
2022-01-02 08:26:19 -07:00
Wez Furlong
24840f7e13 docs: add some info about fancy tab bars 2022-01-01 17:14:33 -07:00
Wez Furlong
2d303ec54c docs: update for 20220101-133340-7edc5b5a release 2022-01-01 13:36:37 -07:00
Wez Furlong
f2c0407775 docs: fix typo in changelog 2022-01-01 12:49:05 -07:00
Wez Furlong
0bcd770102 docs: note about get_current_working_dir on windows 2022-01-01 09:18:22 -07:00
Wez Furlong
43dff29391 Sync with iTerm2-Color-Schemes
Sync with:
555db64e47

and update the screenshots for the docs
2021-12-31 10:43:30 -07:00
Wez Furlong
52c198ab8c x11: default use_ime=true, add xim_im_name option 2021-12-31 09:55:17 -07:00
Wez Furlong
143f7c9acc macos: detect when IME swallows a key press (eg: F8, F9)
Certain keys are "handled" by the IME through it generating a "noop"
command.

That's not super useful for us, so this commit detects the noop case
and then treats it as though the IME didn't handle the input event.

While implementing the above fix, I realized that the same technique
could be used more generally to return processing to our main input
handling for the various selectors that we do recognize: we were
essentially inferring the original key combinations based on the
selector which is not scalable and potentially lossy.

We can't capture CTRL-ESC this same way, as that key combination
is magical and is routed to the callback without generating any
key events.

refs: https://github.com/wez/wezterm/issues/615
refs: https://github.com/wez/wezterm/issues/975
refs: https://github.com/wez/wezterm/pull/1410
2021-12-30 22:50:26 -07:00
Wez Furlong
e3afdd7b8f macos: normalize Composed("p") -> Char('p') when use_ime=true
When the IME is enabled, pressing `CTRL-A P` would generate
`Composed("P")` for the second key press, which we couldn't
then match in the keymapping layer.

This commit checks for that and normalizes it to `Char('P')`
instead.

refs: https://github.com/wez/wezterm/issues/1409
refs: https://github.com/wez/wezterm/issues/1410
2021-12-30 21:36:25 -07:00
Wez Furlong
99d73baba7 docs: changelog for https://github.com/wez/wezterm/issues/1474 2021-12-30 09:37:40 -07:00
Wez Furlong
f175c5f6c0 add wezterm.get_builtin_color_schemes() 2021-12-29 09:20:12 -07:00
Wez Furlong
494a0983ee gui: cache shaping and layout of fancy tab bar, allow placing at bottom
We only need to recompute when the tab content changes, or when
the window is resized, plus invalidations of the shape cache
of texture atlas filling up.

Hover events don't need to re-shape.

We can now also place the tab bar at the bottom of the screen again.
2021-12-28 12:29:54 -07:00
Wez Furlong
6ac6ac45b6 lua: add pane:get_logical_lines_as_text
refs: #1468
2021-12-28 08:04:41 -07:00
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
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
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
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
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
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
b1c58b9376 docs: changelog for #1422
closes: #1422
2021-12-23 14:03:39 -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
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
4c04de551f docs: changelog for gamma issues
It's somewhat amusing that the both being too dark and too bright
were the same bug in different directions.

closes: https://github.com/wez/wezterm/issues/1373
closes: https://github.com/wez/wezterm/issues/1025
2021-12-22 22:42:16 -07:00
Wez Furlong
5a60bddba7 logo: switched to alternate logo
refs: https://github.com/wez/wezterm/pull/1454
refs: https://github.com/wez/wezterm/discussions/1142
2021-12-22 20:04:44 -07:00
Wez Furlong
1c9b9f69e0 gui: simplify some text cursor rendering
Remove special case for blocks where we switched it out for a blank
sprite and instead varied the cell background.

We now always render a matching cursor sprite as a separate layer
over the top of the text background color, but below the text
foreground layer.

This is preparing for https://github.com/wez/wezterm/issues/1432

Make bar/line cursors use the text foreground color when reverse
video cursors are enabled, per @VKondakoff:
https://github.com/wez/wezterm/issues/1076#issuecomment-978214136
2021-12-21 22:49:52 -07:00
Wez Furlong
a94c531303 docs: changelog for #1440 2021-12-21 07:57:25 -07:00
Wez Furlong
dd150131b7 fonts: allow setting harfbuzz and freetype options per-font
`wezterm.font` and `wezterm.font_with_fallback` can now specify
harfbuzz_features and freetype load/render target and flags as
options on a per-font basis.

This allows you to do things such as adjust shaping (eg: ligatures) or
rendering (eg: disable bitmaps, or adjust hinting) for a single font in
a fallback rather than globally for all fonts.
2021-12-20 21:56:59 -07:00
Wez Furlong
1203dff277 termwiz: fix 10bpc color bug. Allow hsl color specs
This commit teaches `RgbColor::from_rgb_str` to support
colors in the form `hsl:235 100 50`, an HSL colorspace
color specification.

While banging my head on why my test wasn't passing, I realized
that this was producing 10 bpc color and the code to convert
those to RGB was incorrectly multiplying conversion terms!

refs: https://github.com/wez/wezterm/issues/1436
2021-12-20 10:17:52 -07:00
Wez Furlong
baf879f4f8 upgrade freetype to 2.11.1
refs: #1419
2021-12-20 08:22:34 -07:00
Wez Furlong
e9f1297b45 mux: improve Window closing behavior
Finally getting around to fixing this usability wart: this commit
changes the behavior of Window closing so that you can close a window
containing multiplexer panes without prompting and without killing
off those panes.

This is achieved through some plumbing:

* The mux can now advise Domains about an impending window closure,
  giving them the opportunity to "do things" in readiness.
* The mux client domain informs the container ClientPane instances
  to ignore the next Pane::kill call, which would otherwise inform
  the mux server to kill the remote pane
* Pane:can_close_without_prompting now requires a CloseReason.
* ClientPane's can_close_without_prompting impl allows Window closing
  without prompting on the assumption that the ignore-next-kill hack
  above is working

refs: #848
refs: #917
refs: #1224
2021-12-19 09:07:11 -07:00
Wez Furlong
6b33b8cd8d docs: note about TLS domain SSH bootstrapping fixes 2021-12-18 22:49:25 -07:00
Wez Furlong
04af58f135 docs: changelog for #1402
closes: #1402
2021-12-18 22:43:07 -07:00
Wez Furlong
ea46967e2d mux: understand process tree, add mux-is-process-stateful event
This commit adds plumbing to support mapping the process tree to
lua objects which in turn allows a new `mux-is-process-stateful`
event to be defined by the user for finer control over closing
prompt behavior.

refs: #1412
2021-12-18 09:46:00 -07:00
Wez Furlong
ada35ff3db gui: improve handling of dpi changes especially during window creation
This fixes up the Windows issue, but I wonder if it also helps with the
mac issue?

refs: https://github.com/wez/wezterm/issues/1039
refs: https://github.com/wez/wezterm/issues/1381
2021-12-12 09:27:37 -07:00
Wez Furlong
20e424f54b add default_gui_startup_args config
closes: https://github.com/wez/wezterm/issues/1030
2021-12-11 23:18:22 -07:00
Wez Furlong
e352c40905 ssh domains now support ssh_config overrides
closes: https://github.com/wez/wezterm/issues/1149
2021-12-11 22:30:54 -07:00
Wez Furlong
66908eabb4 add ScrollToTop and ScrollToBottom key assignments
refs: https://github.com/wez/wezterm/issues/1360
2021-12-11 22:02:31 -07:00
Wez Furlong
88688e32c7 update harfbuzz to 3.2.0 2021-12-11 20:36:53 -07:00
Wez Furlong
1ce261f7a9 mux: add proxy_command to unix_domains
Potentially enables using the mux with WSL 2 on Windows,
although this commit was authored and tested on a mac.
2021-12-11 17:29:37 -07:00
Wez Furlong
fa70a50af4 docs: changelog for #1310 and #1140 2021-12-11 15:45:36 -07:00
Wez Furlong
b30d735341 docs: changelog for https://github.com/wez/wezterm/issues/1197 2021-12-11 15:42:26 -07:00
Wez Furlong
9002bb241f docs: changelog for #1270, #1300 2021-12-11 10:54:18 -07:00
Wez Furlong
7b402678e4 gui: fix initial pixel geometry on hidpi displays
refs: #1387
2021-12-10 09:20:41 -07:00
Wez Furlong
f11f2c72a3 fix: wezterm cli --no_auto_start switch had no effect
I upgraded Rust and it told me this field of the args
was never read; this commit plumbs that through!
2021-12-10 08:14:05 -07:00
Wez Furlong
348ddcb122 quickselect: de-dup labels
refs: #1271
2021-12-09 09:50:32 -07:00
Wez Furlong
b9aec2fcad tabbar: fix double wide characters in tab titles
refs: #1371
2021-12-09 08:34:19 -07:00
Wez Furlong
4dd014b14e macos: enable rounded corners when title is disabled
refs: https://github.com/wez/wezterm/issues/1034
2021-12-08 21:44:21 -07:00
Wez Furlong
66c3b05f53 docs: changelog for #1376 2021-12-08 08:31:22 -07:00
Wez Furlong
89d94e1a07 docs: changelog for https://github.com/wez/wezterm/pull/1377 2021-12-08 08:28:33 -07:00
Wez Furlong
15dcfa4c48 docs: changelog for https://github.com/wez/wezterm/issues/1365 2021-12-05 20:21:18 -07:00
Wez Furlong
54f1914cce docs: changelog for windows/mux fixes 2021-12-05 19:24:59 -07:00
Wez Furlong
2457eeea18 Windows: fix spawning wezterm-gui
The attach-parent-console should go before any other arguments.

refs: #1278
2021-12-05 07:03:52 -08:00
Wez Furlong
0ada2d7fc3 docs: fix typo 2021-12-04 10:22:03 -07:00
Wez Furlong
56c2b823ab docs: update changelog for release 2021-12-04 10:21:25 -07:00
Wez Furlong
a66c61ee99 docs: changelog for https://github.com/wez/wezterm/issues/1279
closes: https://github.com/wez/wezterm/issues/1279
2021-12-04 08:22:13 -07:00
Wez Furlong
4b71d41c5a docs: changelog for #1256 2021-12-04 08:19:03 -07:00
Wez Furlong
20475ab32e docs: fix typo in changelog 2021-12-03 08:56:09 -07:00
Wez Furlong
6c26b9e524 docs: changelog for code signing on macos
closes: https://github.com/wez/wezterm/issues/482
2021-12-02 21:33:04 -07:00
Wez Furlong
d8864696c7 docs: changelog for https://github.com/wez/wezterm/pull/1338 2021-12-02 21:25:55 -07:00
Wez Furlong
8e864c16e1 docs: changelog for #1278
closes: #1278
2021-11-25 12:30:41 -07:00
Wez Furlong
d69df605cd Add escape sequence to control unicode version
As promised in the previous commit, this one implements an escape
sequence to control the unicode version.

Unknown to me in the previous commit, iTerm2 already defines such
an escape sequence, so we simply implement it here with the same
semantics.

refs: #1231
refs: #997
2021-11-25 12:12:52 -07:00
Wez Furlong
bf9a95ea1b remove our incomplete allsorts shaper implementation
We rely on using freetype in order to support more fonts in more
situations, and we have a deeper existing integration with harfbuzz.

I'm unlikely to come back to allsorts to complete our integration,
and in the meantime, it just adds overhead to build/test and those
builds are taking longer and longer.

I loved the idea of using pure rust for all the font stuff, but
its time is not now.

closes: #587
closes: #66
2021-11-23 05:43:13 -07:00
Wez Furlong
a006f9a119 docs: changelog for #1330 2021-11-21 08:51:53 -07:00
Wez Furlong
f3a2e841ca allow using relative cwd for wezterm cli subcommands
refs: #1243
2021-11-13 21:00:09 -07:00
Wez Furlong
da3296892e docs: changelog for #1301 2021-11-13 12:44:51 -07:00
Wez Furlong
30ab6f2026 docs: changelog for #1311 2021-11-13 09:34:58 -07:00
Wez Furlong
4225610c09 add config option to enable resize increments, disable by default
refs: #1254
refs: #1289
2021-11-09 08:30:58 -07:00
Wez Furlong
1ec7e10c19 fonts: ls-fonts now handles system fallback lists, adds Menlo on macos
It appears as though Menlo is the only font on macos to contain the
heavy ballot cross symbol, which is commonly used on macos (eg: in
`brew` output).

Our fallback list, despite starting with Menlo, didn't include menlo
itself in the candidates.

Furthermore, `ls-fonts` wouldn never see the result of the system
fallback resolution because it didn't know to try again, and was
using the list of handles from before the fallback.

This commit resolves all of these concerns.

refs: #849
2021-11-08 22:49:52 -07:00
Wez Furlong
2dc3db7648 docs: changelog for #1249 2021-11-03 07:01:27 -07:00
Wez Furlong
c1a766404c config: add ssh_backend config, and default to libssh
refs: #1014
2021-10-21 07:16:42 -07:00