1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-20 11:17:15 +03:00
Commit Graph

4919 Commits

Author SHA1 Message Date
Wez Furlong
fc069f9298 ci: add centos 9 2022-01-01 17:43:44 -07:00
Wez Furlong
4238488a9b docs: suggest that people use default_gui_startup_args
instead of connect_automatically
2022-01-01 17:41:52 -07:00
Wez Furlong
6502aa54d6 docs: more adjustments for fancy tabs 2022-01-01 17:35:27 -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
7edc5b5ab0 ci: urgh, try another way 2022-01-01 13:33:40 -07:00
Wez Furlong
e11b9460ef ci: try alternative way of passing tag name 2022-01-01 13:10:08 -07:00
Wez Furlong
f2c0407775 docs: fix typo in changelog 2022-01-01 12:49:05 -07:00
Wez Furlong
ea7030ae11 clarify the purpose of wezterm start in the --help output
This makes it a bit more understandable/discoverable.

refs: #1478
2022-01-01 12:44:38 -07:00
Wez Furlong
8251e04c63 gui: invalidate windows resources when icon changes
I noticed that by myself and another user who built from source
still had the old icon show up.
2022-01-01 12:15:03 -07:00
Wez Furlong
09a705b78f mux: fix unix build 2022-01-01 11:38:42 -07:00
Wez Furlong
58ece29f00 fonts: defer best match until we have font_dirs + locator + builtin
A user reported an issue where having just Roboto Thin installed
caused the title font to use that one, rather than the desired
Roboto Bold.

This commit adjusts the font matching code to accumulate candidates
from each of the font_dirs, locator and built-in font locations,
and then find the best match.
2022-01-01 11:34:39 -07:00
Wez Furlong
e148cfe8e3 procinfo: tidy up windows impl a bit 2022-01-01 10:01:19 -07:00
Wez Furlong
6a7fd37d34 procinfo: add some comments 2022-01-01 09:53:56 -07:00
Wez Furlong
5660942055 procinfo: add windows console field. mux: ignore non-console procs
When considering the fg process, we don't want a newly spawned
notepad.exe to show as the fg process in a cmd/pwsh pane, as it
runs async from the console and isn't attached to it.

We can extract the console handle from the process information and
use a 0 value handle to indicate win32 apps that are not attached
to any console.

We cannot compare console handle values directly: without probing
deeper into the handle we don't know that two differently valued
handles refer to different consoles, because a handle can be
duplicated into another with a different numeric value.
2022-01-01 09:40:18 -07:00
Wez Furlong
0bcd770102 docs: note about get_current_working_dir on windows 2022-01-01 09:18:22 -07:00
Wez Furlong
907b92b3ea gui: box: better job at avoiding overflowing bounds
This makes the x button overflow look better when the tab titles are
wide
2022-01-01 09:03:19 -07:00
Wez Furlong
d11bc4a5bb termwiz: sync with upstream wichdechar_width
refs: https://github.com/ridiculousfish/widecharwidth/issues/16
refs: https://github.com/ridiculousfish/widecharwidth/pull/17
closes: https://github.com/wez/wezterm/issues/1469
2022-01-01 08:18:41 -07:00
Wez Furlong
7e8e215dc7 gui: remove adjust from vertex
This comes from a time where our quads were always locked to grid
positions.  We don't need it any more: we can simply add the adjustments
to the quad positions that we set.

