Add yazi (terminal filemgr)

This commit is contained in:
ItsDrike 2024-04-05 01:17:53 +02:00
parent 8d337e6a47
commit aee32f4113
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
5 changed files with 304 additions and 0 deletions

View file

@ -0,0 +1,6 @@
_: {
imports = [
./yazi
];
}

View file

@ -0,0 +1,41 @@
{
config,
pkgs,
...
}: {
imports = [
./theme/icons.nix
./theme/manager.nix
./theme/status.nix
];
home.packages = [pkgs.exiftool];
programs.yazi = {
enable = true;
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}/yazi";
};
};
};
}

View file

@ -0,0 +1,147 @@
{
programs.yazi.theme.icons = {
# Default
"*" = "";
"*/" = "󰉋";
# Home
".config/" = "";
".ssh/" = "󰢬";
"Desktop/" = "";
"Development/" = "";
"Documents/" = "";
"Downloads/" = "󰉍";
"Library/" = "";
"Movies/" = "";
"Music/" = "󱍙";
"Pictures/" = "󰉏";
"Videos/" = "";
"Public/" = "";
# Git
".git/" = "";
".gitignore" = "";
".gitmodules" = "";
".gitattributes" = "";
# Dotfiles
".DS_Store" = "";
".bashrc" = "";
".bashprofile" = "";
".zshrc" = "";
".zshenv" = "";
".zprofile" = "";
".vimrc" = "";
# Text
"*.txt" = "";
"*.md" = "";
"*.rst" = "";
COPYING = "󰿃";
LICENSE = "󰿃";
# Archives
"*.zip" = "";
"*.tar" = "";
"*.gz" = "";
"*.7z" = "";
"*.bz2" = "";
"*.xz" = "";
# Documents
"*.csv" = "";
"*.doc" = "";
"*.doct" = "";
"*.docx" = "";
"*.dot" = "";
"*.ods" = "";
"*.ots" = "";
"*.pdf" = "";
"*.pom" = "";
"*.pot" = "";
"*.ppm" = "";
"*.pps" = "";
"*.ppt" = "";
"*.potx" = "";
"*.ppmx" = "";
"*.ppsx" = "";
"*.pptx" = "";
"*.xlc" = "";
"*.xlm" = "";
"*.xls" = "";
"*.xlt" = "";
"*.xlsm" = "";
"*.xlsx" = "";
# Audio
"*.mp3" = "";
"*.flac" = "";
"*.wav" = "";
"*.aac" = "";
"*.ogg" = "";
"*.m4a" = "";
"*.mp2" = "";
# Movies
"*.mp4" = "";
"*.mkv" = "";
"*.avi" = "";
"*.mov" = "";
"*.webm" = "";
# Images
"*.jpg" = "";
"*.jpeg" = "";
"*.png" = "";
"*.gif" = "";
"*.webp" = "";
"*.avif" = "";
"*.bmp" = "";
"*.ico" = "";
"*.svg" = "";
"*.xcf" = "";
"*.HEIC" = "";
# Programming
"*.c" = "";
"*.cpp" = "";
"*.h" = "";
"*.hpp" = "";
"*.rs" = "";
"*.go" = "";
"*.py" = "";
"*.hs" = "";
"*.js" = "";
"*.ts" = "";
"*.tsx" = "";
"*.jsx" = "";
"*.rb" = "";
"*.php" = "";
"*.java" = "";
"*.sh" = "";
"*.fish" = "";
"*.swift" = "";
"*.vim" = "";
"*.lua" = "";
"*.html" = "";
"*.css" = "";
"*.sass" = "";
"*.scss" = "";
"*.json" = "";
"*.toml" = "";
"*.yml" = "";
"*.yaml" = "";
"*.ini" = "";
"*.conf" = "";
"*.lock" = "";
"*.nix" = "";
Containerfile = "󰡨";
Dockerfile = "󰡨";
# Misc
"*.bin" = "";
"*.exe" = "";
"*.pkg" = "";
};
}

View file

@ -0,0 +1,64 @@
{
programs.yazi.theme.manager = {
cwd = {fg = "cyan";};
# Hovered
hovered = {
fg = "black";
bg = "lightblue";
};
preview_hovered = {
fg = "black";
bg = "lightblue";
};
# Find
find_keyword = {
fg = "yellow";
italic = true;
};
find_position = {
fg = "magenta";
bg = "reset";
italic = true;
};
# Marker
marker_selected = {
fg = "lightgreen";
# bg = "lightgreen";
};
marker_copied = {
fg = "lightyellow";
# bg = "lightyellow";
};
marker_cut = {
fg = "lightred";
# bg = "lightred";
};
# Tab
tab_active = {
fg = "black";
bg = "lightblue";
};
tab_inactive = {
fg = "white";
bg = "darkgray";
};
tab_width = 1;
# Border;
border_symbol = "";
border_style = {fg = "gray";};
# Offset;
folder_offset = [1 0 1 0];
preview_offset = [1 1 1 1];
# Highlighting;
syntect_theme = "";
};
}

View file

@ -0,0 +1,46 @@
{
programs.yazi.theme.status = {
separator_open = "";
separator_close = "";
separator_style = {
fg = "darkgray";
bg = "darkgray";
};
# Mode;
mode_normal = {
fg = "black";
bg = "lightblue";
bold = true;
};
mode_select = {
fg = "black";
bg = "lightgreen";
bold = true;
};
mode_unset = {
fg = "black";
bg = "lightmagenta";
bold = true;
};
# Progress;
progress_label = {bold = true;};
progress_normal = {
fg = "blue";
bg = "black";
};
progress_error = {
fg = "red";
bg = "black";
};
# Permissions;
permissions_t = {fg = "blue";};
permissions_r = {fg = "lightyellow";};
permissions_w = {fg = "lightred";};
permissions_x = {fg = "lightgreen";};
permissions_s = {fg = "darkgray";};
};
}