Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yazi: add testbed, adapt to 0.4.x changes #719

Merged
merged 7 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 48 additions & 43 deletions modules/yazi/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,70 +23,75 @@
extension = ".tmTheme";
};

cwd = mkFg base0C;
cwd = mkFg cyan;
hovered = (mkBoth base05 base03) // {bold = true;};
preview_hovered = hovered;
find_keyword = (mkFg base0B) // {bold = true;};
find_keyword = (mkFg green) // {bold = true;};
find_position = mkFg base05;
marker_selected = mkSame base0B;
marker_copied = mkSame base0A;
marker_cut = mkSame base08;
tab_active = mkBoth base00 base0D;
marker_selected = mkSame yellow;
marker_copied = mkSame green;
marker_cut = mkSame red;
tab_active = mkBoth base00 blue;
tab_inactive = mkBoth base05 base01;
border_style = mkFg base04;
};

mode = {
normal_main = (mkBoth base00 blue) // {bold = true;};
normal_alt = mkBoth blue base00;
select_main = (mkBoth base00 green) // {bold = true;};
select_alt = mkBoth green base00;
unset_main = (mkBoth base00 brown) // {bold = true;};
unset_alt = mkBoth brown base00;
};

status = {
separator_style = mkSame base01;
mode_normal = (mkBoth base00 base0D) // {bold = true;};
mode_select = (mkBoth base00 base0B) // {bold = true;};
mode_unset = (mkBoth base00 base0F) // {bold = true;};
progress_label = mkBoth base05 base00;
progress_normal = mkBoth base05 base00;
progress_error = mkBoth base08 base00;
permissions_t = mkFg base0D;
permissions_r = mkFg base0A;
permissions_w = mkFg base08;
permissions_x = mkFg base0B;
permissions_s = mkFg base0C;
progress_error = mkBoth red base00;
perm_type = mkFg blue;
perm_read = mkFg yellow;
perm_write = mkFg red;
perm_exec = mkFg green;
perm_sep = mkFg cyan;
};

select = {
border = mkFg base0D;
active = mkFg base0E;
pick = {
border = mkFg blue;
active = mkFg magenta;
inactive = mkFg base05;
};

input = {
border = mkFg base0D;
border = mkFg blue;
title = mkFg base05;
value = mkFg base05;
selected = mkBg base03;
};

completion = {
border = mkFg base0D;
active = mkBoth base0E base03;
border = mkFg blue;
active = mkBoth magenta base03;
inactive = mkFg base05;
};

tasks = {
border = mkFg base0D;
border = mkFg blue;
title = mkFg base05;
hovered = mkBoth base05 base03;
};

which = {
mask = mkBg base02;
cand = mkFg base0C;
rest = mkFg base0F;
cand = mkFg cyan;
rest = mkFg brown;
desc = mkFg base05;
separator_style = mkFg base04;
};

help = {
on = mkFg base0E;
run = mkFg base0C;
on = mkFg magenta;
run = mkFg cyan;
desc = mkFg base05;
hovered = mkBoth base05 base03;
footer = mkFg base05;
Expand All @@ -96,25 +101,25 @@
filetype.rules = let
mkRule = mime: fg: {inherit mime fg;};
in [
(mkRule "image/*" base0C)
(mkRule "video/*" base0A)
(mkRule "audio/*" base0A)
(mkRule "image/*" cyan)
(mkRule "video/*" yellow)
(mkRule "audio/*" yellow)

(mkRule "application/zip" base0E)
(mkRule "application/gzip" base0E)
(mkRule "application/x-tar" base0E)
(mkRule "application/x-bzip" base0E)
(mkRule "application/x-bzip2" base0E)
(mkRule "application/x-7z-compressed" base0E)
(mkRule "application/x-rar" base0E)
(mkRule "application/xz" base0E)
(mkRule "application/zip" magenta)
(mkRule "application/gzip" magenta)
(mkRule "application/tar" magenta)
(mkRule "application/bzip" magenta)
(mkRule "application/bzip2" magenta)
(mkRule "application/7z-compressed" magenta)
(mkRule "application/rar" magenta)
(mkRule "application/xz" magenta)

(mkRule "application/doc" base0B)
(mkRule "application/pdf" base0B)
(mkRule "application/rtf" base0B)
(mkRule "application/vnd.*" base0B)
(mkRule "application/doc" green)
(mkRule "application/pdf" green)
(mkRule "application/rtf" green)
(mkRule "application/vnd.*" green)

((mkRule "inode/directory" base0D) // {bold = true;})
((mkRule "inode/directory" blue) // {bold = true;})
(mkRule "*" base05)
];
};
Expand Down
26 changes: 26 additions & 0 deletions modules/yazi/testbed.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ pkgs, ... }:

let
package = pkgs.yazi;
in

{
stylix.testbed.application = {
enable = true;
name = "yazi";
inherit package;
};

home-manager.sharedModules = [
{
programs.yazi = {
enable = true;
inherit package;
};

home.packages = [
pkgs.nerd-fonts.fira-mono
];
}
];
}
Loading