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

482 Commits

Author SHA1 Message Date
Wez Furlong
6bd6d844ca term: fix XTGETTCAP response
refs: https://github.com/wez/wezterm/issues/1781
refs: https://github.com/dankamongmen/notcurses/issues/2637
2022-03-27 19:34:12 -07:00
Wez Furlong
a7f70ccf35 docs: sixel perf in the changelog 2022-03-27 16:32:36 -07:00
Wez Furlong
5b0edfddea hyperlink rules: avoid panic when a capture is missing
```
./target/debug/wezterm -n --config 'hyperlink_rules={{regex="pr-(\\d+)(-\\d)?",format="https://github.com/NixOS/nixpkgs/pull/$1"}}'
```

then output `pr-1`.

refs: #1780
2022-03-27 11:12:16 -07:00
Wez Furlong
26acdae1d9 docs: changelog for #1757 #1710 2022-03-27 07:57:52 -07:00
Wez Furlong
4e343eb1e5 macos: try to avoid the notch
Flesh out the get_os_parameters impl for macOS.  When running on a
system that provides `NSScreen::safeAreaInsets`, use that to determine
the border required to avoid the "notch" on certain models of mac.

In the GUI layer: when the os parameters include a border, adjust
the render position to account for it.

This is a bit of a speculative change, as I don't have a mac with
a notch.

refs: https://github.com/wez/wezterm/issues/1737
2022-03-26 22:47:42 -07:00
Wez Furlong
98079b6b46 docs: changelog for #1771 #1773 #1725 #949 2022-03-26 17:48:56 -07:00
Wez Furlong
8eb497fa19 deps: harfbuzz -> 4.1.0 2022-03-26 10:51:35 -07:00
Wez Furlong
6d7f3e2e0b docs for https://github.com/wez/wezterm/issues/1745 2022-03-26 10:01:58 -07:00
Wez Furlong
4035860f45 update retro tab bar hover state in more cases
refs: https://github.com/wez/wezterm/issues/1764
2022-03-26 09:45:12 -07:00
Wez Furlong
7f3a29dccb docs: changelog for #1761 2022-03-26 08:20:44 -07:00
Wez Furlong
895a96f842 docs: changelog for #1502 and #1675 2022-03-26 07:57:14 -07:00
Wez Furlong
e500c9c5c0 Fix quoting of style field in ls-fonts
refs: https://github.com/wez/wezterm/issues/1762
2022-03-24 18:06:13 -07:00
Wez Furlong
623f617951 x11: window icon had red/blue channels swapped
closes: #1754
closes: #1755
2022-03-23 07:01:26 -07:00
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
ee5d5714ca docs: update for 20220319-142410-0fcdea07 2022-03-19 16:37:27 -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
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
51e27acf1e docs: changelog for #1092 2022-03-17 16:37:51 -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
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
Wez Furlong
5d7de61e9e docs: changelog for https://github.com/wez/wezterm/issues/1434 2022-03-11 09:28:30 -07:00
Wez Furlong
3234ef0ec9 x11: add fallbacks when loading xcursor themes
refs: #1655
2022-02-23 08:53:11 -07:00
Wez Furlong
85a8434ecb docs: fix autumnmeowmeow's links 2022-02-18 07:16:28 -07:00
Wez Furlong
77222e0630 docs: fix typo in changelog 2022-02-18 07:14:41 -07:00
Wez Furlong
55b41664d6 docs: changelog links to phys vs mapped section
refs: https://github.com/wez/wezterm/issues/1483
2022-02-18 06:34:16 -07:00
Wez Furlong
6e972d3f08 docs: adjust changelog for https://github.com/wez/wezterm/issues/1483
closes: https://github.com/wez/wezterm/issues/1483
2022-02-18 06:05:36 -07:00
Wez Furlong
c232817270 docs: changelog for https://github.com/wez/wezterm/issues/1633
closes: https://github.com/wez/wezterm/issues/1633
2022-02-18 06:00:42 -07:00
Wez Furlong
a79fc87586 deps: harfbuzz -> 3.4.0 2022-02-12 16:00:58 -07:00
Wez Furlong
48d6935f91 fix matching iosevka font when multiple ttcs were installed
refs: https://github.com/wez/wezterm/issues/1630
2022-02-12 14:07:26 -07:00
Wez Furlong
18c63c0526 fix copying trailing whitespace from wrapped lines
refs: #1635
2022-02-12 09:47:03 -07:00
Wez Furlong
3316695dc0 docs: changelog for https://github.com/wez/wezterm/pull/1577 2022-02-09 19:51:01 -07:00
Wez Furlong
dbf190d414 gui: changing cursor color with escape sequences > force_reverse_video_cursor
refs: 1625
2022-02-08 06:46:31 -07:00
Wez Furlong
7a5956d3b8 gui: blinking cursor now eases rather binary blinks
Also: I recently broke force_reverse_video_cursor with the recent
glyph rendering fixes; this commit restores that functionality.
2022-02-06 22:09:52 -07:00
Wez Furlong
842e4800b5 blinking text is now eased between bg and fg color 2022-02-06 18:28:45 -07:00
Wez Furlong
7956e71b34 docs: mention bidi in changelog 2022-02-06 07:37:01 -07:00
Wez Furlong
2fedc0ca21 docs: changelog for https://github.com/wez/wezterm/issues/1615 2022-02-06 07:29:33 -07:00
Wez Furlong
1b63b4b7c9 deps: harfbuzz -> 3.3.2 2022-02-06 06:44:59 -07:00
Wez Furlong
1e32ccbd2f shaping: fix an issue where we'd lose combining marks like U+20d7
For a sequence like `e U+20d7` the intent is to render the `e` with
a vector arrow over the top.

