Skip to content

Commit

Permalink
Merge branch 'wez:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
psyclaudeZ authored Nov 11, 2024
2 parents 56b776f + 51c794a commit f0dcc73
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ task:
cpu: 4
memory: 12G
environment:
GITHUB_TOKEN: ENCRYPTED[23bd9513fa7174e74eaddce6a3099cabb22118423591553b23518e8c34bf155e07c559838b1d3422f561c73c1e31e6fc]
GITHUB_TOKEN: ENCRYPTED[f20f769b749757fbdc3968320deea1c8e90f2bc2ff5f957bae4de0f022793f57400a5936fe8699bd732a231c9ed74be7]
FURY_TOKEN: ENCRYPTED[833e7ce9bfd87970b321dd621677f792a65f485b40819cad30258d3a1e1569f9cb4878a2958efecdf40a5050354edd54]

stateful: false
Expand Down Expand Up @@ -82,7 +82,7 @@ task:
cpu: 4
memory: 12G
environment:
GITHUB_TOKEN: ENCRYPTED[23bd9513fa7174e74eaddce6a3099cabb22118423591553b23518e8c34bf155e07c559838b1d3422f561c73c1e31e6fc]
GITHUB_TOKEN: ENCRYPTED[f20f769b749757fbdc3968320deea1c8e90f2bc2ff5f957bae4de0f022793f57400a5936fe8699bd732a231c9ed74be7]
FURY_TOKEN: ENCRYPTED[833e7ce9bfd87970b321dd621677f792a65f485b40819cad30258d3a1e1569f9cb4878a2958efecdf40a5050354edd54]

stateful: false
Expand Down Expand Up @@ -119,7 +119,7 @@ task:
cpu: 4
memory: 12G
environment:
GITHUB_TOKEN: ENCRYPTED[23bd9513fa7174e74eaddce6a3099cabb22118423591553b23518e8c34bf155e07c559838b1d3422f561c73c1e31e6fc]
GITHUB_TOKEN: ENCRYPTED[f20f769b749757fbdc3968320deea1c8e90f2bc2ff5f957bae4de0f022793f57400a5936fe8699bd732a231c9ed74be7]

