mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-10 02:19:41 +00:00
Add ranger (terminal filemgr)
This commit is contained in:
parent
c5296ed6f8
commit
5aab80e92d
|
@ -7,6 +7,7 @@ _: {
|
|||
./yazi
|
||||
./xplr
|
||||
./vifm
|
||||
./ranger.nix
|
||||
];
|
||||
}
|
||||
|
||||
|
|
25
home/programs/terminal/file-managers/ranger.nix
Normal file
25
home/programs/terminal/file-managers/ranger.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
device = osConfig.modules.device;
|
||||
# TODO: maybe not have a TUI file manager on desktops, when GUI does it better
|
||||
acceptedTypes = ["laptop" "desktop" "hybrid" "server" "lite"];
|
||||
inherit (lib.strings) optionalString;
|
||||
in {
|
||||
config = lib.mkIf (builtins.elem device.type acceptedTypes) {
|
||||
home.packages = with pkgs; [
|
||||
ranger
|
||||
];
|
||||
|
||||
# TODO: more file preview methods
|
||||
xdg.configFile."ranger/rc.conf".text = ''
|
||||
set preview_images true
|
||||
${(optionalString config.programs.kitty.enable "set preview_images_method kitty")}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue