mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 02:25:12 -05:00
feat: simplified themes module
This commit is contained in:
parent
b0fdd1d958
commit
a5ec879db0
119 changed files with 2045 additions and 4624 deletions
|
@ -2,23 +2,21 @@
|
|||
flake,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(flake.config.aesthetics.themes.schemes.catppuccin-macchiato)
|
||||
colours
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.aesthetics.themes)
|
||||
currentTheme
|
||||
palettes
|
||||
;
|
||||
makeColor = c:
|
||||
"#"
|
||||
+ c;
|
||||
makeStyle = bg: fg:
|
||||
"bg:"
|
||||
+ bg
|
||||
+ " fg:"
|
||||
+ fg
|
||||
+ " bold";
|
||||
surround = fg: text:
|
||||
|
||||
el = palettes.${currentTheme}.colours;
|
||||
|
||||
makeColor = c: "#" + c;
|
||||
makeStyle = bg: fg: "bg:" + bg + " fg:" + fg + " bold";
|
||||
surround =
|
||||
fg: text:
|
||||
"[](fg:"
|
||||
+ makeColor colours.base
|
||||
+ makeColor el.base00
|
||||
+ " bg:"
|
||||
+ fg
|
||||
+ ")"
|
||||
|
@ -29,52 +27,52 @@
|
|||
+ "[█](fg:"
|
||||
+ fg
|
||||
+ ")";
|
||||
in {
|
||||
in
|
||||
{
|
||||
add_newline = false;
|
||||
character = let
|
||||
makeChar = bg: c:
|
||||
surround (makeColor bg) ("["
|
||||
+ c
|
||||
+ "]("
|
||||
+ makeStyle (makeColor bg) (makeColor colours.crust)
|
||||
+ ")");
|
||||
in {
|
||||
error_symbol = makeChar colours.maroon "⊥";
|
||||
format = "$symbol";
|
||||
success_symbol = makeChar colours.teal "λ";
|
||||
};
|
||||
character =
|
||||
let
|
||||
makeChar =
|
||||
bg: c:
|
||||
surround (makeColor bg) ("[" + c + "](" + makeStyle (makeColor bg) (makeColor el.base11) + ")");
|
||||
in
|
||||
{
|
||||
error_symbol = makeChar el.base12 "⊥";
|
||||
format = "$symbol";
|
||||
success_symbol = makeChar el.base0C "λ";
|
||||
};
|
||||
cmd_duration = {
|
||||
format = surround (makeColor colours.mauve) "[ $duration]($style)";
|
||||
format = surround (makeColor el.base0E) "[ $duration]($style)";
|
||||
min_time = 0;
|
||||
show_milliseconds = true;
|
||||
style = makeStyle (makeColor colours.mauve) (makeColor colours.crust);
|
||||
style = makeStyle (makeColor el.base0E) (makeColor el.base11);
|
||||
};
|
||||
directory = {
|
||||
format = surround (makeColor colours.blue) "[ $path]($style)[$read_only]($read_only_style)";
|
||||
format = surround (makeColor el.base0D) "[ $path]($style)[$read_only]($read_only_style)";
|
||||
read_only = " ";
|
||||
read_only_style = makeStyle (makeColor colours.blue) (makeColor colours.crust);
|
||||
style = makeStyle (makeColor colours.blue) (makeColor colours.crust);
|
||||
read_only_style = makeStyle (makeColor el.base0D) (makeColor el.base11);
|
||||
style = makeStyle (makeColor el.base0D) (makeColor el.base11);
|
||||
truncation_length = 1;
|
||||
truncate_to_repo = false;
|
||||
};
|
||||
git_branch = {
|
||||
format = surround (makeColor colours.peach) "[$symbol $branch]($style)";
|
||||
style = makeStyle (makeColor colours.peach) (makeColor colours.crust);
|
||||
format = surround (makeColor el.base09) "[$symbol $branch]($style)";
|
||||
style = makeStyle (makeColor el.base09) (makeColor el.base11);
|
||||
symbol = "";
|
||||
};
|
||||
git_status = {
|
||||
format = "[ \\[$all_status$ahead_behind\\]]($style)";
|
||||
style = makeStyle (makeColor colours.yellow) (makeColor colours.crust);
|
||||
style = makeStyle (makeColor el.base0A) (makeColor el.base11);
|
||||
};
|
||||
hostname = {
|
||||
format = surround (makeColor colours.sapphire) "[$ssh_symbol$hostname]($style)";
|
||||
format = surround (makeColor el.base16) "[$ssh_symbol$hostname]($style)";
|
||||
ssh_symbol = " ";
|
||||
style = makeStyle (makeColor colours.sapphire) (makeColor colours.crust);
|
||||
style = makeStyle (makeColor el.base16) (makeColor el.base11);
|
||||
};
|
||||
pijul_channel = {
|
||||
disabled = false;
|
||||
format = surround (makeColor colours.peach) "[$symbol $channel]($style)";
|
||||
style = makeStyle (makeColor colours.peach) (makeColor colours.crust);
|
||||
format = surround (makeColor el.base09) "[$symbol $channel]($style)";
|
||||
style = makeStyle (makeColor el.base09) (makeColor el.base11);
|
||||
symbol = "";
|
||||
};
|
||||
format = lib.concatStrings [
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
flake,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
configPath = ./config;
|
||||
settingsPath = import (configPath + /settings.nix) {
|
||||
inherit
|
||||
|
@ -10,7 +11,8 @@
|
|||
lib
|
||||
;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = settingsPath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue