summaryrefslogtreecommitdiff
path: root/src/tagline.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/tagline.zig')
-rw-r--r--src/tagline.zig13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tagline.zig b/src/tagline.zig
index a7438be3..fa5246c4 100644
--- a/src/tagline.zig
+++ b/src/tagline.zig
@@ -52,8 +52,17 @@ pub const column_tag_default = "New Term Find Grep Joincol Delcol";
/// fixed builtins, plus `Restore <path>` once a dump exists.
pub fn headerDefault(p: *Pardes, what: Text.What) []const u8 {
if (what == .column) return column_tag_default;
- const d = p.last_dump orelse return config.topbar_str;
- return std.fmt.allocPrint(p.scratch.allocator(), config.topbar_str ++ " Restore {s}", .{d}) catch config.topbar_str;
+ const row = topbarDefault(p);
+ const d = p.last_dump orelse return row;
+ return std.fmt.allocPrint(p.scratch.allocator(), "{s} Restore {s}", .{ row, d }) catch row;
+}
+
+/// The workspace row's words for this view: the window's row, with Fonts,
+/// in a window's view alone; a terminal's view (a terminal's build, or a
+/// terminal's replica of a window's session) has the row without it.
+fn topbarDefault(p: *Pardes) []const u8 {
+ if (comptime @import("builtins.zig").capabilities.font_picker) if (@import("builtins.zig").registry.here(p, .Fonts)) return config.topbar_window_str;
+ return config.topbar_terminal_str;
}
/// the topbar line -- render and click dispatch must agree on this exact