mirror of
https://github.com/kmein/niveum
synced 2026-03-19 11:31:09 +01:00
feat(fzf): configure via home-manager so stylix gets it
This commit is contained in:
@@ -1,28 +1,22 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
environment = {
|
|
||||||
systemPackages = [pkgs.fzf];
|
|
||||||
variables = rec {
|
|
||||||
FZF_DEFAULT_COMMAND = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
|
|
||||||
FZF_DEFAULT_OPTS =
|
|
||||||
lib.escapeShellArgs ["--height=40%"];
|
|
||||||
FZF_ALT_C_COMMAND = "${pkgs.fd}/bin/fd --type d";
|
|
||||||
FZF_ALT_C_OPTS = lib.escapeShellArgs [
|
|
||||||
"--preview='${pkgs.tree}/bin/tree -L 1 \"{}\"'"
|
|
||||||
"--bind=space:toggle-preview"
|
|
||||||
"--preview-window=hidden"
|
|
||||||
];
|
|
||||||
FZF_CTRL_T_COMMAND = FZF_DEFAULT_COMMAND;
|
|
||||||
FZF_CTRL_T_OPTS =
|
|
||||||
lib.escapeShellArgs ["--preview='head -$LINES {}'"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fzf = {
|
programs.fzf = {
|
||||||
fuzzyCompletion = true;
|
fuzzyCompletion = true;
|
||||||
keybindings = true;
|
keybindings = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager.users.me = {
|
||||||
|
programs.fzf = rec {
|
||||||
|
enable = true;
|
||||||
|
defaultCommand = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
|
||||||
|
defaultOptions = ["--height=40%"];
|
||||||
|
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||||
|
changeDirWidgetOptions = [
|
||||||
|
"--preview='${pkgs.tree}/bin/tree -L 1 \"{}\"'"
|
||||||
|
"--bind=space:toggle-preview"
|
||||||
|
"--preview-window=hidden"
|
||||||
|
];
|
||||||
|
fileWidgetCommand = defaultCommand;
|
||||||
|
fileWidgetOptions = ["--preview='head -$LINES {}'"];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user