more progress
This commit is contained in:
parent
ef6c049068
commit
2d0b2b5070
31 changed files with 256 additions and 487 deletions
36
modules/home/shell/toolset/fzf/default.nix
Normal file
36
modules/home/shell/toolset/fzf/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, pkgs, user, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
|
||||
cfg = config.${namespace}.shell.toolset.fzf;
|
||||
defShell = config.${namespace}.shell.default;
|
||||
in
|
||||
{
|
||||
options.${namespace}.shell.toolset.fzf = {
|
||||
enable = mkEnableOption "TUI Fuzzy Finder.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ fzf ];
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = defShell == "zsh";
|
||||
enableFishIntegration = defShell == "fish";
|
||||
|
||||
tmux.enableShellIntegration = true;
|
||||
tmux.shellIntegrationOptions = ["-d 40%"];
|
||||
|
||||
defaultCommand = "fd --type f";
|
||||
defaultOptions = ["--height 40%" "--border"];
|
||||
|
||||
changeDirWidgetCommand = "fd --type d";
|
||||
changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"];
|
||||
|
||||
fileWidgetCommand = "fd --type f";
|
||||
fileWidgetOptions = ["--preview 'head {}'"];
|
||||
historyWidgetOptions = ["--sort" "--exact"];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue