summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-21 14:55:53 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit44ce573e15c773cf5bb0d42941a143b63e44d900 (patch)
treec2c6ecd5b298a85044cb1b68e1db8f7b6657ead7 /build.zig
parentfd50bd971d6dea7eaaa4ee5436ba16b95fa25b30 (diff)
downloadpardes-44ce573e15c773cf5bb0d42941a143b63e44d900.tar.gz
pardes-44ce573e15c773cf5bb0d42941a143b63e44d900.zip
Make the macOS shell a first-class host
Pty children are exec'd with their own TERM/COLORTERM/TERM_PROGRAM instead of inheriting a .app launch's empty environment, and ttyTaken finally answers on darwin — libproc walks the tty's foreground process group — so Escape reaches the child and Exec stops believing every pane sits at its prompt. The occupancy suite runs on both platforms now. The workspace tag row moves into the native menu bar as a Builtins menu. -Dworkspace-tag (default off for -Dplatform=macos, on everywhere else) drives it, and Pardes.topBarHeight replaces the TOPBAR_H constant so the core stops reserving the row. The view pins every variable-font axis to the file's own default (Maple Mono came up Thin otherwise), shapes ligatures, carries per-shape pointer cursors, and draws the look-hover affordance as refracted glass. Tag rows fill edge to edge, with the anchor box painted back on top of that fill and its mode glyph centred on the same square. Theme accents re-saturated across the set. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 6734d9b0..0cd7f312 100644
--- a/build.zig
+++ b/build.zig
@@ -301,6 +301,9 @@ pub fn build(b: *std.Build) void {
const esp32p4_cols = b.option(u16, "esp32p4-cols", "the board's grid width in cells (-Dplatform=esp32p4 only)") orelse 56;
const esp32p4_rows = b.option(u16, "esp32p4-rows", "the board's grid height in cells (-Dplatform=esp32p4 only)") orelse 14;
const theme_animation = b.option(bool, "theme-animation", "animate chrome colors across a theme change (default: off for esp32p4)");
+ // The macOS shell carries the workspace tag row's commands in its native
+ // menu bar; the row itself goes away. `-Dworkspace-tag=true` puts it back.
+ const workspace_tag = b.option(bool, "workspace-tag", "draw the workspace tag row (default: on except on macOS, whose menu bar carries its commands)");
const shell_cfg: ShellConfig = .{
.tree_sitter_grammars = tree_sitter_grammars,
.tracy = tracy != null,
@@ -309,6 +312,7 @@ pub fn build(b: *std.Build) void {
.esp32p4_cols = esp32p4_cols,
.esp32p4_rows = esp32p4_rows,
.theme_animation = theme_animation,
+ .workspace_tag = workspace_tag,
.prebuilt_shaders = prebuilt_shaders,
.embed_sources = embed_sources,
.zig_lib_dir = b.graph.zig_lib_directory.path orelse "",
@@ -1434,6 +1438,9 @@ const ShellConfig = struct {
/// null = "the platform's own default", resolved per shell below, because
/// the default is off for the board and on everywhere else.
theme_animation: ?bool,
+ /// null = "the platform's own default": the macOS shell hands the row to
+ /// its native menu bar, every other shell keeps the acme topbar.
+ workspace_tag: ?bool,
prebuilt_shaders: bool,
embed_sources: bool,
zig_lib_dir: []const u8,
@@ -1452,6 +1459,7 @@ fn shellOptions(b: *std.Build, cfg: ShellConfig, platform: Platform) *std.Build.
o.addOption(bool, "mupdf", cfg.mupdf);
o.addOption(u16, "esp32p4_cols", cfg.esp32p4_cols);
o.addOption(u16, "esp32p4_rows", cfg.esp32p4_rows);
+ o.addOption(bool, "workspace_tag", cfg.workspace_tag orelse (platform != .macos));
o.addOption(bool, "theme_animation", cfg.theme_animation orelse (platform != .esp32p4));
// Meaningful only for the SDL shell. Keeping the platform condition here
// prevents Config/EffectCode from describing tty/macOS/web as "prebuilt".