Add ability to set boot layout.
This commit is contained in:
@@ -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{
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user