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

1261 Commits

Author SHA1 Message Date
Wez Furlong
d3492b27c6
fix: 'wezterm connect --workspace foo dom' part 2
In the spawn initial mux case, we didn't verify that the mux
had no windows with the requested workspace, so we'd start up
with just the default session spawned by the mux when it starts
up.

This commit tries a bit harder to confirm that there is matching
domain/workspace combo before deciding that it is sufficient.

refs: #2734
2023-04-03 08:10:47 -07:00
Wez Furlong
718397d054
render: ensure alt color and mix are well-defined for poly quads
Potentially the root cause of the gnome-style button alpha issue

https://github.com/wez/wezterm/issues/1180#issuecomment-1493818652
a278dbf43f

refs: #1180
2023-04-03 07:47:02 -07:00
Wez Furlong
3dc2ac0a75
fix wezterm connect --workspace
When creating the initial window, we didn't pass through the
provided workspace name.

refs: #2734
2023-04-02 14:04:20 -07:00
Wez Furlong
7735602bfa
suppress dead code warning for locate_app_wide_key_assignment
It is used, just not currently on all platforms, and I want to
compile and verify it on linux which I use most often.
2023-04-02 13:36:13 -07:00
Wez Furlong
25255d90d6
config: lazyily produce ssh domain list
I noticed that in debug builds, `wezterm set-working-directory` had
high/variable latency, and I traced part of it to the ssh config parsing
logic.

Make that lazily evaluate the ssh config.

refs: #3402
2023-04-02 10:34:46 -07:00
Wez Furlong
741570563d
add wezterm cli rename-workspace
refs: #2787
2023-04-02 07:37:45 -07:00
Wez Furlong
ee68e31bbd
tab navigator: use tab title > pane title if set
refs: #1598
refs: #522
2023-04-01 21:52:46 -07:00
Wez Furlong
dd7d22ed6b
mux: propagate tab and window title when it changes
refs: #1598
2023-04-01 21:31:37 -07:00
Wez Furlong
ac3e2307d2
default format-tab-title now respects tab:set_title
Finally getting around to wrapping this up; previously you had
to define your own format-tab-title event handler if you wanted
to show the title that you had set via `tab:set_title`.

Now, if that string is not empty, it will be used instead of
the title string from the active pane.

refs: #1598
2023-04-01 20:06:18 -07:00
Wez Furlong
ea28fb891a
add window:active_tab(), window:active_pane(), tab:active_pane() 2023-04-01 19:46:15 -07:00
Wez Furlong
ed67d0449a
refactor: remove opengl and OpenGL from names
It's not opengl specific any more and those names are overly
long and slightly misleading, so fix them up.
2023-04-01 07:06:26 -07:00
Wez Furlong
aa51468e28
refactor: tidy up window_buttons a little 2023-04-01 06:56:37 -07:00
Wez Furlong
5838b2c98b
refactor: split render.rs into smaller modules 2023-04-01 06:47:27 -07:00
Wez Furlong
edb6aa38f2
integrated buttons: tweak gnome button logic
The pixel sizes are too tiny on my retina mac display, so I wanted
to make them larger. I noticed that the background color was transparent
which resulted in the appearance of a cross behind the button; that's
due to the way that the rounded corners are applied, so we need to
explicitly fill the background with the same color.

Refactor to make changing the size in the future a DRY operation,
but I left the size as-is because it needs more finesse and
I want to come back to that tomorrow.
2023-03-31 23:49:17 -07:00
Wez Furlong
2168709836
minor tidy up of hover handling for maximize button
Remove an unsafe global variable and replace with a member variable
that works similarly to the drag tracking.

Doing this from a mac... may not compile on a windows box!
2023-03-31 23:10:12 -07:00
Wez Furlong
ba34f9608e
rename PushOval -> Oval 2023-03-31 23:10:11 -07:00
Wez Furlong
0a4932cf29
tab bar: fixup placement of macos native titlebar buttons 2023-03-31 22:47:40 -07:00
Wez Furlong
a278dbf43f
remove redundant mix operation from shader
The o_fg_color_mix alpha should already be in range and we
shouldn't need to alter it here.
2023-03-31 21:56:01 -07:00
Wez Furlong
706db2650d
avoid bespoke lightness calc, reuse hsl function 2023-03-31 21:47:12 -07:00
Wez Furlong
422ae51577
allow using Gnome and Windows styles on macos.
Rename macos to MacOsNative to make its intended purpose clearer
2023-03-31 20:35:26 -07:00
Wez Furlong
5b5ae93052
remove some macos conditional compilation
Prefer to configure based on runtime config
2023-03-31 20:23:20 -07:00
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