1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-21 20:31:42 +03:00
Commit Graph

5364 Commits

Author SHA1 Message Date
Wez Furlong
5b09ff1dd0 fix incorrect csi-u encoding with non-ascii characters
refs: https://github.com/wez/wezterm/issues/1746
2022-03-21 20:38:42 -07:00
Wez Furlong
aba3da6a02 deps: cargo update 2022-03-21 07:47:57 -07:00
Wez Furlong
ee5d5714ca docs: update for 20220319-142410-0fcdea07 2022-03-19 16:37:27 -07:00
Wez Furlong
0fcdea0789 sixel: allow slightly poorly formed sixel data
The issue appears to be due to a rogue trailing semicolon in the input
data.  Support for this appears to be mixed: an online converter didn't
produce valid output, but image magick's convert utility accepted it.

This commit allows an optional trailing semicolon at the end of the
color definition regex and enables wezterm to render the image.

refs: https://github.com/wez/wezterm/issues/1711
2022-03-19 14:24:10 -07:00
Wez Furlong
737eb6e912 docs: animation_fps 2022-03-19 11:42:35 -07:00
Wez Furlong
7fc7201ae5 add swallow_mouse_click_on_window_focus option
Separates out window vs pane click-to-focus behavior more distinctly,
and fixes up the behavior when
swallow_mouse_click_on_window_focus=false.

refs: #1540
2022-03-19 07:41:34 -07:00
Wez Furlong
5f1b0cff18 gui: move last_mouse_terminal_coords to per-pane state 2022-03-19 07:10:18 -07:00
Wez Furlong
bd9088372a wayland: speculative handling of pointer when seat changes
It compiles and launches under weston, so that's promising.
I can't test the suspend/resume case on the hardware I have available.

refs: #1497
2022-03-19 05:47:04 -07:00
Adam Harvey
0c7e735a86 window: correctly handle keyboard input after seat updates
When the user switches to another virtual console and then back into a
Wayland session, a number of seat updates are received by the listener
installed by `Environment::listen_for_seats()`. These updates
essentially flip the keyboard and pointer flags off and then back on in
the seat data, which indicates that new handlers need to be assigned to
the keyboard and pointer objects.

However, because one update is received for _each_ flag being toggled,
this means that the listener is fired twice with `has_keyboard` set to
true, which means that two keyboard handlers end up being installed.
Users then experience each keypress being delivered twice to the
terminal.

This commit adds a map to track the keyboard object that has been
assigned on each seat, thereby preventing duplicate assignments and (by
extension) duplicate keypresses being registered. This logic is
essentially the same as what's used in the `kbd_input` example in SCTK,
which doesn't have this issue.

Something similar is required for pointer handling, which also breaks
after switching to another virtual console and back into Wayland, but I
was scared off by the TODO in the `listen_for_seats` callback and didn't
investigate this further.
2022-03-19 05:11:04 -07:00
Wez Furlong
4007ccbcd2 track focused pane in the client info
wezterm cli spawn, and wezterm cli split-pane can use this information
to pick a default for the pane id when invoked from outside of wezterm.

refs: https://github.com/wez/wezterm/issues/1531
2022-03-18 19:24:54 -07:00
Wez Furlong
0b7cb6550b macos: more urgh with alt+shift key combinations
refs: https://github.com/wez/wezterm/issues/760
refs: https://github.com/wez/wezterm/issues/1706
2022-03-18 13:32:43 -07:00
Wez Furlong
8c3d2f6eb6 windows: make repeated dead key handling consistent with other apps
On Windows in FRA layout, `^^SPACE` results in `^^SPACE`, whereas
on Linux it results in `^SPACE`.  We were doing the latter instead
of the former.

Let's just be consistent with other windows apps.

closes: #1729
closes: #1730
2022-03-18 10:42:14 -07:00
Wez Furlong
37d2b04af6 fix some warnings on windows 2022-03-18 10:29:01 -07:00
Ivan Tham
84007274cf Docs change Duration::new(0, 0) to Duration::ZERO 2022-03-18 07:50:10 -07:00
Wez Furlong
29995c7cb3 add wezterm.enumerate_ssh_hosts() helper
This helper extracts the concrete set of hosts and their configurations
from the ssh config, and arranges to reload the wezterm config if they
are changed.

This is useful when constructing ssh domain configs.

