Commit Graph
1240 Commits
Author SHA1 Message Date
YuraIz 6b2137de0b integrated-title-bar: Add Native button style parameter 2023-03-31 19:59:03 -07:00
YuraIz ab52277393 integrated-title-bar: Replace window button recoloring
also change shape of rounded corners to ovals
2023-03-31 19:59:01 -07:00
YuraIz bcd1b03569 integrated-title-bar: Use snap layouts for any maximize button 2023-03-31 19:55:13 -07:00
YuraIz eab21a669d integrated-title-bar: Improve windows support 2023-03-31 19:53:45 -07:00
YuraIz 01aeb506c0 integrated-title-bar: Update config options
and rename the "FANCY" option to "INTEGRATED_BUTTONS"
2023-03-31 19:51:46 -07:00
YuraIz c553646ea4 integrated-title-bar: Remove commented line 2023-03-31 19:45:28 -07:00
YuraIz baebf907f6 integrated-title-bar: Remove macos button style
macos uses native buttons
2023-03-31 19:45:28 -07:00
Yuri Izmer e354791c34 integrated-title-bar: Add macOS support 2023-03-31 19:45:28 -07:00
YuraIz 7d79933d28 integrated-title-bar: Ignore style config on macos and windows 2023-03-31 19:45:28 -07:00
YuraIz 6c40c2397e integrated-title-bar: Add button style option 2023-03-31 19:45:28 -07:00
YuraIz d39bccca10 integrated-title-bar: Add option to remove useless buttons 2023-03-31 19:45:28 -07:00
YuraIz 2333046e1b integrated-title-bar: Add button placement option 2023-03-31 19:45:26 -07:00
YuraIz 0401dc26d6 integrated-title-bar: Add libadwaita styled buttons 2023-03-31 19:44:20 -07:00
YuraIz 2cd325fecd integrated-title-bar: Add initial shape for macos buttons 2023-03-31 19:44:19 -07:00
YuraIz 29fe4709ce integrated-title-bar: Add color configuration 2023-03-31 19:44:19 -07:00
YuraIz 93308317d7 integrated-title-bar: Add windows support 2023-03-31 19:44:19 -07:00
YuraIz 36f41af81e integrated-title-bar: Add window buttons to the tabbar 2023-03-31 19:44:13 -07:00
Wez Furlong 76060b7cc2 win:perform_action now works with Copy Mode and other overlays
refs: #3209
2023-03-30 19:46:02 -07:00
Wez Furlong 4a555be7d9 gui: win:perform_action now awaits the underlying perform_key_assignment
This should help a bit with https://github.com/wez/wezterm/issues/3405
even though there is a better solution for the scenario mentioned there.
2023-03-30 19:31:40 -07:00
Wez Furlong 29d10946aa surface config errors when running wezterm connect
Broken config could cause the gui to exit before it would normally
print the config warnings and errors, making it harder to understand
what is going on.

This commit bundles the config error text together with whatever
caused it to error out in the fatal error case.
2023-03-30 16:19:25 -07:00
Wez Furlong 2c9fd0ef6c serial: fix some FIXMEs
Now that we have a more regular domain-shaped serial thingy,
refactor the `wezterm serial` command to re-use the common
gui setup and running logic.  This removes some FIXMEs from
around the wonky setup of the domain, which is nice.
2023-03-29 19:34:10 -07:00
Wez Furlong 1e688a5128 Add serial_ports config
This commit teaches the config about SerialDomains, and the mux
layer about constructing a SerialDomain, then changes the GUI
layer to use those pieces to set up `wezterm serial`.

A new `serial_ports` config is added, and the GUI layer knows how
to apply it to the set of domains in the mux.

The result of this is that you can now define a domain for each
serial port and spawn a serial connection into a new tab or window
in your running wezterm gui instance.
2023-03-29 19:05:13 -07:00
Wez Furlong a7fde7935b raise ulimit nofile and nproc to a reasonable min value on unix systems
It's a tremendous PITA for the user to do this at the system level on a
mac, where it is sorely needed.  This commit allows raising to a desired
minimum level, but won't decrease from an already larger soft limit.

