From 2efe270e71a0da705a66b639efdae4627c13c5b4 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Mon, 4 Nov 2024 20:55:17 -0800 Subject: [PATCH] feat(lib): Add snake case helper fn --- modules/lib/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/lib/default.nix b/modules/lib/default.nix index 2d69174..67a80c9 100644 --- a/modules/lib/default.nix +++ b/modules/lib/default.nix @@ -55,6 +55,11 @@ in # a convenience to deal with the main flavor naming getKebabTheme = flavor: if (flavor == "main") then "rose-pine" else "rose-pine-${flavor}"; + # string -> string + # convert flavor to full theme name in snake case + # a convenience to deal with the main flavor naming + getSnakeTheme = flavor: if (flavor == "main") then "rose_pine" else "rose_pine_${flavor}"; + # string -> string # this capitalizes the first letter in a string, # which is sometimes needed in order to format