Removing it makes the vertex a bit smaller and reduces the amount
of GPU accessible memory we need to use.
2022-01-01 08:11:10 -07:00
Wez Furlong
8c66d02364 procinfo: fix build on freebsd 2021-12-31 22:50:53 -07:00
Wez Furlong
20d9ded070 procinfo: add some comments! 2021-12-31 22:49:08 -07:00
Wez Furlong
eac630003c mux: restore caching of proc tree on windows 2021-12-31 22:19:45 -07:00
Wez Furlong
ed958160f3 procinfo: fixup macos build 2021-12-31 21:46:36 -07:00
Wez Furlong
3e05ee667f procinfo: fix linux build 2021-12-31 21:31:28 -07:00
Wez Furlong
1ad4015f9c procinfo: reorg a bit; enable cwd probing on windows
Likely breaks the mac and windows builds
2021-12-31 21:28:03 -07:00
Wez Furlong
e16a27dfb3 procinfo: fmt/refactor
Just moves some code around
2021-12-31 20:05:27 -07:00
Wez Furlong
6650879260 move platform logic about LocalProcessInfo into procinfo crate 2021-12-31 19:45:09 -07:00
Wez Furlong
416c700841 procinfo: start_time is now in unspecified units since boot 2021-12-31 19:39:37 -07:00
Wez Furlong
910b111efa move procinfo bits into own crate 2021-12-31 19:31:21 -07:00
Wez Furlong
2aa491af1a mux: remove dep on sysinfo; we now do our own win32 stuff
This also removes the sysinfo cache; will replace it with
something else in a follow up commit.
2021-12-31 19:21:45 -07:00
Wez Furlong
2b38c3dd32 mux: macos: add missing status and comm/name fields to procinfo 2021-12-31 16:25:03 -07:00
Wez Furlong
259c78d514 mux: remove sysinfo dep on linux 2021-12-31 16:16:04 -07:00
Wez Furlong
3eb5408135 mux: use linux specific impl for get_foreground_process_name 2021-12-31 15:21:45 -07:00
Wez Furlong
efbcdc860e mux: remove sysinfo dep on macos
We can get just the targeted information we need a bit more robustly
and cheaply.
2021-12-31 14:54:03 -07:00
Wez Furlong
80d16574e3 mux: refactor sysinfo. Use own fn for macos foreground process path
I noticed that sysinfo failed to yield info about 50% of the time on
macos!

Just go direct to the underlying system function; we don't need all
of the info that sysinfo collects in any case.
2021-12-31 11:30:10 -07:00
Wez Furlong
09e8d7b92f mux: proc_pidinfo is now available in libc on macos
So we don't need our own copy of the ffi bits here
2021-12-31 11:09:43 -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
0184038c55 gui: invalidate window after window:perform_action
closes: #1475
2021-12-31 10:02:15 -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
d031342b72 macos: avoid unrecognized selector error
I saw this when the IME was active:

```
2021-12-31 00:46:26.941 wezterm-gui[46160:16665949] -[NSConcreteMutableAttributedString UTF8String]: unrecognized selector sent to instance 0x600002b24180
```

the issue is that some of the window callbacks can receive either
NSString or NSAttributedString.  The latter doesn't have a UTF8String
method, but does have a string property that returns an NSString
that can be used instead.
2021-12-31 00:54:52 -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
7efc6a6cb8 gui: ensure that the tab bar occupies a full pixel height
Otherwise we get weird vertical misalignment effects in the
terminal cell area for eg: the top of a `z` glyph being drawn
at a half pixel height.
2021-12-30 20:06:05 -07:00
Wez Furlong
1e7d552844 fonts: replace font_ptr with a font id
I'm running down a weird thing where the main font renders weirdly
when the title font is 12 pt vs the main font 10 pt.

I thought there might have been a cache invalidation issue and
realized that we could have an A-B-A style issue with the font_ptr
stuff, so I replaced it with an incrementing id.

That didn't fix the thing I was looking at, but does feel a bit
nicer overall.
2021-12-30 19:09:30 -07:00
Wez Furlong
a322c3e8d2 fonts: title fonts now fall back to main font list 2021-12-30 18:28:49 -07:00
Wez Furlong
cbe0bc21dc gui: fonts: just use Roboto for default title font on all systems 2021-12-30 18:10:25 -07:00
Wez Furlong
00a393b3d1 gui: bundle and use Roboto for title font on Linux + Windows
The default we use on macOS looks decent.  Roboto is a similar
looking font that we can use for the other platforms.
I may make it the same on all three once I've had a chance
to compare it on a mac.
2021-12-30 17:51:22 -07:00
Wez Furlong
e225589b05 mux: improve process name cache and fg proc name on windows
Reduce the cache lifetime a bit, and resolve a potential
racy/non-deterministic result due to the timestamp granularity.
2021-12-30 17:17:28 -07:00
Wez Furlong
97c8cda974 gui: ls-fonts: include title font in ls-fonts output 2021-12-30 16:51:30 -07:00
Wez Furlong
561efcb8d1 gui: invalidate fancy tab bar on config reload
Otherwise we won't pick up font changes as quickly
2021-12-30 16:50:44 -07:00