49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{pkgs, ...}: let
|
|
readScript = path: '' ''${{
|
|
${builtins.readFile path}
|
|
}}'';
|
|
in {
|
|
home.packages = with pkgs; [
|
|
# previewer
|
|
chafa
|
|
exiftool
|
|
bat
|
|
|
|
ffmpegthumbnailer
|
|
trash-cli
|
|
imagemagick
|
|
gnumeric
|
|
poppler_utils
|
|
odt2txt
|
|
python311Packages.docx2txt
|
|
catdoc
|
|
libcdio
|
|
p7zip
|
|
file
|
|
gnome-epub-thumbnailer
|
|
];
|
|
|
|
programs.lf.enable = true;
|
|
programs.lf.keybindings = {
|
|
D = "trash";
|
|
R = "drag";
|
|
"<f-2>" = ":rename";
|
|
"<enter>" = "open-with";
|
|
};
|
|
programs.lf.extraConfig = ''
|
|
set sixel true
|
|
'';
|
|
programs.lf.commands = {
|
|
drag = "%${pkgs.ripdrag}/bin/ripdrag -x \"$fx\"";
|
|
trash = "%trash-put \"$fx\"";
|
|
open = "$set -f; ${pkgs.ranger}/bin/rifle -p 0 \"$fx\"";
|
|
open-with = '' ''${{
|
|
set -f
|
|
${pkgs.ranger}/bin/rifle -l "$fx"
|
|
read -p "Open with: " method
|
|
${pkgs.ranger}/bin/rifle -p "$method" "$fx"
|
|
}}'';
|
|
bulk-rename = readScript ./bulk-rename.sh;
|
|
};
|
|
programs.lf.previewer.source = ./preview.sh;
|
|
}
|