testing yazi

This commit is contained in:
cnst
2024-07-24 10:59:28 +02:00
parent c2bfaa8fc9
commit c779c2a580
8 changed files with 3346 additions and 29 deletions

54
flake.lock generated
View File

@@ -89,11 +89,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721610313, "lastModified": 1721783041,
"narHash": "sha256-3jjIid+qx8DQ+D0SrFT04HcK3pdTP/4WjgmseJaQ28g=", "narHash": "sha256-1QFh73X8yHqwA8hEmryXCajk3HU3NR+Q5bSf6HrSAw8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flake-firefox-nightly", "repo": "flake-firefox-nightly",
"rev": "2a9c22db6da4b14ab059a31f5c5cedc591166b4e", "rev": "d6c0b8797082dafa5d0635f2bac55bdca9d10757",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -280,11 +280,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720524665, "lastModified": 1721042469,
"narHash": "sha256-ni/87oHPZm6Gv0ECYxr1f6uxB0UKBWJ6HvS7lwLU6oY=", "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "8d6a17d0cdf411c55f12602624df6368ad86fac1", "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -339,11 +339,11 @@
}, },
"hardware": { "hardware": {
"locked": { "locked": {
"lastModified": 1721413321, "lastModified": 1721754224,
"narHash": "sha256-0GdiQScDceUrVGbxYpV819LHesK3szHOhJ09e6sgES4=", "narHash": "sha256-JEVfxzZRo+/zdWKBjHpAUG905SDZL9fmoLJxf9b5CGU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "ab165a8a6cd12781d76fe9cbccb9e975d0fb634f", "rev": "405b654893aba16c8014de6a17e84439d3fb8e46",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -359,11 +359,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721534365, "lastModified": 1721804110,
"narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=", "narHash": "sha256-i4jINRazBKPqlaS+qhlP+kV/UHEq3vs5itfpblqu4ZM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "635563f245309ef5320f80c7ebcb89b2398d2949", "rev": "af70fc502a15d7e1e4c5a4c4fc8e06c2ec561e0c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -380,11 +380,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720734513, "lastModified": 1721534365,
"narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=", "narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "90ae324e2c56af10f20549ab72014804a3064c7f", "rev": "635563f245309ef5320f80c7ebcb89b2398d2949",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -461,11 +461,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720845312, "lastModified": 1721655289,
"narHash": "sha256-yPhAsJTpyoIPQZJGC8Fw8W2lAXyhLoTn+HP20bmfkfk=", "narHash": "sha256-eJQQwXOKWjom9gtb7HvHd3+Wj5Sp+WrYR44r0EnaO5w=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "5ce8503cf402cf76b203eba4b7e402bea8e44abc", "rev": "2ae24bcafdb88fdf70b061cc8b18d070dbd9013a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -555,11 +555,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1721379653, "lastModified": 1721562059,
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=", "narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374", "rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -583,11 +583,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1721592379, "lastModified": 1721772245,
"narHash": "sha256-pJzkjy4+sM9+5IfrZMTWAiB0m/m4eiV4fmnqxtVNonI=", "narHash": "sha256-//9p3Qm8gLbPUTsSGN2EMYkDwE5Sqq9B9P2X/z2+npw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "d2f733efb4962903b77af330c4c03a63f2f72968", "rev": "ab67ee7e8b33e788fc53d26dc6f423f9358e3e66",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -745,11 +745,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720818892, "lastModified": 1721458737,
"narHash": "sha256-f52x9srIcqQm1Df3T+xYR5P6VfdnDFa2vkkcLhlTp6U=", "narHash": "sha256-wNXLQ/ATs1S4Opg1PmuNoJ+Wamqj93rgZYV3Di7kxkg=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "5b002f8a53ed04c1a4177e7b00809d57bd2c696f", "rev": "888bfb10a9b091d9ed2f5f8064de8d488f7b7c97",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -40,6 +40,7 @@
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
#}; #};
ags.url = "github:Aylur/ags"; ags.url = "github:Aylur/ags";
yazi.url = "github:sxyazi/yazi";
}; };
outputs = { outputs = {
self, self,

View File

@@ -1,8 +1,10 @@
{pkgs, ...}: { {pkgs, ...}: {
home.pointerCursor = { home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
name = "Adwaita"; name = "Adwaita";
package = pkgs.adwaita-icon-theme; package = pkgs.adwaita-icon-theme;
size = 24; size = 28;
}; };
gtk = { gtk = {
enable = true; enable = true;
@@ -21,7 +23,7 @@
cursorTheme = { cursorTheme = {
name = "Adwaita"; name = "Adwaita";
package = pkgs.adwaita-icon-theme; package = pkgs.adwaita-icon-theme;
size = 24; size = 28;
}; };
}; };
} }

View File

@@ -0,0 +1,46 @@
{
config,
pkgs,
inputs,
...
}: {
imports = [
./theme/filetype.nix
./theme/icons.nix
./theme/manager.nix
./theme/status.nix
];
# general file info
home.packages = [pkgs.exiftool];
# yazi file manager
programs.yazi = {
enable = true;
package = inputs.yazi.packages.${pkgs.system}.default;
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;
};
};
};
}

File diff suppressed because it is too large Load Diff

View 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 = "󰉋";
}
];
}

View File

@@ -0,0 +1,63 @@
{
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,45 @@
{
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";};
};
}