This is typically implemented by fonts as an `e` followed by the
vector glyph (or vice versa), where either one of those may have
a zero advance so that the two elements are combined.

There were two problems here:

* During shaping we'd see the zero advance and assume that the entry
  was useless and skip it
* During rendering, if we didn't think it had any cell width, we'd
  not render it

Cursoring through that particular sequence can hide the vector
mark if the cursor is set to the default block cursor due to annoyances
in how the block cursor is rendered (it changes the fg color to match
the bg, but for elements outside where we think the cursor is, this
makes those elements invisible).

refs: https://github.com/wez/wezterm/issues/1617
2022-02-05 06:19:25 -07:00
Wez Furlong
794113807b docs: changelog for https://github.com/wez/wezterm/issues/1601
closes: https://github.com/wez/wezterm/issues/1601
2022-02-03 23:09:40 -07:00
Wez Furlong
7577eb327f docs: changelog for https://github.com/wez/wezterm/issues/1610 2022-02-03 23:08:22 -07:00
Wez Furlong
05354fe8e5 deps: update harfbuzz to 3.3.1 2022-01-31 20:32:20 -07:00
Wez Furlong
3b1396dc9c docs: changelog for https://github.com/wez/wezterm/pull/1518 2022-01-28 17:24:29 -07:00
Wez Furlong
ebaa796b70 docs: for canonicalize_pasted_newlines changes
refs: #1575
2022-01-22 10:07:47 -07:00
Wez Furlong
7ccce20544 fonts: allow harfbuzz to guess the script
Our default meant that harfbuzz wouldn't engage preprocessing
steps that normalized the text to NFC.  With this change we now
correctly normalize and render certain compositions that were
totally borked previously.

