1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 02:25:28 +03:00
Commit Graph

1701 Commits

Author SHA1 Message Date
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
Wez Furlong
13aefd22fe
docs: more config.something style adjustments 2023-03-19 18:36:37 -07:00
Wez Furlong
0f8146b212
docs: shift from return {} style to config.something style
Nudge new users towards using this style:

```lua
local config = {}
config.color_scheme = 'Batman'
return config
```

and surface how to write lua modules closer to the main section
on config files. In that lua modules section, nudge towards using
a convention similar to that of the plugin spec described in
this commit: e4ae8a844d
2023-03-19 18:26:21 -07:00
Wez Furlong
e70ec47134
time: call_after accepts fractional seconds
I thought I'd hooked it up that way from the start, but apparently not!

refs: https://github.com/wez/wezterm/issues/3287
2023-03-19 10:29:19 -07:00
Wez Furlong
7a6dce3ff0
fix hover state for retro tab bar
Make the math consistent between the hover logic and the render
logic.

refs: https://github.com/wez/wezterm/issues/3113
2023-03-19 09:09:54 -07:00
Wouter Beeftink
1ccc6c9ce0 Convert admonition blocks to markdown equivalent
Note: the second block had no type specified. I picked `tip` for this one.
2023-03-19 07:25:26 -07:00
Wez Furlong
8e0f9947d2
fix time.call_after when used inside an event callback
```lua
local wezterm = require 'wezterm'

function user_callback_test(window, pane)
  print("user_callback_test()")
  wezterm.time.call_after(3, function()
    print("Hello again, later")
  end)
end

return {
  keys = {
    { mods = 'CTRL|ALT',
      key = 'u',
      action = wezterm.action_callback(user_callback_test)
    }
  }
}
```

refs: https://github.com/wez/wezterm/issues/3026
2023-03-19 07:22:14 -07:00
Wez Furlong
b27fd84e11
docs: fix video link on features page 2023-03-18 07:36:01 -07:00
Wez Furlong
2d255c2d75
fix kitty image protocol handling
Input data:

\e_Ga=T,f=32,s=10,v=22,c=1,r=1,m=1\e\\e_Gm=1;/xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T//P=\e\\e_Gm=1;/xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T//P=\e\\e_Gm=0\e\

There were two issues in handling this:

* We expected there to be `;payload` in the first transmission packet,
  but there wasn't one, so we ignored it as ill-formed.
* The standard base64 decoder in the rust ecosystem is super strict
  and rejects the "sloppy" python base64 encoder output that isn't
  strictly conformant with the RFC.  We need to jump through some
  hoops to get it to relax and accept the input.

refs: https://github.com/wez/wezterm/issues/2716
2023-03-17 15:39:01 -07:00
Wez Furlong
761bd5a4d4
docs: restore foo.html rather than foo/index.html style URLs 2023-03-17 11:47:59 -07:00
Wez Furlong
e090eb9eae
Image decoding is now done in a bg thread
Continuing from the previous commit, this shifts:

* In-memory data -> temporary file
* Image decoding -> background thread

The background thread asynchronously decodes frames and
sends them to the render thread via a bounded channel.

While decoding frames, it writes them, uncompressed, to
a scratch file so that when the animation loops, it is
a very cheap operation to rewind and pull that data
from the file, without having to burn CPU to re-decode
the data from the start.

Memory usage is bounded to 4 uncompressed frames while
decoding, then 3 uncompressed frames (triple buffered)
while looping over the rest.

However, disk usage is N uncompressed frames.