refs: https://github.com/wez/wezterm/discussions/1731
2022-03-18 07:48:12 -07:00
Wez Furlong
9db419a3f8 pretty print output in the debug overlay 2022-03-18 07:34:41 -07:00
Wez Furlong
27088fab28 on windows, log to C:\Users\USER\.local/share/wezterm/gui-log-PID.txt
refs: #1576
2022-03-17 16:52:35 -07:00
Wez Furlong
51e27acf1e docs: changelog for #1092 2022-03-17 16:37:51 -07:00
Basti
8020e094bb
Add context menu extension for Nautilus (#1712)
Closes #1092
2022-03-17 16:35:51 -07:00
Wez Furlong
deb7594eb5 Add doc comment
forgot to save before committing 89f20d265f
2022-03-17 09:49:13 -07:00
Wez Furlong
3028ee4cdd more robust cycle detection when debug printing lua values
printing _G would still sometimes overflow for me.
The code a0b8d2196a wasn't sufficient so
beef it up both with a hash set to remember all visited refs as well
as a depth limit of 128, which should be deep enough for most practical
purposes.
2022-03-17 09:41:29 -07:00
Wez Furlong
89f20d265f Allow mux_env_remove={} to produce an empty vec
We need to do a little dance to get this to work because
`{}` is ambiguous in lua; could be a map or a vec.

refs: https://github.com/wez/wezterm/issues/1622
2022-03-17 09:20:12 -07:00
Wez Furlong
ace8253498 allow debug overlay to run async chunks
allows eg: `window:effective_config()` to print the config for the
window
2022-03-17 09:17:02 -07:00
Wez Furlong
a0b8d2196a prevent stack overflow when printing tables with cycles in debug overlay
refs: https://github.com/wez/wezterm/issues/1722
2022-03-16 07:26:55 -07:00
Wez Furlong
0b4e5570a8 docs for https://github.com/wez/wezterm/discussions/796 2022-03-16 06:34:24 -07:00
Wez Furlong
d290f532d4 fix hang with open crate when spawning the browser
The `open` crate blocks forever when spawning the browser via xdg-open,
which feels kinda "wrong" to me, but does offer a method that can stick
that in a background thread, so that's what we do here.

refs: #1721
2022-03-15 07:50:08 -07:00
Wez Furlong
d22b7a51c5 docs: https://github.com/wez/wezterm/issues/1646 2022-03-12 15:06:07 -07:00
Wez Furlong
edd997d0f7 macos: fix CTRL-Tab
refs: https://github.com/wez/wezterm/issues/1684
2022-03-12 13:25:42 -07:00
Wez Furlong
c1fb73409d macos: improve handling of keys when both ALT+SHIFT are pressed
refs: https://github.com/wez/wezterm/issues/1706
2022-03-12 12:01:16 -07:00
Wez Furlong
499e7f936f fixup build on windows
refs: #1646
2022-03-12 11:16:21 -07:00
Wez Furlong
7370e1b1a4 fixup mac build
refs: #1646
2022-03-12 11:13:58 -07:00
Wez Furlong
6df26b476e fonts: FontSlant -> FontStyle
after reading around italic vs. oblique, I think "slant" is a misleading
way to categorize this, as slant implies something about the angle of
the font but really the difference between italic and oblique is purely
stylistic and without a suggested angle.

style more closely matches the CSS name which is well understood by
many, so we go for that.

refs: #1646
2022-03-12 09:46:14 -07:00
Wez Furlong
1aad1cf1a2 tweak oblique detection
refs: #1646
2022-03-12 08:50:15 -07:00
Wez Furlong
06b1bb4f2f fix build on macos
refs: #1646
2022-03-12 08:36:52 -07:00
Wez Furlong
84d4187c9a fonts: replace italic boolean with FontSlant enum
There are three slants that are broadly recognized; normal, italic and
oblique.  Prior to this commit, we only considered normal or italic.

This is mostly a mechanical change to replace the boolean with the enum,
and rename the field from `italic` to `slant`.

For the sake of backwards compatibility with existing configs, the lua
helpers for working with fonts continue to accept boolean italic values
and rewrite them to the equivalent slant value.

refs: #1646
2022-03-12 08:16:27 -07:00
Wez Furlong
d64f0c2189 deps: harfbuzz -> 4.0.1 2022-03-12 07:06:54 -07:00
Wez Furlong
6d45a32eaa docs: changelog for #1423 #1708 2022-03-12 06:44:09 -07:00
Sebastian Wiesner
277d30ef2e Support primary selection on Wayland
Closes #1423
2022-03-12 05:42:01 -08:00
Wez Furlong
5d7de61e9e docs: changelog for https://github.com/wez/wezterm/issues/1434 2022-03-11 09:28:30 -07:00
David Rios
aaad2be606
Detect mouse leaving the window (#1679)
* Detect mouse leaving the window

* Implement leave

* Use new API

* Fix mouse leave

* Fix mouse leave on Wayland

* Mouse leave on X11

* Detect mouse leaving window on macOS

* Fix example

refs:  #1434
2022-03-11 08:26:09 -08:00
David Rios
3b05dac0c6 Use newer windows crate 2022-03-11 07:40:39 -08:00
Greg V
9879005f87 add support for XF86Copy/XF86Paste keys 2022-03-11 06:43:18 -08:00
ho-oto
d5391fa520 Update wezterm-linuxbrew.rb.template 2022-03-10 05:50:45 -08:00
Wez Furlong
ce3dd00444 fix panic when spawning invalid command via reused gui instance
refs: #1696
2022-03-09 10:33:29 -07:00
Wez Furlong
d5998ccb56 bump actions/checkout from 2.4 -> 3
closes: #1694
2022-03-09 07:32:40 -07:00
Wez Furlong
46624d99a6 cargo update 2022-03-09 07:31:53 -07:00
Davide Mancusi
053c798bc1 docs: remove mention of SpawnTab in launch.md
SpawnTab does not accept a SpawnCommand as an argument.
2022-03-09 05:56:15 -08:00
Wez Furlong
5ffd50acc6 docs: document OSC 11-13 for changing default colors
refs: https://github.com/wez/wezterm/issues/1680
2022-03-03 07:22:47 -07:00
Wez Furlong
22cea37959 deps: textwrap -> 0.15 2022-03-03 07:19:21 -07:00
Wouter Beeftink
45a4dff955 docs: fix condition in default_wsl_domains example 2022-03-03 06:06:12 -08:00