stateful: false
install_rust_script:
Expand Down
2 changes: 2 additions & 0 deletions assets/macos/WezTerm.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
<string>An application launched via WezTerm would like to access your Downloads folder.</string>
<key>NSSystemAdministrationUsageDescription</key>
<string>An application launched via WezTerm requires elevated permission.</string>
<key>NSLocalNetworkUsageDescription</key>
<string>An application launched via WezTerm would like to access the local network.</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
Expand Down
3 changes: 3 additions & 0 deletions ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ BuildRequires: Mesa-libEGL-devel
%else
BuildRequires: mesa-libEGL-devel
%endif
%if 0%{?fedora} >= 41
BuildRequires: openssl-devel-engine
%endif
Source0: wezterm-${TAR_NAME}.tar.gz
%global debug_package %{nil}
Expand Down
1 change: 1 addition & 0 deletions config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,7 @@ fn default_tiling_desktop_environments() -> Vec<String> {
"X11 bspwm",
"X11 dwm",
"X11 i3",
"X11 xmonad",
]
.iter()
.map(|s| s.to_string())
Expand Down
2 changes: 1 addition & 1 deletion docs/config/lua/keyassignment/InputSelector.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ upon the input.
is itself a table with a `label` field and an optional `id` field.
The label will be shown in the list, while the id can be a different
string that is meaningful to your action. The label can be used together
with [wezterm.format](../wezterm/format.md) to produce styled test.
with [wezterm.format](../wezterm/format.md) to produce styled text.
* `action` - and event callback registered via `wezterm.action_callback`. The
callback's function signature is `(window, pane, id, label)` where `window` and
`pane` are the [Window](../window/index.md) and [Pane](../pane/index.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/install/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ hide:
steps:

```console
$ curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg
$ echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list
$ curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /etc/apt/keyrings/wezterm-fury.gpg
$ echo 'deb [signed-by=/etc/apt/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list
```

Update your dependencies:
Expand Down
18 changes: 9 additions & 9 deletions nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 30 additions & 1 deletion nix/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
xorg.xcbutilwm # contains xcb-ewmh among others
]
++ lib.optionals stdenv.isDarwin (
(with pkgs.darwin.apple_sdk.frameworks; [
(with pkgs.darwin.apple_sdk_12_3.frameworks; [
Cocoa
CoreGraphics
Foundation
Expand Down Expand Up @@ -120,6 +120,13 @@
# tests are failing with: Unable to exchange encryption keys
rm -r wezterm-ssh/tests
# hash does not work well with NixOS
substituteInPlace assets/shell-integration/wezterm.sh \
--replace-fail 'hash wezterm 2>/dev/null' 'command type -P wezterm &>/dev/null' \
--replace-fail 'hash base64 2>/dev/null' 'command type -P base64 &>/dev/null' \
--replace-fail 'hash hostname 2>/dev/null' 'command type -P hostname &>/dev/null' \
--replace-fail 'hash hostnamectl 2>/dev/null' 'command type -P hostnamectl &>/dev/null'
'';

preFixup = lib.optionalString stdenv.isLinux ''
Expand Down Expand Up @@ -154,6 +161,28 @@
'';

passthru = {
# the headless variant is useful when deploying wezterm's mux server on remote severs
headless = rustPlatform.buildRustPackage {
pname = "wezterm-headless";
inherit version src postPatch cargoLock meta;

nativeBuildInputs = [ pkgs.pkg-config ];

buildInputs = [ pkgs.openssl ];

cargoBuildFlags = [
"--package" "wezterm"
"--package" "wezterm-mux-server"
];

doCheck = false;

postInstall = ''
install -Dm644 assets/shell-integration/wezterm.sh -t $out/etc/profile.d
install -Dm644 ${passthru.terminfo}/share/terminfo/w/wezterm -t $out/share/terminfo/w
'';
};

terminfo =
pkgs.runCommand "wezterm-terminfo"
{
Expand Down
21 changes: 17 additions & 4 deletions wezterm-font/src/hbwrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use cairo::Extend;
use memmap2::{Mmap, MmapOptions};
use std::ffi::CStr;
use std::io::Read;
use std::mem;
use std::ops::Range;
use std::os::raw::{c_char, c_int, c_uint, c_void};
use std::sync::Arc;
use std::{mem, slice};
use wezterm_color_types::SrgbaPixel;

extern "C" {
Expand Down Expand Up @@ -79,7 +79,7 @@ impl Blob {
unsafe {
let mut len = 0;
let ptr = hb_blob_get_data(self.blob, &mut len);
std::slice::from_raw_parts(ptr as *const u8, len as usize)
from_raw_parts(ptr as *const u8, len as usize)
}
}

Expand Down Expand Up @@ -1056,7 +1056,7 @@ impl Buffer {
unsafe {
let mut len: u32 = 0;
let info = hb_buffer_get_glyph_infos(self.buf, &mut len as *mut _);
slice::from_raw_parts(info, len as usize)
from_raw_parts(info, len as usize)
}
}

Expand All @@ -1066,7 +1066,7 @@ impl Buffer {
unsafe {
let mut len: u32 = 0;
let pos = hb_buffer_get_glyph_positions(self.buf, &mut len as *mut _);
slice::from_raw_parts(pos, len as usize)
from_raw_parts(pos, len as usize)
}
}

Expand Down Expand Up @@ -1180,3 +1180,16 @@ pub fn hb_tag_to_string(tag: hb_tag_t) -> TagString {
}
TagString(buf)
}

/// Wrapper around std::slice::from_raw_parts that allows for ptr to be
/// null. In the null ptr case, an empty slice is returned.
/// This is necessary because harfbuzz may sometimes encode
/// empty arrays in that way, and rust 1.78 will panic if a null
/// ptr is passed in.
pub(crate) unsafe fn from_raw_parts<'a, T>(ptr: *const T, size: usize) -> &'a [T] {
if ptr.is_null() {
&[]
} else {
std::slice::from_raw_parts(ptr, size)
}
}
4 changes: 2 additions & 2 deletions window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ k9 = "0.12.0"
gl_generator = "0.14"

[features]
wayland = ["wayland-client", "smithay-client-toolkit", "wayland-egl", "wayland-protocols"]
wayland = ["wayland-client", "smithay-client-toolkit", "wayland-egl", "wayland-protocols", "wayland-backend"]

[dependencies]
async-channel = "2.3"
Expand Down Expand Up @@ -82,7 +82,7 @@ zbus = "4.2"
zvariant = "4.0"

smithay-client-toolkit = {version = "0.19", default-features=false, optional=true}
wayland-backend = {version="0.3.5", features=["client_system", "rwh_06"]}
wayland-backend = {version="0.3.5", features=["client_system", "rwh_06"], optional=true}
wayland-protocols = {version="0.32", optional=true}
wayland-client = {version="0.31", optional=true}
wayland-egl = {version="0.32", optional=true}
Expand Down

0 comments on commit f0dcc73

Please sign in to comment.