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

6168 Commits

Author SHA1 Message Date
Wez Furlong
99391e39d2 macos: NSScreen::maximumFramesPerSecond is newish
Gate calling it to avoid a runtime failure on eg: Big Sur.

refs: https://github.com/wez/wezterm/issues/2440
2022-08-21 07:21:12 -07:00
Wez Furlong
58eecab4f8 docs: changelog for https://github.com/wez/wezterm/issues/2399 2022-08-20 23:02:29 -07:00
Wez Furlong
3917fc2184 tab bar: force x and + buttons to be square
Use the font height as the basis for the size, rather than the width,
to avoid the buttons being too condensed.

Explicitly use the pixel height for the dimensions so that the
buttons are square.

refs: https://github.com/wez/wezterm/issues/2399
2022-08-20 22:34:19 -07:00
Wez Furlong
b181935303 win32: implement max_fps option 2022-08-20 19:20:41 -07:00
Wez Furlong
dc62aa5198 win32: set ScreenInfo::max_fps 2022-08-20 17:39:51 -07:00
Wez Furlong
944ea1444e docs: fix link 2022-08-20 17:06:32 -07:00
Wez Furlong
78b5ac0eb5 add border size and color config
refs: https://github.com/wez/wezterm/issues/2417
2022-08-20 17:05:17 -07:00
Wez Furlong
8b3a52ba9a colors now override color_scheme
The prior mutually exclusive behavior kept surprising people so let's
just flip this around.

This is potentially a "breaking" change for folks, but I think it is
worth it.
2022-08-20 11:48:22 -07:00
Wez Furlong
8b2ef50ca7 gui-startup event now also works for wezterm ssh.
This is done by adjusting how `wezterm ssh` works; we now set up
the default domain and call into the main `wezterm start` logic.

refs: #284
2022-08-20 08:01:45 -07:00
Wez Furlong
429c18b7ee fixup boundary condition for MoveBackwardZoneOfType
refs: #2346
2022-08-20 07:35:28 -07:00
Wez Furlong
cb75b642f7 Fixup ActivatePaneDirection to respect edge intersection
d2892c6 switched to using recency only, but neglected to verify that
the edges of the candidate panes were actually touching, leading to
some weird results.

This commit uses recency only when the edges intersect, otherwise,
scores 0 for the candidate.

refs: #2374
2022-08-20 07:20:07 -07:00
Wez Furlong
cb09e71214 x11: populate ScreenInfo::max_fps from xrandr 2022-08-20 07:07:58 -07:00
Wez Furlong
2ab330efdd docs: changelog for https://github.com/wez/wezterm/pull/2402 2022-08-20 06:08:30 -07:00
Magnus Groß
ba309931a3 Cache xdg-desktop-portal appearance
This slightly improves the startup time of wezterm.

Right now we query the portal appearance value again over dbus every
time that we access it, for example every time that the user calls
wezterm.gui.get_appearance() from the Lua interface.

Queries over dbus are slow, they usually take a few milliseconds to
complete, for example on my system a portal query over dbus takes around
2 milliseconds to complete.

Wezterm also automatically calls the portal during its own internal
x11/wayland connection initialization, thus right now wezterm queries
the appearance portal setting n+1 times on startup, where n is the
number of times that the user calls get_appearance() from the config.

To fix this problem, we simply cache the portal appearance.

Thus this patch decreases the startup time by 2ms for users that
configure wezterm to follow the global system theme and potentially by
more for users that call get_appearance() in inflational amounts.

With the naive implementation wezterm would be subject to the following
race condition:

1. wezterm calls get_appearance() and caches the value
2. System-wide dark mode changes
3. wezterm subscribes to portal notifications

In that scenario wezterm would miss the dark mode switch entirely and
would cache the wrong value until the dark mode switches again after
wezterm subscribed.

To fix this race condition we call read_setting() again **after** we
have subscribed just to be on the safe side.

Note that while this still introduces a second "redundant" dbus query
for the same value, this time it does not actually block start up since
it happens in another thread.

refs: #2258
2022-08-20 06:06:59 -07:00
Wez Furlong
4fead3171e macos: report max_fps in ScreenInfo
Other platforms can be added later
2022-08-19 21:02:51 -07:00
Wez Furlong
8ca3faa6ee macos: implement max_fps
Use the same technique that we use on x11 systems to schedule/throttle
painting frames.

