Yazi: update to HM 23.11

This commit is contained in:
Filippo Berto 2023-12-12 00:02:21 +01:00
parent ec04c5bb96
commit 4aafcada3c
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED

View file

@ -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;
} }