diff options
author | Soispha <soispha@vhack.eu> | 2023-08-01 15:31:42 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-08-01 15:42:54 +0200 |
commit | 0a608bd781dcda40144097b007fac0a0c60a8ee1 (patch) | |
tree | e69fbc1fd0e15e3b86f31f47b776df21f6f0170d /home-manager/soispha/config/lf/default.nix | |
parent | Fix(hm/conf/gammastep): Use lighter settings on laptops (diff) | |
download | nixos-config-0a608bd781dcda40144097b007fac0a0c60a8ee1.zip |
Refactor(treewide): Move module configuration in separate files
Diffstat (limited to 'home-manager/soispha/config/lf/default.nix')
-rw-r--r-- | home-manager/soispha/config/lf/default.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/home-manager/soispha/config/lf/default.nix b/home-manager/soispha/config/lf/default.nix new file mode 100644 index 00000000..9f43a891 --- /dev/null +++ b/home-manager/soispha/config/lf/default.nix @@ -0,0 +1,52 @@ +{ + pkgs, + sysLib, + nixosConfig, + shell_library, + system, + ... +}: let + commands = import ./commands {inherit pkgs sysLib shell_library system;}; + keybindings = import ./keybindings {inherit nixosConfig;}; +in { + xdg.configFile."lf/icons".source = ./icons; + xdg.configFile."lf/colors".source = ./colors; + + # TODO add the systemd tempfile option here + + programs.lf = { + enable = true; + + inherit commands keybindings; + + previewer = { + keybinding = "i"; + source = "${pkgs.ctpv}/bin/ctpv"; + }; + settings = { + # TODO this needs to be added to nixos: + #autoquit = true; # quit the server, if no clients are left + #dirpreviews = true; # preview for directories + + dircounts = true; # count things in directories TODO this has performance impact + drawbox = true; + # errorfmt = "\\033[1;91m==> ERROR:\\033[0m\\033[1;93m%s\\033[0m"; + errorfmt = "\\033[1;91m%s\\033[0m"; + hidden = true; # show hidden files + icons = true; + ifs = "\\n"; # internal field separator for shell commands + #info = "size"; # show the size of a directory + shell = "sh"; + shellopts = "-eu"; # e: exit on error; u: error for unset variables + }; + # TODO remove auto quit, if it has been added + extraConfig = '' + &${pkgs.ctpv}/bin/ctpv -s $id + cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id + set cleaner ${pkgs.ctpv}/bin/ctpvclear + + # close the server, after the last client exits + set autoquit true + ''; + }; +} |