refs: https://github.com/wez/wezterm/issues/1573
refs: https://github.com/wez/wezterm/issues/1474
2022-01-21 10:10:39 -07:00
Wez Furlong
c930e333c4 fix an issue where ScrollToPrompt got confused by two prompts on same line
refs: https://github.com/wez/wezterm/issues/1121
2022-01-17 22:48:53 -07:00
Wez Furlong
6a167252b6 docs: SwitchToWorkspace
refs: https://github.com/wez/wezterm/issues/1531
2022-01-17 11:32:23 -07:00
Wez Furlong
b6d121dd52 Add wezterm cli send-text command
refs: #888
2022-01-17 10:23:22 -07:00
Wez Furlong
db8f588c5e Add SwitchWorkspaceRelative key assignment 2022-01-17 09:54:11 -07:00
Wez Furlong
8d3d3e02a7 add default_workspace config option
refs: #1322
refs: #1531
2022-01-17 09:31:20 -07:00
Wez Furlong
e8900d47cd add window:active_workspace()
refs: #1531
refs: https://github.com/wez/wezterm/discussions/1322#discussioncomment-1984256
2022-01-17 09:11:06 -07:00
Wez Furlong
7eec41c284 Add ShowLauncherArgs key assignment
refs: https://github.com/wez/wezterm/issues/1485
2022-01-17 08:16:18 -07:00
Wez Furlong
d164178b9d docs for wezterm.nerdfonts
refs: https://github.com/wez/wezterm/issues/1521
2022-01-16 18:45:13 -07:00
Wez Furlong
070c4030c6 Bundle Symbols Nerd Font Mono
Built using:

```
./FontForge-2020-11-07-21ad4a1-x86_64.AppImage --script $PWD/font-patcher "$PWD/src/unpatched-fonts/NerdFontsSymbolsOnly/NerdFontsSymbolsOnly Template 1000 em.ttf" --powerline --use-single-width-glyphs -out /tmp/nerd-fonts-out --fontawesome --fontawesomeextension --fontlinux --octicons --codicons --powersymbols --powerline --powerlineextra --mdi --weathericons
```

