]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/lf.nix
courge: sanoid: setup
[julm/julm-nix.git] / home-manager / profiles / lf.nix
1 { pkgs, ... }:
2 let
3 lfimg = pkgs.fetchFromGitHub {
4 owner = "neeshy";
5 repo = "lfimg";
6 rev = "e9154721514a1384a89f2713092c15dc77992f37";
7 sha256 = "sha256-n4H+oREay96sxenF9S02uJp5xV7ow/URaQWaV/sPsuk=";
8 };
9 in
10 {
11 home.packages = [
12 pkgs.lf
13 #(pkgs.writeShellScriptBin "lfimg" (lib.readFile "${lfimg}/lfimg"))
14 pkgs.pistol # For previewing
15 pkgs.ranger # Only for rifle, to replace xdg-open
16 #pkgs.ueberzug # For previewing images
17 ];
18 xdg.configFile."lf/lfrc".text = ''
19 # Do not fork
20 #cmd open $xdg-open "$f"
21 cmd open $rifle "$f"
22 map <enter> open
23 map d delete
24 map f filter
25 map i up
26 map j updir
27 map k down
28 #set cleaner ${lfimg}/cls
29 set dircache
30 set dirfirst
31 set hidden
32 set incfilter
33 set incsearch
34 set mouse
35 set noglobsearch
36 set noicons
37 set preview
38 set previewer pistol
39 set ratios 1:2
40 set scrolloff 10
41 set sortby natural
42 set tabstop 4
43 '';
44 xdg.configFile."pistol/pistol.conf".text = ''
45 text/* bat --paging=never --color=always %pistol-filename%
46 #image/.* ${lfimg}/pv %pistol-filename% %pistol-extra0% %pistol-extra1% %pistol-extra2% %pistol-extra3%
47 '';
48 # xdg-open is harder to configure and slower to launch than rifle
49 #xdg.mimeApps.enable = true;
50 # Initial config from https://raw.githubusercontent.com/ranger/ranger/master/ranger/config/rifle.conf
51 xdg.configFile."ranger/rifle.conf".source = ranger/rifle.conf;
52 }