summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-21 22:37:36 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit297e14cfc36e4613a8c1cb3b995597d0a9c2873b (patch)
treead2ff7bd7a5869b2e45fe6098825a8ac35598703 /build.zig
parent9070942b29bd10dddcdecdb0e88ba0fb40608467 (diff)
parent44ce573e15c773cf5bb0d42941a143b63e44d900 (diff)
downloadpardes-297e14cfc36e4613a8c1cb3b995597d0a9c2873b.tar.gz
pardes-297e14cfc36e4613a8c1cb3b995597d0a9c2873b.zip
Merge the macOS first-class-host work
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 a9bf4c0f..562ed89f 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".