refs: https://github.com/wez/wezterm/issues/3263
2023-03-17 11:41:20 -07:00
Wez Furlong
4e7eba36fb
Use mkdocs admonish for note about mux color schemes 2023-03-17 09:29:38 -07:00
Wez Furlong
a115fc0df7
fix iterm2 image cursor position
refs: https://github.com/wez/wezterm/issues/3266
2023-03-16 21:53:13 -07:00
Wez Furlong
6a9dfc409d
improve default hyperlink_rules. add default_hyperlink_rules()
refs: https://github.com/wez/wezterm/issues/928
2023-03-16 20:44:15 -07:00
Wez Furlong
88e53a5f11
apply reloaded config to all panes, regardless of zoom state
refs: https://github.com/wez/wezterm/issues/3259
2023-03-16 09:31:32 -07:00
Artyom Nesterenko
d84ccf126e Update Homebrew section 2023-03-16 08:02:46 -07:00
Wez Furlong
f80376b9f6
docs: changelog for https://github.com/wez/wezterm/pull/3146 2023-03-15 23:16:14 -07:00
Bilal Mahmoud
78e8d90e64 fix: typo about parameter 2023-03-15 22:58:59 -07:00
Wez Furlong
5e5f816f83
add log_unknown_escape_sequences config option 2023-03-15 22:47:32 -07:00
Wez Furlong
cd6d7a9799
docs: disable instant page nav 2023-03-15 21:32:16 -07:00
Wez Furlong
107bcf6a89
docs: some adjustments for mkdocs 2023-03-15 20:54:02 -07:00
Wez Furlong
4770b38737
docs: switch doc build to Material for MkDocs
It's a more mature and actively developed toolset for
technical writing, and looks nicer.
2023-03-15 19:22:51 -07:00
Wez Furlong
2bfb29f1be
improve handling of animated webp images
Use mainline image crate to avoid an otherwise unavoidable panic
in the upstream: https://github.com/image-rs/image/issues/1775

Explicitly operate on the frames from the animation.

refs: https://github.com/wez/wezterm/issues/3250
2023-03-15 11:34:47 -07:00
Wez Furlong
fc656c03fe Apply suggestions from code review 2023-03-14 06:58:22 -07:00
Wez Furlong
0e193bf373 Update docs/shell-integration.md
Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com>
2023-03-14 06:58:22 -07:00
Peter Wagner Sandoval Moreno
e3446316fd Add function for users powershell + starship
References:

Similar script for wt
https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory#powershell-with-posh-git
Custom pre-prompt in starship
https://starship.rs/advanced-config/#custom-pre-prompt-and-pre-execution-commands-in-powershell
2023-03-14 06:58:22 -07:00
Wez Furlong
fe6280f082
docs: fix pane:split direction top/bottom -> up/down
refs: https://github.com/wez/wezterm/issues/3231
2023-03-10 18:26:48 -07:00
Wez Furlong
2d05f8f1f2
ssh: support %l and %L in config files
We also log a warning when an unsupported token is used.

refs: https://github.com/wez/wezterm/issues/3176
2023-03-01 18:44:11 -07:00
Wez Furlong
fecf3bb60b
docs: add mdbook-admonish 2023-02-25 18:19:47 -07:00
Wez Furlong
e6ffeaf285
docs: fixup get_pane_direction docs
refs: https://github.com/wez/wezterm/issues/3141
refs: https://github.com/wez/wezterm/pull/3011
2023-02-21 20:37:43 -07:00
Artyom Nesterenko
23211fc8a5 Fix typo in "Terminal Emulators and PTYs" section 2023-02-19 07:06:57 -08:00
Maxim Sokolov
3b39aa551d add docs 2023-02-17 12:03:42 -08:00
Evgeny
349e9641da docs: shell-integration: document Xonsh support 2023-02-17 10:41:20 -08:00
Wez Furlong
0006014f02
ssh: detect exit-signal state for channels
Need to use a newer version of libssh-rs that can report this state,
as the underlying libssh doesn't fold it into the process exit
status.

refs: https://github.com/wez/wezterm/issues/3095
2023-02-11 10:03:44 -07:00
Wez Furlong
797d3819b7
wsl: default_cwd is now ~
This matches up better to most peoples expectations

