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

1765 Commits

Author SHA1 Message Date
Wez Furlong
e771fa4c5e
docs: changelog for #3334 2023-04-20 08:07:25 -07:00
Wez Furlong
006b0cc52b
docs: changelog for #3564 2023-04-20 08:04:28 -07:00
Wez Furlong
8c975a7681
keys: don't hide mouse cursor when pressing only modifier keys
Further constrain the hiding logic for key-down events, so that
we are less likely to hide for things ctrl-shift-c when the user
is mousing around and copy/pasting.

Also, consider CapsLock to be a modifier for this and other
similar purposes.

refs: #3570
refs: #3306
2023-04-20 07:53:20 -07:00
Asher
39638059ef Update format-tab-title.md 2023-04-20 07:12:41 -07:00
Wez Furlong
15f00ebf0c
deps: freetype -> 2.13.0 2023-04-19 22:29:09 -07:00
Wez Furlong
4038b80048
deps: update harfbuzz to 7.1.0 2023-04-19 22:11:21 -07:00
Wez Furlong
af2df3e8f3
ci: rm fedora 35, add fedora 38 2023-04-19 21:51:17 -07:00
Wez Furlong
21e19ca091
x11/wayland: improve non-latin ctrl/alt keypresses
For eg: RU layout, CTRL-S shouldn't result in ы in the context
of a terminal.

The approach taken here is similar to kitty; when the key combination
doesn't produce a definitive composed output, and when any of
ctrl/alt/super are present, we treat the keypress as though it were
the same as the one from the system default keymap.

The result is that ctrl-c now works like ctrl-c and alt-b and alt-f work
like their latin counterparts.

Hopefully there are no downsides to this!

refs: https://github.com/wez/wezterm/issues/2845
refs: https://github.com/kovidgoyal/kitty/issues/606
2023-04-19 09:37:58 -07:00
Wez Furlong
db720bd78c
docs for #3559 2023-04-18 15:06:23 -07:00
Wez Furlong
44eccffe0c
macos: fix font size issue when spawning on external monitor
The main part of the problem is that NSWindow::isZoomed lies to us
sometimes.

This is a relatively gross workaround.

Add missing invalidation after setting the content size; that prevents
janky when dragging the window between monitors.
Removed some redundant Dimensions computation from that method; nothing
ever read it.