refs: https://github.com/wez/wezterm/discussions/3353
2023-03-28 07:29:47 -07:00
Wez Furlong fa50a065d7 fix stray debug 2023-03-27 21:18:43 -07:00
Wez Furlong 8ea49ab69f fix overflowing sub assertion in debug mode 2023-03-27 19:24:30 -07:00
Wez Furlong 59503034c7 tidy up some debug logging 2023-03-25 20:33:23 -07:00
Wez Furlong 8dd365d4c5 mux: fix some dpi and pixel size issues
Three issues:

* The initial connect would leave the dpi assigned to 0, resulting
  in incorrect scaling when using imgcat until the window was resized
  and the correct dpi was passed up.
* On resize, we'd only compare the row/col count and not notice changes
  in pixel dimensions/dpi
* On the server side, when processing a resize and recomputing
  the tab size, we would omit the pixel dimensions and leave
  the resulting tabs and panes with 0 dimensions, breaking imgcat
  because it thought the window was 0x0.

refs: https://github.com/wez/wezterm/issues/3366
2023-03-25 20:24:57 -07:00
Wez Furlong d491c736ef When a modal is active, it gets first dibs on key processing
This fixes a surprising interaction between copy mode and the
command palette, but is also the root cause of another issue
with CharSelect mode.

refs: https://github.com/wez/wezterm/issues/2947
2023-03-25 18:32:38 -07:00
Wez Furlong 500934bc9c palette: exclude copy mode actions unless copy mode is active 2023-03-25 18:10:00 -07:00
Wez Furlong 1c55ca14b0 macos: invalidate window when dispatching from menubar
refs: https://github.com/wez/wezterm/issues/3365
2023-03-25 13:47:54 -07:00
Wez Furlong c3b265b8c4 fmt 2023-03-25 13:30:15 -07:00
Wez Furlong 133faf8305 Add new-tab-button-click event
refs: #323
refs: https://github.com/wez/wezterm/discussions/3364
2023-03-25 13:26:16 -07:00
Wez Furlong ca283c1310 palette: prioritize platform-appropriate shortcuts
On macOS prefer CMD, but on other platform prioritize shortcuts
that don't use CMD, as those tend to reserve the CMD based shortcuts
for the system.

Allow specifying how many shortcuts to show if an action has
multiple assignments.  The default is 1.

refs: https://github.com/wez/wezterm/issues/3335
2023-03-25 11:14:54 -07:00
Wez Furlong c7e4c7fcd0 palette: refactor slightly
Avoids emitting blank padding for rows that have no key assignments
2023-03-25 10:47:50 -07:00
Wez Furlong c5213b4f85 palette: add config for how ui key caps render
added a new `ui_key_cap_rendering` option that accepts the following
values:

```lua
-- Super, Meta, Ctrl, Shift
config.ui_key_cap_rendering = 'UnixLong'

-- Super, M, C, S
config.ui_key_cap_rendering = 'Emacs'

-- Apple macOS style symbols
config.ui_key_cap_rendering = 'AppleSymbols'

-- Win, Alt, Ctrl, Shift
config.ui_key_cap_rendering = 'WindowsLong'

-- Like WindowsLong, but using a logo for the Win key
config.ui_key_cap_rendering = 'WindowsSymbols'
```

refs: https://github.com/wez/wezterm/issues/3335
2023-03-25 09:18:52 -07:00
Wez Furlong 1531dd8471 update tests for updated JetBrainsMono 2023-03-25 07:21:36 -07:00
Wez Furlong d60cdbf74e palette: show key assignment alongside entries
For items in the main set of key assignments, show the keyboard
shortcut to the right.

Some items have multiple key assignments; we show only the first
one. We'll probably want to be a bit smarter. For instance,
both linux and windows tend to occupy the Windows/Super key
assignments, so we should probably prioritize showing the Ctrl+Shift
variants on those platforms.

refs: https://github.com/wez/wezterm/issues/3335
2023-03-24 23:34:49 -07:00
Wez Furlong 499e5f73d0 palette: show the label from the command in the palette
Given an assignment like this:

```
{
  key = "b",
  mods = "ALT",
  action = wezterm.action.SplitPane {
    direction = 'Right',
    command = {
      label = 'Bash Right',
      args = {'/usr/bin/bash' }
    }
  }
}
```

we should show the label from the command in the palette.
That's what this commit enables.

