nix/home/config/yazi/module/Theme.nix

107 lines
2.6 KiB
Nix
Raw Normal View History

{ pkgs, config, ... }:
let
2024-11-02 08:06:48 +03:00
color = config.style.color;
border = {
2024-11-02 19:21:53 +03:00
fg = "#${color.border}";
};
borderLight = {
2024-11-02 19:21:53 +03:00
fg = "#${color.accent}";
};
2024-11-02 06:38:37 +03:00
hover = {
2024-11-02 19:21:53 +03:00
bg = "#${color.bg.regular}";
fg = "#${color.fg.light}";
2024-11-02 06:38:37 +03:00
};
select = {
2024-11-02 19:21:53 +03:00
bg = "#${color.selection}";
fg = "#${color.fg.dark}";
2024-11-02 06:38:37 +03:00
};
text = {
2024-11-02 19:21:53 +03:00
fg = "#${color.fg.light}";
2024-11-02 06:38:37 +03:00
};
in
{
2024-11-02 08:06:48 +03:00
# REF: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/theme.toml
file = (pkgs.formats.toml { }).generate "YaziThemeConfig" {
2024-11-02 08:06:48 +03:00
manager =
let
2024-11-02 19:21:53 +03:00
mkMarker = markerColor: {
bg = "#${markerColor}";
fg = "#${markerColor}";
};
mkCounter = counterColor: {
bg = "#${counterColor}";
fg = "#${color.fg.light}";
2024-11-02 08:06:48 +03:00
};
in
{
border_style = border;
border_symbol = " ";
2024-11-02 19:21:53 +03:00
count_copied = mkCounter color.positive;
count_cut = mkCounter color.negative;
count_selected = mkCounter color.neutral;
2024-11-02 08:06:48 +03:00
cwd = text;
hovered = hover;
marker_copied = mkMarker color.accent;
marker_cut = mkMarker color.accent;
marker_marked = mkMarker color.hl;
marker_selected = mkMarker color.selection;
preview_hovered = hover;
2024-11-02 19:21:53 +03:00
tab_active = mkCounter color.selection;
2024-11-02 08:06:48 +03:00
};
select = {
border = borderLight;
};
input = {
border = borderLight;
};
completion = {
border = borderLight;
2024-11-02 06:38:37 +03:00
active = hover;
inactive = text;
};
tasks = {
border = borderLight;
};
2024-11-02 06:38:37 +03:00
which = {
cand = text;
cols = 3;
desc = text;
mask = hover;
rest = text;
2024-11-02 06:39:14 +03:00
separator = " - ";
2024-11-02 06:38:37 +03:00
separator_style = text;
};
2024-11-02 08:06:48 +03:00
confirm = {
border = borderLight;
title = borderLight;
};
status = {
2024-11-02 06:38:37 +03:00
mode_normal = hover;
mode_select = select;
permissions_r = text;
permissions_s = text;
permissions_t = text;
permissions_w = text;
permissions_x = text;
progress_label = hover;
progress_normal = hover;
separator_close = "";
2024-11-02 06:38:37 +03:00
separator_open = "";
# NOTE: Inversed because yazi dev is fckin weird. Also add manpages ffs.
separator_style = {
bg = "#${config.style.color.fg.light}";
fg = "#${config.style.color.bg.regular}";
};
mode_unset = {
fg = "#${config.style.color.fg.light}";
bg = "#${config.style.color.neutral}";
};
progress_error = {
fg = "#${config.style.color.fg.light}";
bg = "#${config.style.color.negative}";
};
};
};
2024-06-23 01:23:43 +03:00
}