Add ability to set boot layout.

This commit is contained in:
Greyson Parrelli
2026-08-13 10:52:58 -04:00
parent 6c7c3bfa63
commit 4e622b15af
9 changed files with 1330 additions and 90 deletions
+15
View File
@@ -344,6 +344,21 @@ pub fn matches(emoji: Emoji, query: []const u8) bool {
return true;
}
/// The table's own copy of `glyph`, or null if it isn't one of ours.
///
/// What comes back is static, so a caller can hold it for as long as it likes
/// with nothing to free — which is what lets a glyph read out of a config file
/// be handed to something that wants a pointer it can keep. A glyph the table
/// doesn't have reads as no choice at all: the picker is where these come from,
/// so anything else is a hand-edited file naming something this build can't
/// draw at the size the row wants.
pub fn lookup(glyph: []const u8) ?[:0]const u8 {
for (table) |entry| {
if (std.mem.eql(u8, entry.glyph, glyph)) return entry.glyph;
}
return null;
}
/// Every emoji the picker offers, in Unicode's order.
pub const table = [_]Emoji{
'''