Better folder structure
This commit is contained in:
parent
8778fa8ccb
commit
c4e5ccf6bf
75 changed files with 174 additions and 172 deletions
41
hm_modules/lf.nix
Normal file
41
hm_modules/lf.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
lf_kitty_cleaner = pkgs.writeShellScript "lf_kitty_cleaner" ''
|
||||
kitty +icat --clear --silent --transfer-mode file
|
||||
'';
|
||||
lf_kitty_preview = pkgs.writeShellScript "lf_kitty_preview" ''
|
||||
file=$1
|
||||
w=$2
|
||||
h=$3
|
||||
x=$4
|
||||
y=$5
|
||||
|
||||
if [[ "$( file -Lb --mime-type "$file")" =~ ^image ]]; then
|
||||
kitty +icat --silent --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${pkgs.pistol}/bin/pistol "$file"
|
||||
'';
|
||||
in
|
||||
{
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
dircounts = true;
|
||||
icons = true;
|
||||
# mouse = true;
|
||||
number = true;
|
||||
# scrollof = 3;
|
||||
hidden = true;
|
||||
tabstop = 2;
|
||||
};
|
||||
previewer = {
|
||||
source = lf_kitty_preview;
|
||||
# keybinding = "i";
|
||||
};
|
||||
extraConfig = ''
|
||||
set cleaner ${lf_kitty_cleaner}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue