Yazi: update to HM 23.11
This commit is contained in:
parent
ec04c5bb96
commit
4aafcada3c
1 changed files with 47 additions and 61 deletions
|
|
@ -1,21 +1,15 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
let
|
home = {
|
||||||
tomlGenerate = (pkgs.formats.toml { }).generate;
|
packages = [ pkgs.ffmpegthumbnailer pkgs.exiftool pkgs.mediainfo ];
|
||||||
bashIntegration = ''
|
shellAliases.y = "yazi";
|
||||||
function ya() {
|
};
|
||||||
tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
|
||||||
yazi --cwd-file="$tmp"
|
|
||||||
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
|
||||||
cd -- "$cwd"
|
|
||||||
fi
|
|
||||||
rm -f -- "$tmp"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.unstable_pkgs.yazi pkgs.ffmpegthumbnailer pkgs.exiftool pkgs.mediainfo ];
|
|
||||||
|
|
||||||
xdg.configFile."yazi/yazi.toml".source = tomlGenerate "yazi.toml" {
|
programs.yazi = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
package = pkgs.unstable_pkgs.yazi;
|
||||||
|
settings = {
|
||||||
manager = {
|
manager = {
|
||||||
sort_by = "natural";
|
sort_by = "natural";
|
||||||
sort_dir_first = true;
|
sort_dir_first = true;
|
||||||
|
|
@ -53,13 +47,5 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
# programs.yazi = {
|
|
||||||
# enable = true;
|
|
||||||
# enableBashIntegration = true;
|
|
||||||
# enableZshIntegration = true;
|
|
||||||
# };
|
|
||||||
programs.bash.initExtra = bashIntegration;
|
|
||||||
programs.zsh.initExtra = bashIntegration;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue