1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-03 19:53:40 +03:00
Commit Graph

1534 Commits

Author SHA1 Message Date
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
Wez Furlong
252817b0b8
config: add wezterm.config_builder
config_builder helps to make issues more visible/useful in the case
where you may have typod a config option, or otherwise assigned
an incorrect value.
2023-01-24 11:57:07 -07:00
Wez Furlong
e725d68f08
docs: shell-integration: cover the new built-in user-vars 2023-01-23 10:50:49 -07:00
Wez Furlong
748cc67a18
docs: add a brief bit about workspaces
refs: https://github.com/wez/wezterm/issues/1223
2023-01-22 23:52:00 -07:00
Wez Furlong
75b3c03d6d
docs: start recipes section
refs: https://github.com/wez/wezterm/issues/1223
2023-01-22 23:35:22 -07:00
Wez Furlong
ed2b983c57
docs: add note about multiplexing and color schemes
refs: https://github.com/wez/wezterm/issues/1268
2023-01-22 22:06:33 -07:00
Wez Furlong
9350795f33
x11: always update selection ownership
refs: https://github.com/wez/wezterm/issues/2926
2023-01-21 18:24:29 -07:00
Wez Furlong
33f25e9ce6
reduce latency when heavily using foreground process info
The tcgetpgrp call appears to have high variance in latency, ranging
from 200-700us on my system.

If you have 10 tabs and mouse over the tab bar, that's around 7ms
spent per frame just figuring out the foreground process; that doesn't
include actually extracting the process executable or current working
directory paths.

This was exacerbated by the mouse move events triggering a tab bar
recompute on every pixel of mouse movement.

This commit takes the following steps to resolve this:

* We now only re-compute the tab bar when the UI item is changed by
  a mouse movement
* A simple single-item cache is now used on unix that allows the caller
  to proceed quickly with stale-but-probably-still-mostly-accurate data
  while queuing up an update to a background thread which can absorb
  the latency.

The result of this is that hovering over several tabs in quick
succession no longer takes a noticeable length of time to render the
hover, but the consequence is that the contents of a given tab may be
stale by 300-400ms.

I think that trade-off is worth while.

We already have a similar trade-off on Windows, although we don't
yet do the updates in a different thread on Windows. Perhaps in
a follow up commit?

refs: https://github.com/wez/wezterm/issues/2991
2023-01-21 15:25:57 -07:00
Wez Furlong
9dc76b852b
lua: add some more tab methods 2023-01-20 20:02:29 -07:00
Wez Furlong
0dc7d92b6c
modals: invalidate window after assignment
On my mac, depending the config, I noticed that modals didn't always
render immediately; force a window invalidation after assigning to
encourage them to do so.
2023-01-20 12:09:07 -07:00
Wez Furlong
59b609f592
window:active_key_table now includes per-pane stacks
refs: https://github.com/wez/wezterm/discussions/2986
2023-01-20 07:03:19 -07:00
Wez Furlong
523dafe757
docs: change log and docs for https://github.com/wez/wezterm/pull/2908 2023-01-19 20:14:34 -07:00
gzliew
f3c8f4c36d docs(wezterm-gui): Update docs 2023-01-19 19:08:07 -08:00
Wez Furlong
60922b9ea0
docs: add troubleshooting section 2023-01-19 10:44:05 -07:00
Wez Furlong
c5b7786e37
add explicit SHIFT key caps to copymode docs
refs: https://github.com/wez/wezterm/pull/2911
2023-01-19 09:11:53 -07:00
Wez Furlong
df423cce9a
docs: css for https://github.com/wez/wezterm/pull/2911 2023-01-19 09:07:00 -07:00
Wez Furlong
da1802bbed
fmt docs 2023-01-19 09:07:00 -07:00
Pavel Roskin
da72f452a4 Improve Copy Mode key documentation
Add the key to enter Copy Mode to the table. It may be repetitive, but it
makes the table a useful cheatsheet.

Document `y`, it was undocumented.

Use kbd tag. Capitalize all keys with modifiers for consistency. Use mixed
case names for the modifiers. Use `+` for key combinations.
2023-01-19 08:06:50 -08:00
Wez Furlong
c042005ee0
mux: try harder to use default_workspace from config
There were a couple of cases where we didn't look at the config
when deciding on the workspace name.

refs: https://github.com/wez/wezterm/issues/2981
2023-01-19 07:47:27 -07:00
Wez Furlong
5dbdd36a72
macos: implement window:focus()
refs: https://github.com/wez/wezterm/issues/2973
2023-01-18 23:25:19 -07:00
Wez Furlong
6d2b42c95e
windows: implement focus method
refs: https://github.com/wez/wezterm/issues/2973
2023-01-18 23:19:22 -07:00
Wez Furlong
b01aa129f7
add WindowOps::focus, ActivateWindow, window:focus()
Only implemented on X11 so far.
Note that Wayland doesn't support this action at all.

refs: https://github.com/wez/wezterm/issues/2973
2023-01-18 22:58:48 -07:00
Wez Furlong
4f1e2604eb
docs: changelog for https://github.com/wez/wezterm/pull/2977 2023-01-18 20:14:50 -07:00
Wez Furlong
9ea19b094b
docs: changelog for https://github.com/wez/wezterm/pull/2978 2023-01-18 20:11:43 -07:00
Wez Furlong
15cd1afbdc
lua: add some pane methods for working with zones
refs: https://github.com/wez/wezterm/issues/2968
2023-01-18 19:38:51 -07:00
Wez Furlong
30f8c0151f
docs: changelog for https://github.com/wez/wezterm/pull/2946 2023-01-12 09:10:26 -07:00
Wez Furlong
5f0e52cb5f docs: add version info to hide_mouse_cursor_when_typing 2023-01-12 08:08:42 -08:00
ProspectPyxis
0b60539f4d docs: document new config option 2023-01-12 08:08:42 -08:00
Wez Furlong
b86f5365a1
sync color schemes 2023-01-11 16:30:58 -07:00
Wez Furlong
dceef030b9
docs: clarify native macos full screen mode
refs: https://github.com/wez/wezterm/issues/2697#issuecomment-1371560416
2023-01-11 10:45:01 -07:00
Wez Furlong
349c2ed5d5
docs: changelog for https://github.com/wez/wezterm/pull/2928 2023-01-11 09:10:22 -07:00
Wez Furlong
4ec428ff75
config: allow using bright but not bold text when brightening text
In https://github.com/wez/wezterm/issues/2932 the user desired to have
brightened text without the boldness, as they were accustomed to that
behavior in a couple of other terminal emulators.

This commit changes the `bold_brightens_ansi_colors` from a simple
boolean to a tristate that allows for not changing the brightness,
changing the brightness, and changing the brightness while adjusting
the boldness down to normal levels.

