summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/builtins.zig b/src/builtins.zig
index 620c6b1c..6593be7d 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -176,6 +176,13 @@ pub const Colors = struct {
}
};
+/// One step along the ring. With 228 themes in it this is no longer a way to
+/// REACH a theme — ThemeSel is — but it is still the way to browse one, and the
+/// browse got better rather than worse: the generated half is sorted by name, so
+/// the neighbours of wherever you are are that theme's own variants (light,
+/// hard, soft, the whole gruvbox family in a row). Kept as the topbar word and
+/// SPC t n it has always been; a ring you can walk off the end of in three
+/// clicks was never what made it useful.
pub const NextColor = struct {
pub fn run(c: Ctx) void {
c.p.theme_idx = (c.p.theme_idx + 1) % pardes.themes.len;
@@ -188,9 +195,10 @@ pub const NextColor = struct {
/// (there is no theme called nothing), which is also why it has no leader path:
/// a key path names a builtin and can never carry the name of a theme.
///
-/// A LINEAR SCAN over a couple of dozen names, on a keystroke: the alternative
-/// is a comptime name->index map, which is a second copy of the ring to build
-/// for a lookup nobody will ever measure.
+/// A LINEAR SCAN over 228 names, on a keystroke: the alternative is a comptime
+/// name->index map, which is a second copy of the ring to build for a lookup
+/// nobody will ever measure. 228 short string compares is microseconds, and it
+/// happens once per theme change, not once per frame.
pub const Theme = struct {
pub fn run(c: Ctx) void {
const want = std.mem.trim(u8, c.arg orelse return, " \t\r\n");