1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-10 15:04:32 +03:00
Commit Graph

5045 Commits

Author SHA1 Message Date
Sandro Jäckel
3cc26cc7b8 Tell shellcheck the right shell that not everyting lights up like a christmas tree 2022-01-21 09:22:58 -08:00
George Negoita
2e4e7e9ea4 Added missing flag in documentation about listing system fonts 2022-01-21 09:18:28 -08: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
85a6b178cf termwiz: recognize some bidi-related escape sequences
We don't do anything with these; this is just teaching
the parser how to recognize these codes.

refs: https://github.com/wez/wezterm/issues/784
2022-01-20 07:37:19 -07:00
Wez Furlong
2deba1ece4 fonts: fix ligature widths at the cost of unicode version conformance
refs: #1563
2022-01-19 18:16:48 -07:00
Wez Furlong
4bc10a75d9 fonts: adopt k9 snapshots for shaper tests 2022-01-19 18:01:07 -07:00
Wez Furlong
60ea06e188 revise default xcursor path
refs: https://github.com/wez/wezterm/issues/524#issuecomment-1015984205
2022-01-18 19:26:44 -07:00
Wez Furlong
a590955229 spawning a new tab didn't unfocus current pane
This commit centralizes the focus-loss logic to the Window so
that activating a new tab will deactivate the pane in the current
window.

Note that this cannot see overlays in the gui, but overlays shouldn't
care about focus, so it should be ok.

refs: https://github.com/wez/wezterm/discussions/796
2022-01-18 18:56:26 -07:00
Wez Furlong
067c376eec termwiz: fix mouse reporting on windows
We didn't enable it for VT mode enabled windows consoles!
2022-01-18 13:43:54 -07:00
Wez Furlong
0bf1b8d13e Plumbing for unseen activity indication
This commit enables the following config to work for local (not mux yet!)
panes:

```lua
local wezterm = require 'wezterm'

wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width)
  if tab.is_active then
    return {
      {Background={Color="blue"}},
      {Text=" " .. tab.active_pane.title .. " "},
    }
  end
  local has_unseen_output = false
  for _, pane in ipairs(tab.panes) do
    if pane.has_unseen_output then
      has_unseen_output = true
      break;
    end
  end
  if has_unseen_output then
    return {
      {Background={Color="Orange"}},
      {Text=" " .. tab.active_pane.title .. " "},
    }
  end
  return tab.active_pane.title
end)

return {
}
```

refs: https://github.com/wez/wezterm/discussions/796
2022-01-18 09:38:46 -07:00
Wez Furlong
0fe7a22f67 expose pixel positioning config option
refs: #1563
2022-01-18 08:13:30 -07:00
Alhadis
807f483462 Fix typo in strip-ansi-escapes --help output 2022-01-18 06:18:15 -08: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
2c44abc700 fix naming of get_semantic_prompt_zones
It previously had the more generic name of get_semantic_zones
which implied that it cached all zones, but this method is
scoped only to Prompt zones.
2022-01-17 22:25:43 -07:00
Wez Furlong
e188406dfc make semantic zones more cacheable
This commit decomposes the main get_semantic_zones method into two
parts:

* A per-line portion, where the line ranges are cached (invalidated on
  change)
* The overall screen portion, where the line ranges are merged

This changes the overall complexity of computing zones from

   O(width * scrollback-height)

To an incremental:

   O((width * number of changed lines since last query) + scrollback-height)

You can see some samples of elapsed time below; those show the times for
running both the old and the new implementation on the same data.  The
number of lines/zones in the scrollback increases with each call and you
can see that the new implementation is a bit faster anyway at low
volumes but is significantly faster as the number of lines/zones
increases, because the amount of work is reduced.

```
get_semantic_zones: 71.708µs
get_semantic_zones_new: 59.041µs
get_semantic_zones: 71.166µs
get_semantic_zones_new: 9.166µs
get_semantic_zones: 44.291µs
get_semantic_zones_new: 4.208µs
get_semantic_zones: 69.791µs
get_semantic_zones_new: 10.291µs
get_semantic_zones: 59.375µs
get_semantic_zones_new: 7.958µs
get_semantic_zones: 52.5µs
get_semantic_zones_new: 4.5µs
get_semantic_zones: 91.791µs
get_semantic_zones_new: 20.916µs
get_semantic_zones: 229.916µs
get_semantic_zones_new: 109.208µs
get_semantic_zones: 224.125µs
get_semantic_zones_new: 15.208µs
get_semantic_zones: 291.791µs
get_semantic_zones_new: 11.833µs
get_semantic_zones: 238.875µs
get_semantic_zones_new: 12.625µs
get_semantic_zones: 468.458µs
get_semantic_zones_new: 126.583µs
get_semantic_zones: 460.5µs
get_semantic_zones_new: 25.666µs
get_semantic_zones: 358.291µs
get_semantic_zones_new: 19.541µs
get_semantic_zones: 436.833µs
get_semantic_zones_new: 17.875µs
get_semantic_zones: 313.166µs
get_semantic_zones_new: 15.25µs
get_semantic_zones: 333.958µs
get_semantic_zones_new: 16.541µs
get_semantic_zones: 364.666µs
get_semantic_zones_new: 14.041µs
 ```