boolean values are accepted for backwards compatibility.
2023-01-09 15:19:17 -07:00
Wez Furlong
37055d2fab
expose some mux domain stuff to lua
refs: https://github.com/wez/wezterm/issues/2933
2023-01-09 08:38:05 -07:00
Manpreet Singh
67896f67f5 Add Fedora 37 nightly builds 2023-01-02 15:51:14 -08:00
Wez Furlong
fc481106af
windows: avoid panic when minimizing w/ WebGpu
```
thread 'main' panicked at 'Error in Surface::configure: Both `Surface` width and height must be non-zero. Wait to recreate the `Surface` until the window has non-zero area.', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-0.14.0\src\backend\direct.rs:274:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

refs: https://github.com/wez/wezterm/issues/2881
2022-12-30 08:52:01 -07:00
Omochice
f2632c32fe Fix typo 2022-12-27 09:10:36 -08:00
Wez Furlong
a31ba8738c
ssh: respect AddressFamily for environments with broken ipv6
We have to manually connect for this to work well across both
underlying libraries. libssh in particular doesn't support it
at all.

refs: https://github.com/wez/wezterm/issues/2893
2022-12-26 16:18:18 -07:00
Wez Furlong
c39bbbb451
docs: changelog for https://github.com/wez/wezterm/issues/2782
refs: https://github.com/wez/wezterm/pull/2889
2022-12-25 06:03:40 -07:00
Wez Furlong
ab8a4f129c
command palette: first pass
This commit introduces a rough first pass at a command palette modal.
It is an adaptation of the emoji character selector and needs
refinement.

Importantly, the default pane selector key assignment now calls
into this new command palette instead.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-22 20:24:57 -07:00
Wez Furlong
6479df63b9
removed deprecated Copy, Paste, PastePrimarySelection actions
These have been deprecated since early 2021; time to remove them
and simplify a little.
2022-12-22 07:31:18 -07:00
Wez Furlong
72da5d161e
docs: changelog for https://github.com/wez/wezterm/issues/2819 2022-12-21 16:34:01 -07:00
Wez Furlong
b224aa1b56
macOS: add MenuBar
This took a decent amount of effort to thread through with context;
wrappers around NSMenu and NSMenuItem are added to reduce some of
the objc usability warts, and an additional NSObject wrapper is
added to help copy the KeyAssignment from the existing list
of command palette commands and associate it with the menu item.

When a menu item is selected, macOS will walk through the responder
chain and look for a responder that responds to the selector associated
with the menu item.  In practice that means that our window/view class
will be tried first, and then later, our app delegate will be tried.

This commit implements routing from both of these: the window case
routes to the associated TermWindow and drops into the existing
perform_key_assignment method.

In case there is no window (not currently possible, but will be
in the future), the app delegate also has a placeholder for dispatching
key assignments, although it will only be able to perform a subset
of the possible actions.

A couple of things to note:

* Items aren't smart enough to disable themselves or adjust their
  caption based on the context. To make that work, we either need
  to recreate the entire menubar when any possible context changes
  (doable, but feels heavy), or we need to assign a target to each
  menu item and implement a validation handler on that target.
  That seemed to mess with the responder chain when I briefly
  experimented with it.

* There's some disabled code to add a Services menu. It is disabled
  because when it is enabled, accessing either Services or Help
  from the menu bar sends the process into a busy loop somewhere
  in macOS's internals.  It's unclear what it is unhappy with.

* No keyboard accelerators are associated with the menubar yet.
  That needs some thought, as they would essentially become global
  keyboard shortcuts and take precedence over the shortcuts defined
  for other keys in the config.  This feels like it should be something
  that the user has control over, so there needs to be something to
  allow that before we go ahead and wire those up.

refs: https://github.com/wez/wezterm/issues/162
refs: https://github.com/wez/wezterm/issues/1485
2022-12-20 19:46:08 -07:00
Wez Furlong
fe55ace7d9
deps: harfbuzz -> 6.0.0 2022-12-19 17:33:00 -07:00
Wez Furlong
fe60155d3d
withdraw DEC private SGR handling for super/subscript
refs: https://github.com/mintty/mintty/issues/1189
refs: https://github.com/mintty/mintty/issues/1171
2022-12-19 11:37:53 -07:00
Wez Furlong
28c7c0ba19
macos: allow association with .command file type
Implement an app delegate to receive a callback when the system
requests that we open `.command` files, and then ask the mux
layer to spawn a window for it and execute it via the shell.

Also allow handling `.sh`, `.zsh`, `.bash`, `.fish` and `.tool`,
per kitty.

refs: https://github.com/wez/wezterm/issues/2741
refs: https://github.com/wez/wezterm/issues/2871
2022-12-19 11:06:12 -07:00
Wez Furlong
e70f97903b
disable window title reporting escape sequence by default 2022-12-18 10:37:21 -07:00
Wez Furlong
f22eec7970
docs: add aarch64 macos example to target_triple 2022-12-17 21:59:49 -07:00
Val Packett
896256e420 docs: changelog: chase username change 2022-12-07 12:09:06 -08:00
Wez Furlong
92e851d648
docs: expand font_rules
refs: #2836
2022-12-06 09:36:35 -07:00
Russell Cloran
8d8d7d3ff4 Fix shell-resolution documentation in launch 2022-11-30 11:13:38 -08:00
Wez Furlong
4b8515e69f
cleanup: a few references to the Last Resort font
It was removed in the latest release, so these no longer apply
2022-11-22 15:40:17 -07:00
Wez Furlong
8a478e29a4
docs: https://github.com/wez/wezterm/pull/2662 2022-11-22 08:37:03 -07:00
Peter Nguyen
81d6c88af0 docs: add documentation for new default key bindings 2022-11-22 07:35:09 -08:00
Wez Furlong
877d364bff
docs: mention new background option from window_background_image
refs: https://github.com/wez/wezterm/issues/2757
2022-11-21 18:12:44 -07:00
Wez Furlong
173862634e
docs: released 20221119-145034-49b9839f 2022-11-20 06:53:49 -07:00
Wez Furlong
49b9839fdb
fix IME composition status applying to all panes
refs: https://github.com/wez/wezterm/issues/2569
2022-11-19 14:50:34 -07:00
Wez Furlong
2dd3968b9e
allow disabling tabs, new tab button in tab bar
refs: https://github.com/wez/wezterm/issues/2082
2022-11-19 13:54:10 -07:00
C.D. MacEachern
aa72cd24d0
Update macos docs with wezterm CLI installation (#2619)
* Update macos docs with wezterm CLI installation

wezterm binary is not by default available in shells like the default zsh or bash, on macos we need to explicitly add the path to the wezterm binaries inside the WezTerm.app

* Update docs/install/macos.markdown

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2022-11-19 09:44:28 -07:00
Wez Furlong
dbeeaef2f0
docs: changelog for https://github.com/wez/wezterm/pull/2661 2022-11-19 09:12:38 -07:00
jakehl
d3d1db8663 fixes flow chart and typo in config file docs 2022-11-19 07:53:04 -08:00
Wez Furlong
d31aeadd5a
docs: changelog for https://github.com/wez/wezterm/pull/2636 2022-11-19 08:35:54 -07:00
Wez Furlong
fde535faf1
Fix dragging by left or right status with retro tab bar
Another good example of why `_ =>` in a match is probably a bad idea.

refs: https://github.com/wez/wezterm/issues/2758
2022-11-19 08:26:33 -07:00
Wez Furlong
d96b05c06c
docs: fix MoveTabRelative default key assignments
closes: https://github.com/wez/wezterm/issues/2705
2022-11-19 08:14:00 -07:00
Wez Furlong
94f2225c82
docs: update first example to use wezterm.action style
closes: https://github.com/wez/wezterm/issues/2704
2022-11-19 08:08:50 -07:00
Wez Furlong
35e3e30d7a
docs: add_wsl_distributions_to_launch_menu was removed
Update WSL related info to reflect its removal and note about
how to achieve the same effect as turning it off.

refs: #2750
2022-11-17 06:29:41 -07:00
Wez Furlong
62e2e996da
changelog for https://github.com/wez/wezterm/pull/2746
closes: https://github.com/wez/wezterm/issues/2667
2022-11-15 09:44:44 -07:00
Wez Furlong
9569028d98
xcursor: parse and follow theme inheritance
A couple of users ran into an issue where wezterm couldn't find
their mouse cursor icons.

Looking more deeply into this, we weren't looking at `index.theme`
files and following the inheritance chain from them.

This commit addresses that!

refs: https://github.com/wez/wezterm/issues/2687
refs: https://github.com/wez/wezterm/issues/2743
2022-11-15 09:15:43 -07:00
Wez Furlong
38ab42b5bf
docs: remove wezterm-nightly-bin AUR link
I plan to retire that as it has ABI compatibility issues on arch

refs: https://github.com/wez/wezterm/issues/2712
2022-11-13 17:09:52 -07:00