refs: https://github.com/wez/wezterm/issues/2826
2023-02-11 08:21:18 -07:00
Wez Furlong
66ec3f6eb6
make command palette font a little larger
refs: https://github.com/wez/wezterm/issues/1485
2023-02-10 15:24:45 -07:00
Wez Furlong
a30d624920
docs: command palette font size/color
refs: https://github.com/wez/wezterm/issues/1485
2023-02-10 09:59:06 -07:00
Wez Furlong
51e0c1b393
x11/wayland: restore mouse copying to both clipboard and primary selection
I don't recall changing it to copy to the primary selection only, and
it doesn't feel like it is something I would want anyway, and I think
it generally makes things annoying for all but power users

https://fosstodon.org/@trentskunk@mstdn.social/109808345817367266
2023-02-09 12:56:51 -07:00
Wez Furlong
1596934132
docs: command palette
refs: https://github.com/wez/wezterm/issues/1485
2023-02-07 16:32:42 -07:00
Wez Furlong
d00845baad
docs: webgpu
refs: https://github.com/wez/wezterm/issues/2756
2023-02-07 11:16:55 -07:00
Wez Furlong
fc27defd25
ci: remove ubuntu 18
refs: https://github.com/actions/runner-images/issues/6002
2023-02-07 09:48:33 -07:00
Wez Furlong
cc15f97a55
mux: only resize zoomed pane when resizing a tab
Previously, when resizing a tab, we'd unzoom it, recompute the resize
deltas and adjust every pane's non-zoomed position and re-zoom the
original pane.

When the alt screen is active, wezterm doesn't reflow resized lines,
and there a number of situations where the only effective change to
the line was updating a seqno; the content of those panes doesn't
actually update until the application(s) attached to the PTY
receive SIGWINCH from the kernel.

Since we were resizing the zoomed pane twice in quick succession
we could double-tap SIGWINCH and the application might coalesce
and process only one of the resize events.

The result of that was that we might see the state from either
the first or second resize event and then not get any other updates
until the application repainted itself.

This commit re-structures the resize behavior around zooms so that
we only resize the zoomed pane.  When unzooming we'll fixup the
no-zoomed sizes for the whole tab. That means that we need to
store the pre-zoom size in order to correctly calculate those
sizes for the case where a pane was zoomed, the tab resized, and
then the pane was unzoomed again.

refs: https://github.com/wez/wezterm/issues/3068
2023-02-07 09:32:08 -07:00
Wez Furlong
14cef3577b
docs: link to dark mode example from appearance section
closes: https://github.com/wez/wezterm/issues/2939
2023-02-06 20:32:37 -07:00
Wez Furlong
44e162a986
fonts: update Symbols Nerd Font Mono
This is "NerdFontsSymbolsOnly/Symbols-1000-em Nerd Font Complete Mono.ttf" from
https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.3.3
2023-02-06 06:29:32 -07:00
loishi
0bda17d684 Change to the command to upgrade wezterm-nightly
Hi,

I encountered an error while trying to upgrade Wezterm to a newer nightly build on MacOS using the previous brew command. The error message was:

“Error: Cask wezterm-nightly exists in multiple taps:
homebrew/cask-versions/wezterm-nightly
wez/wezterm/wezterm-nightly”

To resolve this issue temporarily, I modified the shell script to use the "wez/wezterm/wezterm-nightly" tap. However, I wanted to check if it's preferable to use the "homebrew/cask-versions/wezterm-nightly" tap instead. Please let me know your thoughts on this.

Thanks!
2023-02-06 05:04:12 -08:00
Wez Furlong
2b298f5f96
mux: pass gui window position through from new mux window
Threads through a GuiPosition from mux window creation to allow it to be
used when the corresponding gui window is created.

SpawnCommand now has an optional position field to use for that purpose.

```lua
wezterm.mux.spawn_window {
  position = {
    x = 10,
    y = 300,
    -- Optional origin to use for x and y.
    -- Possible values:
    -- * "ScreenCoordinateSystem" (this is the default)
    -- * "MainScreen" (the primary or main screen)
    -- * "ActiveScreen" (whichever screen hosts the active/focused window)
    -- * {Named="HDMI-1"} - uses a screen by name. See wezterm.gui.screens()
    -- origin = "ScreenCoordinateSystem"
  },
}
```