refs: https://github.com/wez/wezterm/issues/3503
2023-04-18 10:35:58 -07:00
Wez Furlong
7dc146708d
docs: update changelog for #3471 #3491 2023-04-18 08:36:04 -07:00
Mat Jones
2f4266cb6a
feat: resize pane from CLI (#3491)
* WIP resize pane from CLI

* fix response types

* fix: remove unneeded `import std::usize;`

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

* fix: update derived files

* fix: update codec version

* chore: update changelog.md

* fix: remove unneeded `import std::usize;`

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

* chore: update changelog.md

* remove erroneous changelog.md change

* remove erroneous changelog.md change

* remove whitespace changes

---------

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2023-04-18 08:34:39 -07:00
Wez Furlong
57f07083c7
docs: try to make it easier to find the full list of options
refs: https://github.com/wez/wezterm/discussions/3545#discussioncomment-5645235
2023-04-18 07:58:00 -07:00
Wez Furlong
1e8fd7a95b
expand tiling_desktop_environments list 2023-04-17 22:35:02 -07:00
Wez Furlong
87cd9c5f6c
adjust_window_size_when_changing_font_size now considers tiling WMs
It's a little limited in the scope of its detection: we have a built-in
list of tiling WM environments and if the current one is on the list
then we set an appropriate value for this option.

The list currently has just a single entry.
2023-04-17 21:58:08 -07:00
Wez Furlong
79e82d3054
docs: note about flatpak limitations
refs: https://github.com/wez/wezterm/issues/3552
2023-04-17 18:15:27 -07:00
Wez Furlong
b9f6bbd495
make the default front_end=WebGpu 2023-04-17 18:00:51 -07:00
Wez Furlong
38da9d7e51
docs: win32_system_backdrop
refs: #3528
refs: https://github.com/wez/wezterm/issues/1614
2023-04-17 07:04:00 -07:00
Wez Furlong
a4cf01dd55
docs: changelog for various kitty keyboard issues 2023-04-16 20:59:11 -07:00
Wez Furlong
075388fbe5
add window:keyboard_modifiers() method 2023-04-16 19:53:32 -07:00
Wez Furlong
3f820b93d9
Fix win32 input mode encoding inconsistencies
This pulls in almost all of the original PR in #2235.
I skipped a dead key case that I recall being tricky:
I didn't want to break the non win32-input mode version
of that.

I'd be happy to have that case re-evaluated in a smaller
PR where we can focus on its details.

Co-authored-by: Dominik Kreutzer <kreudom@gmail.com>
2023-04-16 13:07:18 -07:00
Wez Furlong
7aa611f4cb
windows: fix linger wezterm-gui when closing with overlay active
refs: #3522
2023-04-16 12:23:00 -07:00
Wez Furlong
6d3dee733f
windows: fix maximize button with OS titlebar
refs: #3499
2023-04-16 11:56:05 -07:00
Lokesh Krishna
ea5b86b469 Update appearance.md
Changes `window.colors` to `config.colors`
2023-04-16 09:12:44 -07:00
Wez Furlong
4ba653c716
fix width of format-tab-title that returns embedded escapes
closes: #3481
2023-04-16 08:28:35 -07:00
Wez Furlong
6ec11393d5
fix decoding png images without an alpha channel
refs: #3529
2023-04-15 23:59:02 -07:00
Wez Furlong
08972faff2
user-var-changed event should only trigger in the containing window
refs: https://github.com/wez/wezterm/issues/3524
2023-04-15 11:33:01 -07:00
Wez Furlong
88cc82d294
docs: changelog for #3497 #3466 #837 2023-04-11 22:14:18 -07:00
Wez Furlong
b5c7374f4b
docs: fix typo 2023-04-11 08:38:01 -07:00
Netboy3
c0accafe95 docs: add section regarding ssh_domains auto-populate and its use 2023-04-10 20:52:48 -07:00
Wez Furlong
fa0f538d36
mux: detect dead ssh session and reconnect
The issue was that the session was rendered dead/unusable by closing
all of the tabs.

We now detect this and create a new session.

refs: https://github.com/wez/wezterm/discussions/3480#discussioncomment-5567569
2023-04-10 20:47:17 -07:00
Asher
b0ceebbc2d Update format-tab-title.md 2023-04-10 09:12:56 -07:00
Wez Furlong
d239e65e64
fixup kitty keyboard encoding for F1-F4
refs: https://github.com/wez/wezterm/issues/3473
2023-04-08 18:19:07 -07:00
Wez Furlong
b9b0f36692
fix OS keymapping issue with modals
Need to defer to the second pass (when we have mapped from physical
keys) before we route the key event to the modal.

refs: https://github.com/wez/wezterm/issues/3470
2023-04-08 15:31:48 -07:00
Wez Furlong
f535c5bdc0
docs: update for 20230408-112425-69ae8472 release 2023-04-08 15:01:26 -07:00
Wez Furlong
69ae847273
windows: fix: mess up full screen mode on config reload
refs: https://github.com/wez/wezterm/issues/3439
2023-04-08 11:24:25 -07:00
Wez Furlong
436847665d
docs: update for wezterm replay changes
refs: #3446
2023-04-08 08:35:14 -07:00
Wez Furlong
b4c8f7c01f
docs: explain what font shaping actually is 2023-04-08 07:52:55 -07:00
Wez Furlong
84f7fb9f3b
docs: add tags to a number of pages 2023-04-08 07:48:40 -07:00
Wez Furlong
36d5307b80
wayland: fix webgpu invalidation issue
For whatever reason, it appears as though the wayland
frame event stuff is unreliable when used with webgpu,
so we simply avoid using it.

refs: https://github.com/wez/wezterm/issues/3126
2023-04-07 22:15:07 -07:00
Wez Furlong
7b40f01054
switch to fancy-regex crate
Enables back references and look around assertions for quick select
and hyper link rules

refs: https://github.com/wez/wezterm/issues/3247
2023-04-07 17:39:00 -07:00
Wez Furlong
b0d0e4c1be
docs: for integrated title buttons
refs: https://github.com/wez/wezterm/pull/2722
refs: https://github.com/wez/wezterm/issues/1180
2023-04-07 13:10:45 -07:00
Wez Furlong
cbbe0da9d7
schemes: fix origin url when importing toml files 2023-04-07 10:48:19 -07:00
Wez Furlong
0a0c939c6f
add more color schemes
Primarily those from https://codeberg.org/anhsirk0/wezterm-themes
but also updated the others
2023-04-07 10:43:32 -07:00
Wez Furlong
da5ec63b26
docs: update color scheme versions
forgot to do this as part of a prior release
2023-04-07 10:41:53 -07:00
Wez Furlong
b45a4d7215
add wezterm.has_action
refs: https://github.com/wez/wezterm/issues/3454
2023-04-06 20:46:32 -07:00
Wez Furlong
b1c58bad39
Make background painting more consistent when window is transparent
These conditions were from the earliest days of panes and aren't
needed any more, especially because they make it hard to have
consistent behavior!

refs: https://github.com/wez/wezterm/issues/3450
2023-04-06 19:55:55 -07:00
Wez Furlong
60566c7119
docs: fix link 2023-04-06 17:17:06 -07:00
Wez Furlong
0ca050e09d
expose the tty name associated with a pane 2023-04-06 17:13:07 -07:00
Wez Furlong
889390a448
docs: update gui.get_appearance example for mux
refs: https://github.com/wez/wezterm/issues/3453
2023-04-06 15:55:20 -07:00
Wez Furlong
760864b6b2
quick select: make user patterns take precedence
I think the future for this is to extend the Pattern type to accept
a list of regexes and use a RegexSet to unambiguously handle multiple
patterns with captures.

That might help a little with https://github.com/wez/wezterm/issues/3247
but the stated use in that issue may not even work with the rust
regex crate.

For now we do the simple thing and match the user's patterns
first.

refs: https://github.com/wez/wezterm/issues/3456
2023-04-06 15:52:52 -07:00
Wez Furlong
e3e9821c4d
Add InputSelector action
Allows prompting the user to select from a list and then
triggering some action on the selected item.

This is the guts of the launcher menu hooked up to user-supplied
arbitrary entries.
2023-04-05 17:22:09 -07:00
Wez Furlong
dacd19c9f7
docs: ... and format the examples 2023-04-05 08:19:54 -07:00
Wez Furlong
3910291d4d
docs: update format-tab-title examples
nudge folks towards making their custom formatting aware of the
new tab title stuff
2023-04-05 08:18:50 -07:00
Wez Furlong
9b67a71485
add wezterm cli get-pane-direction
refs: https://github.com/mrjones2014/smart-splits.nvim/issues/53
2023-04-05 07:00:49 -07:00
Wez Furlong
336fefb52f
Add PromptInputLine and examples of (re)naming tabs/workspaces
refs: https://github.com/wez/wezterm/issues/522
refs: https://github.com/wez/wezterm/issues/1598
2023-04-04 21:11:08 -07:00
Wez Furlong
11dc59b613
mux: explicitly update tab/pane active status on focus change
Previously, we'd record the focused pane only in the per-client
view.

That status didn't propagate through the model fully, leading to
inconsistencies when using activate-pane-direction.

This commit does the full model update to force that through.
I may regret this later: the focus state was intended to be
a per-client attribute and this effectively prevents that
from ever being useful.

Maybe the per-client state should just be removed?
Will ponder that later.

refs: https://github.com/wez/wezterm/issues/3448
refs: https://github.com/wez/wezterm/issues/3387

Also sneaking in here is not updating the last input time
for a client unless the input was taken by a user.
2023-04-04 17:31:35 -07:00
Wez Furlong
4be2b9dbeb
make config_builder work with table.insert(config.keys, ...)
This had a referencing issue, similar to the more recent GLOBALS
issue.

The resolution in this case is a lot simpler: we can just return
a regular lua table and use all the same underlying semantics,
but stick a metatable over the top to handle assignment and
provide the strict mode method.
2023-04-04 11:43:21 -07:00
Wez Furlong
8ddd0d986d
mux: spawn: only use the cwd from a pane in a compatible domain
If the target domain_id doesn't match the source pane.domain_id(),
then we consider the filesystem namespace to be incompatible and
won't try to use it.

refs: https://github.com/wez/wezterm/issues/3442
2023-04-03 22:46:17 -07:00
Wez Furlong
e28b3cec4e
mux: fix unseen output status for remote panes
refs: #2625
2023-04-03 21:12:18 -07:00
Wez Furlong
ad953c535e
docs: changelog for #1872 2023-04-03 20:37:10 -07:00
Wez Furlong
c3472cc969
ssh: fix token expansion for ProxyCommand
refs: https://github.com/wez/wezterm/issues/3437
2023-04-03 17:04:53 -07:00
Wez Furlong
b3f52acc02
docs: Add sponsor page 2023-04-02 23:14:42 -07:00
Wez Furlong
49296500da
mux: forward ClearScrollback requests to remote server
refs: #2624
2023-04-02 14:17:05 -07:00
Wez Furlong
3dc2ac0a75
fix wezterm connect --workspace
When creating the initial window, we didn't pass through the
provided workspace name.

refs: #2734
2023-04-02 14:04:20 -07:00
Wez Furlong
b853d00cff
mux: detach domain on window close
refs: #2644
2023-04-02 13:35:12 -07:00
Wez Furlong
50172f2e88
add wezterm.mux.rename_workspace
refs: #2787
2023-04-02 08:03:07 -07:00
Wez Furlong
741570563d
add wezterm cli rename-workspace
refs: #2787
2023-04-02 07:37:45 -07:00
Wez Furlong
000269261b
add wezterm cli set-tab-title and wezterm cli set-window-title
refs: #1598
refs: #522
2023-04-01 23:00:00 -07:00
Wez Furlong
dd7d22ed6b
mux: propagate tab and window title when it changes
refs: #1598
2023-04-01 21:31:37 -07:00
Wez Furlong
ea28fb891a
add window:active_tab(), window:active_pane(), tab:active_pane() 2023-04-01 19:46:15 -07:00
Wez Furlong
8582165ffc
add display_pixel_geometry config option for subpixel geometry
refs: #3422
2023-04-01 11:05:09 -07:00
Wez Furlong
a7052cb188
docs: changelog for #2722
refs: #2722
2023-03-31 23:10:12 -07:00
Wez Furlong
74da631430
mux: allow client to provide palette to mux server
The server-side ownership of the palette is a stumbling block for
many users, so let's fix it.

This commit allows the client to pass its configured palette to
the server when it connects, and when the config is changed.

That palette takes precedence over the palette from the server config.

However, if the remote application uses any escape sequences that
redefine the color palette, the color palette that was active at
that point in time is forked and use as the basis, and will remain
the active palette until the palette is reset via escape sequences.

refs: https://github.com/wez/wezterm/issues/2686
refs: https://github.com/wez/wezterm/issues/3397
2023-03-31 08:02:32 -07:00
Wez Furlong
0360619e4b
docs: fix list syntax 2023-03-31 05:46:51 -07:00
Evgeny
20b0933d74 doc: mention that hyperlink prefix is required 2023-03-31 05:33:27 -07:00
Artyom Nesterenko
78a4477688 Add Homebrew tap for nightly build 2023-03-30 22:27:27 -07:00
Doctor Who
35a1882280 Update webgpu_preferred_adapter.md
Added missing `Gpu` prefix in test condition.
2023-03-30 22:20:27 -07:00
Wez Furlong
d1c2257bd8
macos: fix CTRL key behavior when use_ime=true
refs: https://github.com/wez/wezterm/pull/2435
refs: https://github.com/wez/wezterm/issues/2771
refs: https://github.com/wez/wezterm/issues/2630
2023-03-30 21:49:48 -07:00
Wez Furlong
76060b7cc2
win:perform_action now works with Copy Mode and other overlays
refs: #3209
2023-03-30 19:46:02 -07:00
Wez Furlong
4a555be7d9
gui: win:perform_action now awaits the underlying perform_key_assignment
This should help a bit with https://github.com/wez/wezterm/issues/3405
even though there is a better solution for the scenario mentioned there.
2023-03-30 19:31:40 -07:00
Wez Furlong
c766d5e465
fix is_zoomed property in tab:get_panes_with_info()
refs: #3404
2023-03-30 07:44:38 -07:00
Seto Kuslaksono
b50a646b4f Fix minor typo
As a new user I got confused why there's nothing happen when I create config file named `wezterm.lua` while it should be named `.wezterm.lua`
2023-03-29 22:32:50 -07:00
Wez Furlong
e9feb578c8
docs: cover new default ssh domain behavior and function 2023-03-29 21:01:54 -07:00
Wez Furlong
ab4af5ce11
docs: fixup a couple of Since thingies 2023-03-29 19:17:16 -07:00
Wez Furlong
1e688a5128
Add serial_ports config
This commit teaches the config about SerialDomains, and the mux
layer about constructing a SerialDomain, then changes the GUI
layer to use those pieces to set up `wezterm serial`.

A new `serial_ports` config is added, and the GUI layer knows how
to apply it to the set of domains in the mux.

The result of this is that you can now define a domain for each
serial port and spawn a serial connection into a new tab or window
in your running wezterm gui instance.
2023-03-29 19:05:13 -07:00
Ruben Laguna
e38a06d640 Fix broken link to list of features
The website https://wezfurlong.org/wezterm/ has a broken link , the "A full list of features can be found here" points to https://wezfurlong.org/wezterm/features.md (404 not found).

This fix uses the type of hyperlink that will work properly when rendered as HTML.
2023-03-29 12:00:13 -07:00
Wez Furlong
4b2e386df2
fix broken link on features page 2023-03-29 11:32:26 -07:00
Wez Furlong
338174b430
mux: fix pid file locking
This got broken around the time we started to re-exec the mux
server.  Since the fd was CLOEXEC we'd essentially unlock and
ignore the lock at the point we'd re-exec.

This commit allows the fd to remain open and locked across
the exec, and causes the exec'd process to set CLOEXEC by
explicitly telling it about the log fd, so that shells and
things spawned by the mux don't hold the lock.
2023-03-29 06:10:11 -07:00
Wez Furlong
ea92df9486
mux server: propagate config CLI options when daemonizing
refs: #3397
2023-03-29 05:40:15 -07:00
Wez Furlong
90fc554035
docs: changelog for https://github.com/wez/wezterm/issues/3390 2023-03-28 22:19:30 -07:00
Wez Furlong
07e1c5834b
mux: more robust handling of pane killing
Work harder to notice and handle the PaneRemoved notification
more centrally, which allows removing some earlier workarounds.

Now when we receive PaneRemoved, we take the opportunity to handle
missing mapping or stale mapping between local and remote ids and
perform a resync before continuing to handle the PaneRemoved message.

Doing it this way means that we don't need to second guess the timing
of notification or the resync, so we end up with the correct sequence
of notifications, and the result is the correct size of the splits
because the local and remote aren't independently managing the
the pane removal with conflicting ideas of the new size.

refs: https://github.com/wez/wezterm/issues/3386
2023-03-28 08:47:28 -07:00
Wez Furlong
a7fde7935b
raise ulimit nofile and nproc to a reasonable min value on unix systems
It's a tremendous PITA for the user to do this at the system level on a
mac, where it is sorely needed.  This commit allows raising to a desired
minimum level, but won't decrease from an already larger soft limit.

refs: https://github.com/wez/wezterm/discussions/3353
2023-03-28 07:29:47 -07:00
Wez Furlong
cb5252a246
mux client: GC unreferenced remote window/tab/pane ids on resync
refs: #2759
2023-03-27 21:38:29 -07:00
Wez Furlong
dd16e586c3
add pane:activate() and tab:activate()
refs: #3217
2023-03-27 21:12:10 -07:00
Wez Furlong
f8c60dcddc
docs: update for latest release 2023-03-26 19:45:32 -07:00
Wez Furlong
3666303c7b
docs: show the return values of the new pane:move_to_xxx methods 2023-03-26 11:19:34 -07:00
Wez Furlong
e56b169cc4
mux: add lua api equivalent to move-pane-to-new-tab
refs: #3374
2023-03-26 11:08:43 -07:00
Wez Furlong
d9d6b2a01a
mux: forward move-pane-to-new-tab requests to hosting mux
refs: #3374
2023-03-26 10:41:01 -07:00
Nelson Benitez Leon
24ec8a0382 hyperlink_rules.md: add link supported regex syntax
Add a link to regex syntax supported in wezterm, so eg. we have a way to know that perl character class '\c' is not supported and instead we can use the ascii equivalent [:cntrl:]
2023-03-25 22:08:04 -07:00
Wez Furlong
98e137942a
mux: move-pane-to-new-tab didn't resync structure
Resolution is to propagate the MuxNotification to the clients
and have them resync.

refs: https://github.com/wez/wezterm/issues/3219
2023-03-25 20:50:03 -07:00
Wez Furlong
8dd365d4c5
mux: fix some dpi and pixel size issues
Three issues:

* The initial connect would leave the dpi assigned to 0, resulting
  in incorrect scaling when using imgcat until the window was resized
  and the correct dpi was passed up.
* On resize, we'd only compare the row/col count and not notice changes
  in pixel dimensions/dpi
* On the server side, when processing a resize and recomputing
  the tab size, we would omit the pixel dimensions and leave
  the resulting tabs and panes with 0 dimensions, breaking imgcat
  because it thought the window was 0x0.

refs: https://github.com/wez/wezterm/issues/3366
2023-03-25 20:24:57 -07:00
Wez Furlong
d491c736ef
When a modal is active, it gets first dibs on key processing
This fixes a surprising interaction between copy mode and the
command palette, but is also the root cause of another issue
with CharSelect mode.

refs: https://github.com/wez/wezterm/issues/2947
2023-03-25 18:32:38 -07:00
Wez Furlong
1c55ca14b0
macos: invalidate window when dispatching from menubar
refs: https://github.com/wez/wezterm/issues/3365
2023-03-25 13:47:54 -07:00
Wez Furlong
133faf8305
Add new-tab-button-click event
refs: #323
refs: https://github.com/wez/wezterm/discussions/3364
2023-03-25 13:26:16 -07:00
Wez Furlong
843b9e8fc4
update bundled JetBrainsMono to 2.304 2023-03-25 07:18:29 -07:00
Wez Furlong
499e5f73d0
palette: show the label from the command in the palette
Given an assignment like this:

```
{
  key = "b",
  mods = "ALT",
  action = wezterm.action.SplitPane {
    direction = 'Right',
    command = {
      label = 'Bash Right',
      args = {'/usr/bin/bash' }
    }
  }
}
```

we should show the label from the command in the palette.
That's what this commit enables.

If there is no label, but the arguments are set, then the
arguments will be shown instead.

refs: #3252
2023-03-24 21:05:14 -07:00
Wez Furlong
b113cc909e
docs: changelog for https://github.com/wez/wezterm/pull/3344 2023-03-24 19:23:47 -07:00
Wez Furlong
a903796d61
docs: clarify the default for allow_square_glyphs_to_overflow_width 2023-03-24 18:45:45 -07:00
Wez Furlong
3ee0335a40
more entitlements on macos
refs: https://github.com/wez/wezterm/issues/3359
2023-03-24 18:33:02 -07:00
Wez Furlong
604ef152be
add wezterm cli activate-pane, wezterm cli activate-tab
refs: #3352
refs: https://github.com/wez/wezterm/issues/886
2023-03-24 17:32:55 -07:00
Wez Furlong
f44d02504c
Add: wezterm cli kill-pane
refs: #3352
2023-03-24 17:31:34 -07:00
Wez Furlong
f71bce1727
mux: propagate pane focus change events to clients
This commit causes the mux to generate a PaneFocused notification
when the active pane is changed.

The mux server will forward that as a unilateral PDU to connected
clients.

The clientpane implementation will handle that by applying the
same state to the local mux.

refs: #2863
2023-03-24 13:13:31 -07:00
Wez Furlong
bc7acc18e0
fixup images with the multiplexer
* Translate from File to EncodedFile as needed
* Adopt blob leases in the mux server
* Fix an issue where the first image sent by the mux server would
  be replaced on the client by its background image, if configured.
  Removed the ImageData::id field to resolve this: you should use
  the hash field instead to identify and disambiguate images.
  Bumped the termwiz API version because this is conceptually
  a breaking change to the API

refs: https://github.com/wez/wezterm/issues/3343
2023-03-23 21:43:28 -07:00
Wez Furlong
448a9fe78a
macos: don't treat command line args as .command scripts
Weird behavior from macos; the command line:

`wezterm start vim hello`

would result in macos requesting `vim` and `hello` be opened
as "documents" which would route each of those to the .command
script handling flow and spawn a window for each; running:

`vim ; exit` in one
`hello ; exit` in another

in addition to the normal handling of that command line.

This commit resolves this by igoring document opening
requests until after the application is fully launched.

I tested this by trying to open a .command script with
this new build and verified that that continued to work.

refs: #3340
2023-03-23 19:21:42 -07:00
Wez Furlong
6658ee7730
docs: changelog for #3339 2023-03-23 14:04:43 -07:00
Wez Furlong
7bb721ab7a
docs: note about sigmask change
f2a2d099bb
2023-03-23 12:02:30 -07:00
Wez Furlong
897237cc97
fix: disable mouse reporting for RIS/ResetTerminal sequence 2023-03-23 12:01:24 -07:00
Derek Lomax
16f5d116e7 Update shell-integration.md
Add missing line to powershell starship OSC 7 integration.
The variable for $ansi_escape was missing.
2023-03-23 10:27:57 -07:00
Wez Furlong
57a1b7f2ef
factor window border sizes when computing window sizes
This one was a bit weird because something appeared to be a bit
non-deterministic.  With this config:

```lua
local wezterm = require 'wezterm'

return {
  window_frame = {
    border_left_width = '1cell',
    border_right_width = '1cell',
    border_bottom_height = '0.5cell',
    border_top_height = '0.5cell',

    border_left_color = '#444',
    border_right_color = '#444',
    border_bottom_color = '#444',
    border_top_color = '#444',
  },

  window_padding = {
    left = '1.5cell',
    right = '1.5cell',
    top = '0.5cell',
    bottom = '0.5cell',
  },
}
```

starting wezterm could result in a terminal that reported either 23 or
24 lines. I got 24 when running the build from da7e29df but usually
23 when running a build out of my repo.

Looking closely, the issue is that the initial window size didn't
account for the configured border size, and that we'd subsequently
fix that up when we later do a resize fixup after creating the window.

This commit refactors the window border logic so that it can be
used prior to having fully constructed the terminal window and then
uses that to fixup the initial computed dimensions.

I also noticed with this config that increasing the font size
with CTRL-+ could also result in an inconsistency between the displayed
terminal size and the pty size we set in the kernel: it was missing
the border adjustment as well, so I added it in there.

refs: #3333
2023-03-23 07:11:07 -07:00
Wez Furlong
16c913783d
docs: changelog for #3323 #2879 #3303 2023-03-22 21:38:53 -07:00
Wez Furlong
2b9bf36eb6
docs: add --help output from various wezterm cli subcommands 2023-03-22 20:44:15 -07:00
Wez Furlong
dc36fe18f4
term: adjust logical line wrapping behavior
Really, this is adjusting the logical line breaking behavior, or the
lack thereof.

The situation is this: conpty can decided to reinterpret and flush
large sections of its buffer as a continuous stream of unbroken
characters with no breaks when it repaints the full screen.

When we receive such an update, we see it as one long logical line,
and when we subsequently select multiple lines we can run into the
maximum logical line length and insert invalid synthetic line breaks
into the data that we send to the clipboard.

This commit adjusts the wrapping logic at the time that we receive
the text so that we don't tag the line as a logical line continuation
if:

* The alt screen is active. Full screen apps will re-render on resize
  anyway, and we don't reflow long lines on resize either for the same
  reasons

* If we are talking to ConPTY:
     * If the last character in the line is not alphanumeric or
       punctuation (in other words: it doesn't look plausibly like
       text that should be a line continuation).

refs: #3278
refs: #3177
2023-03-22 19:13:26 -07:00
Wez Furlong
b5c945fe48
docs: updated window_decorations 2023-03-22 18:24:30 -07:00
Wez Furlong
69f9e1a429
docs: changelog for #3330 2023-03-22 18:07:29 -07:00
Wez Furlong
4913817067
allow json encoding wezterm.GLOBAL entries 2023-03-22 09:30:02 -07:00
Wez Furlong
b384dc999f
fix delegation of --skip-config to wezterm-gui
refs: #3325
2023-03-22 07:24:02 -07:00
Benoit de Chezelles
f37c3ae5da
Fix some documentation pages (#3321)
* Update ssh_backend.md

* Update normalize_output_to_unicode_nfc.md

* Update strikethrough_position.md

* Update underline_position.md

* Update underline_thickness.md

* Fix lua config docs titles to be formatted as inline code

* Mention how suggested alphabet for quick select is choosen

* Mention update-status and update-right-status for status_update_interval

* Fix docs for all keyassignments to be formatted as inline code

* Fix Lua object index titles

* Fix titles of `wezterm.*` module index pages

* Fix title of `Color` object & `wezterm.color` functions

We reduce titles from h2 to h1 because mkdocs defaults the page title to
the page file name if no h1 header is found.

* Unify title of all object methods

* Add index page for Gui events
2023-03-22 06:36:03 -07:00
Wez Furlong
c30ff69d26
docs: changelog for #3227 2023-03-21 22:11:22 -07:00
Wez Furlong
f0a86602b5 Apply suggestions from code review 2023-03-21 22:09:14 -07:00
eaglgenes101
4ee16328b8 Changed config option name to mouse_wheel_scrolls_tabs, made it default to true (matching current behavior) 2023-03-21 22:09:14 -07:00
eaglgenes101
ea176d8212 Add docs for new scroll_tabs config option 2023-03-21 22:09:14 -07:00
Wez Furlong
8755e731d3
add __len and __pairs metamethods to wezterm.GLOBALS
Fixes this:

```
> wezterm.GLOBAL.foo = {"bar", "baz"}
> wezterm.GLOBAL.foo
[
    "bar",
    "baz",
]
> #wezterm.GLOBAL.foo
runtime error: [string "repl"]:1: attempt to get length of a userdata value (field 'foo')
stack traceback:
        [string "repl"]:1: in main chunk
>
```

and allows this:

```
> for k, v in pairs(wezterm.GLOBAL.foo) do print(k, v) ; end
```
2023-03-21 21:04:52 -07:00
Wez Furlong
73a1c3b0d3
docs: add --help output pages to the CLI reference 2023-03-21 18:44:26 -07:00
Wez Furlong
b34f5e1a73
docs: boost font page in search index 2023-03-21 12:53:54 -07:00
Wez Furlong
5a738446e2
docs: allow search to find 'changelog'
It's a little bit inelegant, but the mkdocs-material folks seem to have
a nicer solution in the works, so this will do for now.

closes: https://github.com/wez/wezterm/issues/3305
refs: https://github.com/squidfunk/mkdocs-material/issues/3174
2023-03-21 12:29:32 -07:00
Wez Furlong
369c8b01bb
docs: use strict mode to hopefully catch invalid links 2023-03-21 09:34:06 -07:00
Wez Furlong
19c9bc84f2
docs: simplify templating of install pages 2023-03-21 09:31:49 -07:00
Wez Furlong
c781be3124
wezterm-ssh: fix parsing of proxycommand
refs: https://github.com/wez/wezterm/issues/3307
2023-03-21 08:04:59 -07:00
Wez Furlong
40081cb573
docs: update a bunch of since lines to new macro 2023-03-20 22:54:27 -07:00
Wez Furlong
3b8551e03c
docs: update nightly features -> current release 2023-03-20 21:29:43 -07:00
Wez Furlong
e8805a9db0
docs: fix fedora37 stable download link 2023-03-20 17:58:30 -07:00
Wez Furlong
7f7a417f84
docs: update linux releases 2023-03-20 17:54:30 -07:00
Wez Furlong
8c4d71d516
Docs: update changelog for 20230320-124340-559cb7b0 release 2023-03-20 17:36:39 -07:00
Wez Furlong
dd8d4a04f4
sync from https://github.com/folke/tokyonight.nvim
Pull in the enhanced scheme that includes wezterm metadata and colors.

Co-authored-by: Thomas Croft <103956335+thomascft@users.noreply.github.com>

closes: https://github.com/wez/wezterm/pull/3208
2023-03-20 12:42:09 -07:00
Wez Furlong
775bad32e1
sync color schemes 2023-03-20 12:25:44 -07:00
Wez Furlong
a0ec2c18b4
ci: remove some builds
GH actions has been awful slow and bogged down recently,
getting in the way of work that is more important.

This commit removes a variety of alpine builds (which are
not widely used by wezterm users), and the eldest fedora
version to free up some resources.
2023-03-19 22:47:46 -07:00
Wez Furlong
96d155170e
docs: fix typo in changelog 2023-03-19 22:17:22 -07:00
Wez Furlong
7d9b842d26
docs: use snippets to make since: nightly more informative
... while also being less to type.
2023-03-19 22:14:05 -07:00
Wez Furlong
6b0a44eabd
docs: allow using GH issue syntax shorthands
Can now just use #123 without having to wrap it in an explicit
link to have it link to the GH repo.
2023-03-19 21:05:54 -07:00