refs: https://github.com/wez/wezterm/discussions/2419
2022-08-19 20:39:39 -07:00
Wez Furlong
ed9fafbc67 docs: changelog for #2434
Looks like we bonus-fixed an issue we didn't know we had as
part of the pty API adjustments in e6421d1b72

refs: https://github.com/wez/wezterm/issues/2434
refs: https://github.com/wez/wezterm/issues/1396
2022-08-19 19:00:34 -07:00
Lucy
eb65b5fb63 Add control key in docs 2022-08-18 13:50:00 -07:00
Davide Cavalca
0048209bcf Add missing license files 2022-08-17 07:19:12 -07:00
Wez Furlong
f2ee48bdff cargo update 2022-08-14 22:27:23 -07:00
Wez Furlong
f39ae2f762 background: avoid weird wraparound in radial gradients
I was seeing a black "hole" in the center of this gradient:

```
  background = {
    {
      source = {
        Gradient={
          colors = {"rgb(45,26,109)", "black"},
          orientation = {
            Radial={
              cx = 0.75,
              cy = 0.75,
              radius = 1.25,
            }
          },
        }
      },
      width="100%",
      height="100%",
    },
```

setting noise=0 "fixed" it, so this commit localizes that fix
to the center of the gradient by preventing noise from wrapping
around the gradient.
2022-08-14 08:25:31 -07:00
Wez Furlong
f6f36b454b docs: changelog for https://github.com/wez/wezterm/pull/2394 2022-08-12 20:09:48 -07:00
EdenEast
c31b1deb62 chore: Sync color schemes with nightfox changes
This adds `carboxfox` and updated retro tab colors.
2022-08-12 20:09:02 -07:00
Wez Furlong
c8ca80f67e pty: fix doc example 2022-08-12 09:44:49 -07:00
Wez Furlong
517cdc9c1b fixup build for pty api change 2022-08-12 08:45:02 -07:00
Wez Furlong
53febb14ff pty: fixup for macos
e6421d1b72 removed this bit from the
example:

```
-
-    // Note that we're waiting until after we've read the output
-    // to call `wait` on the process.
-    // On macOS Catalina, waiting on the process seems to prevent
-    // its output from making it into the pty.
-    println!("child status: {:?}", child.wait().unwrap());
```

This commit revisits that and puts in place a differently horrible
solution for macos.

The issue is that if we don't put in a short sleep on macos, then
for a short lived process like `whoami` in this example, we end up
reading output like this:

```
; cargo run --example whoami
   Compiling portable-pty v0.8.0 (/Users/wez/wez-personal/wezterm/pty)
    Finished dev [unoptimized + debuginfo] target(s) in 0.60s
     Running `/Users/wez/wez-personal/wezterm/target/debug/examples/whoami`
child status: ExitStatus { code: 0, signal: None }
output: \r\n^D\u{8}\u{8}wez\r\n%
```

where the EOT that we send on Drop somehow gets *prepended* to the output
that we read from the pty with a couple of BELs thrown in.

I'm not sure WTF is happening on macOS for that to occur; feels like
some kind of race wrt. process startup and initializing the pty in the
system.

The reader has to be started before we close it as well, otherwise
the same issue can occur.
2022-08-12 08:37:20 -07:00
Wez Furlong
e6421d1b72 pty: try_clone_writer -> take_writer
This breaking API change allows us to explicitly generate EOF when the
taken writer is dropped.

The examples have been updated to show how to manage read, write
and waiting without deadlock for both linux and windows.
Need to confirm that this is still good on macOS, but my
confidence is high.

I've also removed ssh2 support from this crate as part of this
change. We haven't used it directly in wezterm in a long while
and removing it from here means that there is slightly less code
to keep compiling over and over.

refs: https://github.com/wez/wezterm/discussions/2392
refs: https://github.com/wez/wezterm/issues/1396
2022-08-12 07:56:46 -07:00
Wez Furlong
259210dc2d term: hook flush up to ThreadedWriter
I'd forgotten that this was in here.
The recentish fixes to flush for various terminal queries
likely need this to be 100% good.  Surprised this hasn't
come up as a bug already :-/
2022-08-12 07:55:18 -07:00
Muhammed Zakir
4e0c7771bb Fix alias for Flatpak: command wasn't quoted 2022-08-11 13:08:24 -07:00
Wez Furlong
3602a839eb docs: add stable download links for suse and alpine 2022-08-11 08:27:11 -07:00
Wez Furlong
555bce3f7d fix bypass_mouse_reporting_modifiers
refs: https://github.com/wez/wezterm/issues/2389
2022-08-11 07:38:55 -07:00
Wez Furlong
130645414d add update-status event. deprecates update-right-status
refs: #1561
2022-08-10 06:10:48 -07:00
Wez Furlong
04bc838b63 fix overly truncated tab titles
refs: https://github.com/wez/wezterm/issues/2379
2022-08-09 20:46:41 -07:00
Wez Furlong
6542566e8f apply executable checks to $SHELL and /etc/passwd lookup
refs: https://github.com/wez/wezterm/issues/2378
2022-08-09 20:12:28 -07:00
Wez Furlong
9cd72fefe2 pty: cmdbuilder: check for executable access when resolving program
`wezterm start -- /etc/profile` would crash on macOS because
`/etc/profile` isn't executable.

This commit checks for executable access as a prereq for both the
path search and the absolute path cases and generates a non-crashing
error:

```
$ wezterm start -- /etc/profile
17:24:03.574  ERROR  wezterm_gui > Unable to spawn /etc/profile because it doesn't exist on the filesystem or is not executable (EACCES: Permission denied); terminating
```
2022-08-09 17:29:22 -07:00
Wez Furlong
c496f1ce97 fix fedora download links
I think I may have inadvertently changed whether the arch portion
was included in the filename for stable releases.

Allow for that in the regex.

Remove debian 9 which is no longer supported.

closes: https://github.com/wez/wezterm/issues/2382
2022-08-09 09:05:29 -07:00
Wez Furlong
7bf8ea8f6e docs: update info about number of color schemes 2022-08-09 07:46:24 -07:00
Wez Furlong
b832b29c68 docs: add missing COMMANDS entry for ShowLauncherArgs
refs: https://github.com/wez/wezterm/issues/2377
2022-08-09 07:36:58 -07:00
Wez Furlong
626830ab3e docs: clarify ShowLauncherArgs flags behavior
closes: https://github.com/wez/wezterm/issues/2377
2022-08-09 07:18:52 -07:00
Wez Furlong
d49acf2b9f docs: wezterm is now on flathub
refs: https://github.com/wez/wezterm/issues/2229
2022-08-09 06:50:46 -07:00
Wez Furlong
d2892c6ff0 ActivatePaneDirection uses recency to resolve ambiguous moves
refs: https://github.com/wez/wezterm/issues/2374
2022-08-08 21:16:01 -07:00
Wez Furlong
d5755f3ee8 sync color schemes with nightfox
refs: https://github.com/EdenEast/nightfox.nvim/issues/191
2022-08-08 08:45:02 -07:00
Wez Furlong
b814ff5bf4 remove flatpak-unsupported link types
They pass this:

```
flatpak run --env=G_DEBUG=fatal-criticals org.freedesktop.appstream-glib validate assets/wezterm.appdata.xml
assets/wezterm.appdata.xml: OK
```

but break when building a flatpak
2022-08-08 07:45:59 -07:00
Wez Furlong
773e66d91c fix typo in appdata id tag 2022-08-08 07:28:55 -07:00
Wez Furlong
27b587ef1f flesh out appdata a bit more 2022-08-08 07:25:38 -07:00
Wez Furlong
8b8d8f61e6 add content rating and release info to appdata
Required for flathub submission

refs: https://github.com/flathub/flathub/pull/3398
2022-08-08 06:44:22 -07:00
Wez Furlong
5dc7bf5682 docs: remove not yet bit 2022-08-07 22:45:46 -07:00
Wez Furlong
ac3a9c001b cargo update 2022-08-07 19:31:29 -07:00
Wez Furlong
948f8d2faf cleanup log files older than 1 week 2022-08-07 16:44:48 -07:00
Sam M W
8a625a941e don't recompile dependencies we've already got 2022-08-07 14:28:45 -07:00