refs: https://github.com/wez/wezterm/issues/2976
2023-02-05 21:43:37 -07:00
Wez Furlong
6968ad5c3c
Add quit_when_all_windows_are_closed config option
refs: https://github.com/wez/wezterm/issues/3057
2023-02-05 16:55:56 -07:00
Wez Furlong
0b2345a46f
docs: expand wezterm.format examples
refs: https://github.com/wez/wezterm/issues/3056
2023-02-05 13:45:35 -07:00
Wez Furlong
98c90215da
docs: changelog for https://github.com/wez/wezterm/pull/2887 2023-02-05 10:56:44 -07:00
Wez Furlong
71ec5ac0a8
docs: changelog for https://github.com/wez/wezterm/pull/3054 2023-02-05 09:28:27 -07:00
Wez Furlong
6590fa5b7e
docs: changelog for https://github.com/wez/wezterm/pull/2762 2023-02-05 09:24:32 -07:00
Wez Furlong
d810c9968d
update derived files 2023-02-05 09:22:33 -07:00
Italo Cunha
09e82b353a
Add bindings for Home and End in copy_mode (#2762)
* Add bindings for Home and End in copy_mode

* Add Home/End bindings to copymode.md

---------

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2023-02-05 09:20:01 -07:00
Wez Furlong
1609fd386b
add wezterm cli get-text command
closes: https://github.com/wez/wezterm/pull/2729
2023-02-05 09:05:48 -07:00
Wez Furlong
7274636559
docs: changelog for #2955 2023-02-05 07:35:31 -07:00
Wez Furlong
b9739a24d1
docs: changelog for https://github.com/wez/wezterm/pull/3053 2023-02-04 07:38:21 -07:00
Wez Furlong
1415c5607e
docs: link (In|De)creaseFontSize <-> adjust_window_size_when_changing_font_size 2023-02-03 17:09:22 -07:00
Wez Furlong
ed444faf91
docs: changelog for #2959 2023-02-02 08:27:31 -07:00
Wez Furlong
69d117f91b
docs: clarify that you want window_decorations=RESIZE
Increase from mentioning it one time in a subtle way to 4 times
in 4 different ways.
2023-02-01 15:01:28 -07:00
Wez Furlong
9ae6a561a0
fix command output not being displayed for short lived commands
repro with:

```
wezterm --config 'exit_behavior="Hold"' start ls
```
2023-01-26 16:10:19 -07:00
Wez Furlong
d7145561c2
Add wezterm start --domain DOMAIN --attach + gui-attached event
The motivation here was to remove some similar but not quite the same
logic that existed for starting up when using `wezterm connect`.

Now `wezterm connect DOMAIN` is implemented as `wezterm start --domain
DOMAIN --attach --always-new-process` and a little extra hand-wave to
ensure that the default domain is set correctly.

The startup events have been refactored a bit; a new gui-attached
event is emitted after attaching and starting any default programs
in the selected domain at startup.

That event can be used to maximize windows and so on, if desired.

The gui-attached event is independent of the startup command and fires
for `wezterm connect`, which `gui-startup` did not (and could not) do.
2023-01-26 15:56:11 -07:00
Wez Furlong
eee340447f
docs: add a bit explaining what a terminal is 2023-01-25 11:24:34 -07:00
Wez Furlong
56dad40f7c
docs: add version info to newer copy mode shortcuts
https://github.com/wez/wezterm/discussions/2998
2023-01-25 07:47:02 -07:00
Wez Furlong
9d7e613cfa
wezterm.GLOBAL now returns references to stored data
This smoothes out a rough edge and makes things work
more naturally.

refs: https://github.com/wez/wezterm/discussions/2983
2023-01-24 18:26:14 -07:00
Wez Furlong
6f62a0f2b1
config: capture warnings and show them in config error window
This allows deprecated and invalid fields to be surfaced more visibly
in the config error window.
2023-01-24 14:18:15 -07:00