refactor: removing needless module complexity
This commit is contained in:
47
modules/home/programs/yazi/default.nix
Normal file
47
modules/home/programs/yazi/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.home.programs.yazi;
|
||||
in {
|
||||
imports = [
|
||||
./theme
|
||||
];
|
||||
|
||||
options = {
|
||||
home.programs.yazi.enable = mkEnableOption "Enables yazi";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.yazi;
|
||||
|
||||
enableBashIntegration = config.programs.bash.enable;
|
||||
enableZshIntegration = config.programs.zsh.enable;
|
||||
|
||||
settings = {
|
||||
manager = {
|
||||
layout = [1 4 3];
|
||||
sort_by = "alphabetical";
|
||||
sort_sensitive = true;
|
||||
sort_reverse = false;
|
||||
sort_dir_first = true;
|
||||
linemode = "none";
|
||||
show_hidden = false;
|
||||
show_symlink = true;
|
||||
};
|
||||
|
||||
preview = {
|
||||
tab_size = 2;
|
||||
max_width = 600;
|
||||
max_height = 900;
|
||||
cache_dir = config.xdg.cacheHome;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
13
modules/home/programs/yazi/theme/default.nix
Normal file
13
modules/home/programs/yazi/theme/default.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
imports = [
|
||||
./filetype.nix
|
||||
./help.nix
|
||||
./icons.nix
|
||||
./input.nix
|
||||
./manager.nix
|
||||
./select.nix
|
||||
./status.nix
|
||||
./tasks.nix
|
||||
./which.nix
|
||||
];
|
||||
}
|
||||
59
modules/home/programs/yazi/theme/filetype.nix
Normal file
59
modules/home/programs/yazi/theme/filetype.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
programs.yazi.theme.filetype.rules = [
|
||||
# Images
|
||||
{
|
||||
mime = "image/*";
|
||||
fg = "#83a598";
|
||||
}
|
||||
|
||||
# Videos
|
||||
{
|
||||
mime = "video/*";
|
||||
fg = "#b8bb26";
|
||||
}
|
||||
{
|
||||
mime = "audio/*";
|
||||
fg = "#b8bb26";
|
||||
}
|
||||
|
||||
# Archives
|
||||
{
|
||||
mime = "application/zip";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/gzip";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-tar";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-bzip";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-bzip2";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-7z-compressed";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-rar";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
|
||||
# Fallback
|
||||
{
|
||||
name = "*";
|
||||
fg = "#a89984";
|
||||
}
|
||||
{
|
||||
name = "*/";
|
||||
fg = "#83a598";
|
||||
}
|
||||
];
|
||||
}
|
||||
15
modules/home/programs/yazi/theme/help.nix
Normal file
15
modules/home/programs/yazi/theme/help.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
programs.yazi.theme.help = {
|
||||
on = {fg = "#fe8019";};
|
||||
exec = {fg = "#83a598";};
|
||||
desc = {fg = "#928374";};
|
||||
hovered = {
|
||||
bg = "#504945";
|
||||
bold = true;
|
||||
};
|
||||
footer = {
|
||||
fg = "#3c3836";
|
||||
bg = "#a89984";
|
||||
};
|
||||
};
|
||||
}
|
||||
503
modules/home/programs/yazi/theme/icons.nix
Normal file
503
modules/home/programs/yazi/theme/icons.nix
Normal file
@@ -0,0 +1,503 @@
|
||||
{
|
||||
programs.yazi.theme.icon.rules = [
|
||||
# Home
|
||||
{
|
||||
name = ".config/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".ssh/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Desktop/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Development/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Documents/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Downloads/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Library/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Movies/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Music/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Pictures/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Videos/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Public/";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Git
|
||||
{
|
||||
name = ".git/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".gitignore";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".gitmodules";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".gitattributes";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Dotfiles
|
||||
{
|
||||
name = ".DS_Store";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".bashrc";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".bashprofile";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".zshrc";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".zshenv";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".zprofile";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".vimrc";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Text
|
||||
{
|
||||
name = "*.txt";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.md";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.rst";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "COPYING";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "LICENSE";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Archives
|
||||
{
|
||||
name = "*.zip";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.tar";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.gz";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.7z";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.bz2";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xz";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Documents
|
||||
{
|
||||
name = "*.csv";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.doc";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.doct";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.docx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.dot";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ods";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ots";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pdf";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pom";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pot";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ppm";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pps";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ppt";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.potx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ppmx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ppsx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pptx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlc";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlm";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xls";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlt";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlsm";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlsx";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Audio
|
||||
{
|
||||
name = "*.mp3";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.flac";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.wav";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.aac";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ogg";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.m4a";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.mp2";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Movies
|
||||
{
|
||||
name = "*.mp4";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.mkv";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.avi";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.mov";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.webm";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Images
|
||||
{
|
||||
name = "*.jpg";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.jpeg";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.png";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.gif";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.webp";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.avif";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.bmp";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ico";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.svg";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xcf";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.HEIC";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Programming
|
||||
{
|
||||
name = "*.c";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.cpp";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.h";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.hpp";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.rs";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.go";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.py";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.hs";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.js";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ts";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.tsx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.jsx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.rb";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.php";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.java";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.sh";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.fish";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.swift";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.vim";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.lua";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.html";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.css";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.sass";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.scss";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.json";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.toml";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.yml";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.yaml";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ini";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.conf";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.lock";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.nix";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Containerfile";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Dockerfile";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Misc
|
||||
{
|
||||
name = "*.bin";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.exe";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pkg";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Default
|
||||
{
|
||||
name = "*";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*/";
|
||||
text = "";
|
||||
}
|
||||
];
|
||||
}
|
||||
8
modules/home/programs/yazi/theme/input.nix
Normal file
8
modules/home/programs/yazi/theme/input.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
programs.yazi.theme.input = {
|
||||
border = {fg = "#bdae93";};
|
||||
title = {};
|
||||
value = {};
|
||||
selected = {reversed = true;};
|
||||
};
|
||||
}
|
||||
59
modules/home/programs/yazi/theme/manager.nix
Normal file
59
modules/home/programs/yazi/theme/manager.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
programs.yazi.theme.manager = {
|
||||
cwd = {fg = "#83a598";};
|
||||
# Hovered
|
||||
hovered = {
|
||||
fg = "#282828";
|
||||
bg = "#83a598";
|
||||
};
|
||||
|
||||
preview_hovered = {underline = true;};
|
||||
|
||||
# Find
|
||||
find_keyword = {
|
||||
fg = "#b8bb26";
|
||||
italic = true;
|
||||
};
|
||||
find_position = {
|
||||
fg = "#fe8019";
|
||||
bg = "reset";
|
||||
italic = true;
|
||||
};
|
||||
|
||||
# Marker
|
||||
marker_selected = {
|
||||
fg = "#b8bb26";
|
||||
bg = "#b8bb26";
|
||||
};
|
||||
marker_copied = {
|
||||
fg = "#b8bb26";
|
||||
bg = "#b8bb26";
|
||||
};
|
||||
marker_cut = {
|
||||
fg = "#fb4934";
|
||||
bg = "#fb4934";
|
||||
};
|
||||
|
||||
# Tab
|
||||
tab_active = {
|
||||
fg = "#282828";
|
||||
bg = "#504945";
|
||||
};
|
||||
tab_inactive = {
|
||||
fg = "#a89984";
|
||||
bg = "#3c3836";
|
||||
};
|
||||
tab_width = 1;
|
||||
|
||||
# Border;
|
||||
border_symbol = "│";
|
||||
border_style = {fg = "#665c54";};
|
||||
|
||||
# Offset;
|
||||
folder_offset = [1 0 1 0];
|
||||
preview_offset = [1 1 1 1];
|
||||
|
||||
# Highlighting;
|
||||
syntect_theme = "";
|
||||
};
|
||||
}
|
||||
7
modules/home/programs/yazi/theme/select.nix
Normal file
7
modules/home/programs/yazi/theme/select.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.yazi.theme.select = {
|
||||
border = {fg = "#504945";};
|
||||
active = {fg = "#fe8019";};
|
||||
inactive = {};
|
||||
};
|
||||
}
|
||||
48
modules/home/programs/yazi/theme/status.nix
Normal file
48
modules/home/programs/yazi/theme/status.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
programs.yazi.theme.status = {
|
||||
separator_open = "▒";
|
||||
separator_close = "▒";
|
||||
separator_style = {
|
||||
fg = "#3c3836";
|
||||
bg = "#3c3836";
|
||||
};
|
||||
|
||||
# Mode;
|
||||
mode_normal = {
|
||||
fg = "#282828";
|
||||
bg = "#A89984";
|
||||
bold = true;
|
||||
};
|
||||
mode_select = {
|
||||
fg = "#282828";
|
||||
bg = "#b8bb26";
|
||||
bold = true;
|
||||
};
|
||||
mode_unset = {
|
||||
fg = "#282828";
|
||||
bg = "#d3869b";
|
||||
bold = true;
|
||||
};
|
||||
|
||||
# Progress;
|
||||
progress_label = {
|
||||
fg = "#ebdbb2";
|
||||
bold = true;
|
||||
};
|
||||
progress_normal = {
|
||||
fg = "#504945";
|
||||
bg = "#3c3836";
|
||||
};
|
||||
progress_error = {
|
||||
fg = "#fb4934";
|
||||
bg = "#3c3836";
|
||||
};
|
||||
|
||||
# Permissions;
|
||||
permissions_t = {fg = "#504945";};
|
||||
permissions_r = {fg = "#b8bb26";};
|
||||
permissions_w = {fg = "#fb4934";};
|
||||
permissions_x = {fg = "#b8bb26";};
|
||||
permissions_s = {fg = "#665c54";};
|
||||
};
|
||||
}
|
||||
7
modules/home/programs/yazi/theme/tasks.nix
Normal file
7
modules/home/programs/yazi/theme/tasks.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.yazi.theme.tasks = {
|
||||
border = {fg = "#504945";};
|
||||
title = {};
|
||||
hovered = {underline = true;};
|
||||
};
|
||||
}
|
||||
10
modules/home/programs/yazi/theme/which.nix
Normal file
10
modules/home/programs/yazi/theme/which.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.yazi.theme.which = {
|
||||
mask = {bg = "#3c3836";};
|
||||
cand = {fg = "#83a598";};
|
||||
rest = {fg = "#928374";};
|
||||
desc = {fg = "#fe8019";};
|
||||
separator = " ";
|
||||
separator_style = {fg = "#504945";};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user