summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-11 15:58:58 -0300
committerGabriel Schneider <[email protected]>2026-08-11 16:26:20 -0300
commit4ca28745d774c232cd31a29c17878f19bbe24cf5 (patch)
treeface852acae5bc347e6bab2bb5cede501e0ce1d3 /src/main.zig
parentdedfdea43f0d6c7151c541284c81027969d89032 (diff)
parent89d93d5e7348304bc7d8a148f9ad9c1beb200459 (diff)
downloadpardes-4ca28745d774c232cd31a29c17878f19bbe24cf5.tar.gz
pardes-4ca28745d774c232cd31a29c17878f19bbe24cf5.zip
merge the macOS app branch: the AppKit shell, pixel attachments, live theming, and mupdf -Djpx
Three commits off 38e9919 (macos-app@upstream) merged into main's ghostty bump. No textual conflicts, and two things the merge needed: - nested.zig asked libc for fstatat. Darwin has it; on linux std.c declares it `void` (glibc hides it behind a versioned symbol std cannot name), so the tty build stopped at 'type void not a function'. statNoFollow keeps fstatat on darwin and asks statx on linux for the same three fields, which is what this file did before the branch generalized it to both platforms. - .DS_Store rode along with a797a1a. Deleted, and .gitignore now says so. linux: snap 86/86, unit-test, image-harness and mupdf-check green. nested.zig also type-checks for aarch64-macos.
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.zig b/src/main.zig
index 607b0136..4a067406 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -203,7 +203,9 @@ fn nativeMain(init: std.process.Init) !void {
// Native shells opt into the user config; the sans-IO core and web keep
// Options' null default. Read it before entering either frontend so every
// builtin has run before that frontend can render its first frame.
- opts.startup_config = @import("user_config.zig").load(init.io, arena, init.environ_map);
+ const found = @import("user_config.zig").load(init.io, arena, init.environ_map);
+ opts.startup_config = found.bytes;
+ opts.startup_config_path = found.path;
switch (pardes.platform) {
.tty => try @import("tty/tty.zig").run(init, opts),
.gui => try @import("gui/gui.zig").run(init, opts),
@@ -233,13 +235,11 @@ fn parseCtrlKey(raw: []const u8) ?u21 {
// so their inline tests need naming here to exist at all. gui.zig only
// compiles when it IS the shell (it @cImports SDL), hence the comptime gate;
// under -Dplatform=tty this block analyses to nothing. Naming a file gets THAT
-// file's tests and no further: fonts.zig is imported by both gui.zig and
-// builtins.zig and still needs its own line here.
+// file's tests and no further: fonts.zig is imported by gui.zig, builtins.zig
+// and the macOS host, and still needs its own line here.
test {
_ = @import("user_config.zig");
_ = @import("allocators.zig");
- if (comptime pardes.platform == .gui) {
- _ = @import("gui/gui.zig");
- _ = @import("gui/fonts.zig");
- }
+ if (comptime pardes.platform == .gui) _ = @import("gui/gui.zig");
+ if (comptime pardes.font_picker) _ = @import("fonts.zig");
}