2022-01-17 22:00:38 -07:00
Wez Furlong
ebef7dc659 tmux: when resizing locally, inform tmux of new size
This isn't really correct: if there are splits, this is most
likely going to do the wrong thing.

refs: #336
2022-01-17 16:55:41 -07:00
Wez Furlong
11a9d9065e handle ESK k title ST sequence used by tmux
refs: #336
2022-01-17 15:47:39 -07:00
Wez Furlong
01fe56fe57 ci: explicitly install rustfmt 2022-01-17 15:14:32 -07:00
Wez Furlong
eb2b4fcce5 ci: use nightly toolchain for fmt workflow 2022-01-17 15:00:31 -07:00
Wez Furlong
4ebbc6688d tmux: capture initial screen contents
refs: #1090
2022-01-17 14:36:57 -07:00
Wez Furlong
0eb1417c84 tmux: fix send-keys
Needs the % prefix to find the pane by id

refs: #1090
2022-01-17 14:20:05 -07:00
Wez Furlong
1c38c611f3 Split up some of the tmux state 2022-01-17 14:15:41 -07:00
Wez Furlong
e4ed2c93e2 encoding my preferred import grouping in the rustfmt config
This uses an unstable option in rustfmt, you `cargo +nightly fmt`
needs to be used to format the code correctly.
2022-01-17 13:50:51 -07:00
Wez Furlong
8f31aed3f1 move tmux-cc crate to be module inside termwiz
refs: #1090
2022-01-17 13:43:35 -07:00
Wez Furlong
db01691359 fix build
refs: #1090
2022-01-17 13:29:40 -07:00
g4c
9b7489ed97 buffer extra large message before write to mux 2022-01-17 13:08:41 -07:00
g4c
cf22db9b96 clean unwrap 2022-01-17 13:08:41 -07:00
g4c
1bdc952d9d fix log level 2022-01-17 13:08:41 -07:00
g4c
8ee5c295f7 doc and cleanup 2022-01-17 13:08:41 -07:00
g4c
6928415461 fix send-keys tmux command 2022-01-17 13:08:41 -07:00
dixeran
071aefc822 fix windows build 2022-01-17 13:08:41 -07:00
g4c
1a73a2feaa write into tmux 2022-01-17 13:08:41 -07:00
g4c
3054fd045e concat tmux parser buffer and unparsed bytes 2022-01-17 13:08:41 -07:00
g4c
64d38c94c5 nicely quit tmux mode 2022-01-17 13:08:41 -07:00
g4c
ac4d1a2a26 condvar for session release 2022-01-17 13:08:41 -07:00
g4c
b899c81d19 create gui when attach to exist session 2022-01-17 13:08:41 -07:00
g4c
a26f190c7c it worked! 2022-01-17 13:08:39 -07:00
g4c
e45a268ed1 [WIP] sync tmux panes 2022-01-17 13:08:14 -07:00
g4c
b0f0050daf send tmux output 2022-01-17 13:08:14 -07:00
g4c
b0ff7707aa tmux pty 2022-01-17 13:08:14 -07:00
g4c
007a0c1b27 split out tmux command process 2022-01-17 13:08:12 -07:00
g4c
8e04f49d03 split out tmux commands 2022-01-17 13:07:36 -07:00
g4c
18dd3e90bc tmux domain handle events 2022-01-17 13:06:03 -07:00
g4c
a7b60c8d88 handle tmux events DCS event 2022-01-17 13:06:03 -07:00
g4c
f36d4c6734 parse tmux control mode events
when in tmux mode, bypass vtparse
2022-01-17 13:06:03 -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
d169088694 fix clipping issue in fancy tab bar
We budget size based on the x_advance, which can be 1 pixel less
than the width of the glyph texture, so we could often end up
omitting the last character in "Launcher" or "default" in the
tab title or right status area.

This commit uses x_advance in both places.
2022-01-17 09:24:23 -07:00