wastema time

This commit is contained in:
Kopatz
2023-12-08 22:17:49 +01:00
parent b8c4096236
commit 0aa0c04c6e

View File

@@ -51,6 +51,19 @@ in
enableZshIntegration = true; enableZshIntegration = true;
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
programs.lf = {
enable = true;
previewer.source = pkgs.writeShellScript "pv.sh" ''
#!/bin/sh
case "$(${pkgs.file}/bin/file -Lb --mime-type -- "$1")" in
#image/*|video/*) ${pkgs.chafa}/bin/chafa -f sixel -s "$2x$3" --animate false $1;;
application/x-tar) tar tf "$1";;
application/vnd.rar) ${pkgs.p7zip}/bin/7z l "$1";;
application/x-7z-compressed) ${pkgs.p7zip}/bin/7z l "$1";;
*) ${pkgs.ctpv}/bin/ctpv "$1";;
esac
'';
};
home.stateVersion = "23.05"; home.stateVersion = "23.05";
}; };
}; };