If there is no label, but the arguments are set, then the
arguments will be shown instead.

refs: #3252
2023-03-24 21:05:14 -07:00
Wez Furlong 604ef152be add wezterm cli activate-pane, wezterm cli activate-tab
refs: #3352
refs: https://github.com/wez/wezterm/issues/886
2023-03-24 17:32:55 -07:00
Wez Furlong 622ea1add8 mux: notify clients when the size/structure of a tab changes
This helps to notify when eg: splits are changed, or the tab
is resized by another client.

refs: https://github.com/wez/wezterm/issues/2133
refs: https://github.com/wez/wezterm/issues/2351
refs: https://github.com/wez/wezterm/issues/783
2023-03-24 17:28:34 -07:00
Wez Furlong f71bce1727 mux: propagate pane focus change events to clients
This commit causes the mux to generate a PaneFocused notification
when the active pane is changed.

The mux server will forward that as a unilateral PDU to connected
clients.

The clientpane implementation will handle that by applying the
same state to the local mux.

refs: #2863
2023-03-24 13:13:31 -07:00
Wez Furlong 2e488d57c7 update terminfo to 0.8 2023-03-24 10:12:49 -07:00
Wez Furlong bc7acc18e0 fixup images with the multiplexer
* Translate from File to EncodedFile as needed
* Adopt blob leases in the mux server
* Fix an issue where the first image sent by the mux server would
  be replaced on the client by its background image, if configured.
  Removed the ImageData::id field to resolve this: you should use
  the hash field instead to identify and disambiguate images.
  Bumped the termwiz API version because this is conceptually
  a breaking change to the API

refs: https://github.com/wez/wezterm/issues/3343
2023-03-23 21:43:28 -07:00
Wez Furlong 57a1b7f2ef factor window border sizes when computing window sizes
This one was a bit weird because something appeared to be a bit
non-deterministic.  With this config:

```lua
local wezterm = require 'wezterm'

return {
  window_frame = {
    border_left_width = '1cell',
    border_right_width = '1cell',
    border_bottom_height = '0.5cell',
    border_top_height = '0.5cell',

    border_left_color = '#444',
    border_right_color = '#444',
    border_bottom_color = '#444',
    border_top_color = '#444',
  },

  window_padding = {
    left = '1.5cell',
    right = '1.5cell',
    top = '0.5cell',
    bottom = '0.5cell',
  },
}
```

starting wezterm could result in a terminal that reported either 23 or
24 lines. I got 24 when running the build from da7e29df but usually
23 when running a build out of my repo.

Looking closely, the issue is that the initial window size didn't
account for the configured border size, and that we'd subsequently
fix that up when we later do a resize fixup after creating the window.

This commit refactors the window border logic so that it can be
used prior to having fully constructed the terminal window and then
uses that to fixup the initial computed dimensions.

I also noticed with this config that increasing the font size
with CTRL-+ could also result in an inconsistency between the displayed
terminal size and the pty size we set in the kernel: it was missing
the border adjustment as well, so I added it in there.

refs: #3333
2023-03-23 07:11:07 -07:00
Wez Furlong 1a32908beb fix lua string escaping in wezterm show-keys
We didn't render stuff like this correctly:

```
{ key = "{", mods = "SHIFT|CMD", action = wezterm.action.SendString("\2p") },
```

refs: https://github.com/wez/wezterm/issues/3326
2023-03-22 18:49:47 -07:00
Wez Furlong b384dc999f fix delegation of --skip-config to wezterm-gui
refs: #3325
2023-03-22 07:24:02 -07:00
eaglgenes101 4ee16328b8 Changed config option name to mouse_wheel_scrolls_tabs, made it default to true (matching current behavior) 2023-03-21 22:09:14 -07:00
eaglgenes101 8308887d21 Add config option for scrolling the tab bar 2023-03-21 22:09:14 -07:00
Wez Furlong 0b83c97427 keys: avoid scrolling to bottom when CapsLock is pressed
refs: https://github.com/wez/wezterm/issues/3306
2023-03-21 09:17:24 -07:00
Wez Furlong 001a49be4c minor optimization for single-frame animated formats
Use 1-day duration for the single frame when an animated
format yields only a single frame.
2023-03-20 10:14:17 -07:00