which is everything *except* Pomicons at the time of writing, pending
clarifications of its distribution license
(https://github.com/ryanoasis/nerd-fonts/issues/266)

refs: https://github.com/wez/wezterm/issues/1521
2022-01-16 16:04:35 -07:00
Wez Furlong
a9427aca63 Remove ALT-number default key assignments
The issue is that we work hard to match the keys pre-composition,
but for French and Norwegian layouts ALT-number are valid,
useful punctuation keys.  It's awkward to make exceptions for
ALT keys when matching assignments, especially on macOS, and
the simplest thing to do is simply to remove the assignments
and leave it to our users to add their own if they want them.

The ctrl-shift and cmd based assignments are generally much
easier to keep, because those key combinations are not widely
used default mappings on any keyboard layout.

refs: #1543
refs: #1542
refs: https://github.com/wez/wezterm/pull/1132
2022-01-14 22:24:40 -07:00
Wez Furlong
b5dfbc392c make use_ime=true the default for all platforms
The key repeat issues that were blocking this from being enabled
on macos have been resolved.
2022-01-13 09:19:23 -07:00
Wez Furlong
507267aeee docs: changelog for https://github.com/wez/wezterm/pull/1534 2022-01-12 18:03:20 -07:00
Wez Furlong
d1018c37ff docs: changelog for #1526 2022-01-10 18:56:57 -07:00
Wez Furlong
1fd53d4a5d mux: propagate User Vars across to the client
user vars were stubbed out.  This commit adds storage for them
in the mux client and adds a new notification that publishes each
var as it is changed.  That differential stream is applied to the
storage in the mux client when it is received.

```lua
local wezterm = require 'wezterm'

wezterm.on("update-right-status", function(window, pane)
  local woot = pane:get_user_vars().woot
  window:set_right_status(tostring(woot))
end);

return {
  unix_domains = {
    {name="unix"},
  },
}
```

then running:

* `wezterm connect unix`
* in that session: `printf "\033]1337;SetUserVar=%s=%s\007" woot `echo -n nice | base64``

causes `nice` to show in the status area.

refs: #1528
2022-01-10 18:33:32 -07:00
Wez Furlong
8e0a92b2ec docs: WslDomain, default_domain, wsl_domains
refs: #1242
2022-01-09 12:23:14 -07:00
Wez Furlong
373c5900e8 changelog: associate Windows wait_message latency fix w/ more issues 2022-01-09 10:59:43 -07:00
Wez Furlong
0c73a2359f docs: changelog fix typo 2022-01-09 10:56:41 -07:00
Wez Furlong
b7e142f407 docs: revise changelog for xkbd composition changes 2022-01-09 10:55:57 -07:00
Wez Furlong
3ad91ff93e docs: changelog: note about allow_win32_input_mode option 2022-01-09 08:46:09 -07:00
Wez Furlong
41953ee5e9 docs: changelog revise wording around compose_cursor 2022-01-09 08:44:38 -07:00
Wez Furlong
627001762e rename dead_key_is_active -> composition_status, dead_key_cursor -> compose_cursor
Since the composition state isn't strictly tied to dead keys, use
a name that better reflects that.
2022-01-09 08:39:21 -07:00
Wez Furlong
430e34ad37 docs: missing changelog for https://github.com/wez/wezterm/issues/1459 2022-01-08 21:53:44 -07:00
Wez Furlong
10ea932965 docs: changelog for https://github.com/wez/wezterm/issues/1398
and https://github.com/wez/wezterm/issues/1013
2022-01-07 21:23:15 -07:00
Wez Furlong
f2ed459359 docs: changelog for key input stuff
closes: #601
closes: #1080
closes: #1391
2022-01-07 21:18:30 -07:00
Wez Furlong
c383ee218d docs: changelog for https://github.com/wez/wezterm/issues/877
closes: https://github.com/wez/wezterm/issues/877
2022-01-07 21:14:42 -07:00
Wez Furlong
2a6a842362 docs: changelog for https://github.com/wez/wezterm/issues/1131
closes: https://github.com/wez/wezterm/issues/1131
2022-01-07 21:13:04 -07:00
Wez Furlong
3ca840a0ab docs: changelog for win32-input-mode
closes: #318
closes: #1509
closes: #1510
2022-01-07 21:08:50 -07:00
Wez Furlong
97d5429baa term: fix cursor location on primary when resizing with alt screen active
refs: https://github.com/wez/wezterm/issues/1512
2022-01-07 20:55:29 -07:00
Wez Furlong
3c6bc2c366 add ActivatePaneByIndex key assignment action
refs: #1517
2022-01-07 07:30:17 -07:00
Wez Furlong
17a9d6159a wezterm cli now prefers to talk to main GUI instance
When spawned with no WEZTERM_UNIX_SOCKET environment set,
we now prefer to resolve the gui instance, falling back to
the mux if it doesn't look like the gui is running.

`wezterm cli --prefer-mux` will use the original behavior of
trying to resolve the path from the unix domain in the config.
2022-01-06 22:31:42 -07:00
Wez Furlong
91a423da96 docs: changelog for 2a0de16b7b
refs: https://github.com/Canop/broot/issues/473
2022-01-05 20:15:56 -07:00
Wez Furlong
1131f2dce6 docs: changelog for IME/dead key composition 2022-01-05 20:11:41 -07:00
Wez Furlong
32c39fe5ae docs: changelog for #1457 2022-01-04 20:51:58 -07:00
Wez Furlong
359fd15416 docs: fix typo in changelog 2022-01-03 17:20:12 -07:00
Wez Furlong
d4ee3d8958 docs: changelog for #1491
closes: #1491
2022-01-03 17:09:05 -07:00
Wez Furlong
0e92894dad docs: changelog for #1499 2022-01-03 15:03:49 -07:00
Wez Furlong
0f3dcc2c2b docs: changelog for #1498 2022-01-03 12:54:50 -07:00
Wez Furlong
672187973b docs: changelog for #1483 2022-01-03 12:36:22 -07:00
Benoit de Chezelles
462a256e83 Add missing New in latest release's changelog 2022-01-03 07:04:01 -08:00
Wez Furlong
028026049d add window:dead_key_is_active window:leader_is_active
This commit adds a couple of helper methods that provide insight into
the state of the keyboard layer.

The intent is for users to add status information about the keyboard
state.

This commit also ensures that we schedule an update when the leader
key duration expires, and ensures that we close out the leader state
for an invalid key press.

refs: #686
closes: #688

```lua
local wezterm = require 'wezterm';

wezterm.on("update-right-status", function(window, pane)
  local leader = ""
  if window:leader_is_active() then
    leader = "LEADER"
  end
  local dead = ""
  if window:dead_key_active() then
    dead = "DEAD"
  end
  window:set_right_status(leader .. " " .. dead)
end);

return {
  leader = { key="a", mods="CTRL" },
  colors = {
    dead_key_cursor = "orange",
  },
}
```
2022-01-02 19:41:21 -07:00
Wez Furlong
2d62bffe41 window: fix CTRL+C with Russian keyboard on windows
Turns out that we had the same issue on Windows

refs: #678
2022-01-02 16:50:26 -07:00
Wez Furlong
43d9392c52 window: x11/wayland: extract utf8 version of key from key state
Previously, we'd take a couple of guesses at how to map the key
to a utf8 value, but! the keyboard state has a method that can tell
us what to use.

This is important in non-latin keymaps where, for example, the `c`
key generates cyrillic small letter es and we'd end up sending
CTRL + that through to the terminal when CTRL is held down.

If we get the utf8 string from the keyboard layer then we get
CTRL+c instead, and that is what we want.

refs: https://github.com/wez/wezterm/issues/678
2022-01-02 11:16:52 -07:00
Wez Furlong
c05491f831 fonts: fix fontconfig monospace alias resolution
This got broken by 58ece29f00
This commit structures things so that we're less likely to overlook
this in the future!

cc: @unrelentingtech

refs: #1250
2022-01-02 08:26:19 -07:00
Wez Furlong
24840f7e13 docs: add some info about fancy tab bars 2022-01-01 17:14:33 -07:00
Wez Furlong
2d303ec54c docs: update for 20220101-133340-7edc5b5a release 2022-01-01 13:36:37 -07:00
Wez Furlong
f2c0407775 docs: fix typo in changelog 2022-01-01 12:49:05 -07:00
Wez Furlong
0bcd770102 docs: note about get_current_working_dir on windows 2022-01-01 09:18:22 -07:00
Wez Furlong
43dff29391 Sync with iTerm2-Color-Schemes
Sync with:
555db64e47

and update the screenshots for the docs
2021-12-31 10:43:30 -07:00
Wez Furlong
52c198ab8c x11: default use_ime=true, add xim_im_name option 2021-12-31 09:55:17 -07:00
Wez Furlong
143f7c9acc macos: detect when IME swallows a key press (eg: F8, F9)
Certain keys are "handled" by the IME through it generating a "noop"
command.

That's not super useful for us, so this commit detects the noop case
and then treats it as though the IME didn't handle the input event.

While implementing the above fix, I realized that the same technique
could be used more generally to return processing to our main input
handling for the various selectors that we do recognize: we were
essentially inferring the original key combinations based on the
selector which is not scalable and potentially lossy.

We can't capture CTRL-ESC this same way, as that key combination
is magical and is routed to the callback without generating any
key events.

refs: https://github.com/wez/wezterm/issues/615
refs: https://github.com/wez/wezterm/issues/975
refs: https://github.com/wez/wezterm/pull/1410
2021-12-30 22:50:26 -07:00
Wez Furlong
e3afdd7b8f macos: normalize Composed("p") -> Char('p') when use_ime=true
When the IME is enabled, pressing `CTRL-A P` would generate
`Composed("P")` for the second key press, which we couldn't
then match in the keymapping layer.

This commit checks for that and normalizes it to `Char('P')`
instead.

refs: https://github.com/wez/wezterm/issues/1409
refs: https://github.com/wez/wezterm/issues/1410
2021-12-30 21:36:25 -07:00
Wez Furlong
99d73baba7 docs: changelog for https://github.com/wez/wezterm/issues/1474 2021-12-30 09:37:40 -07:00
Wez Furlong
f175c5f6c0 add wezterm.get_builtin_color_schemes() 2021-12-29 09:20:12 -07:00