From 1474caa8f624aa568ea011629d1aec4ae2aca3c1 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Thu, 3 Oct 2024 22:03:12 +0530 Subject: Using fzf as the application launcher. --- modules/shell/bash/default.nix | 5 +++++ modules/shell/zsh/default.nix | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'modules/shell') diff --git a/modules/shell/bash/default.nix b/modules/shell/bash/default.nix index a82f924..fb1040a 100644 --- a/modules/shell/bash/default.nix +++ b/modules/shell/bash/default.nix @@ -19,6 +19,11 @@ programs.bash.enable = true; programs.bash.historyFile = "${config.xdg.cacheHome}/bash/history"; programs.bash.shellAliases = config.shell.alias; + programs.bash.bashrcExtra = '' +${if config.tools.fzf.enable then + "eval \"$(fzf --bash)\"" +else ""} + ''; home.activation.createBashCacheDirectory = lib.hm.dag.entryAfter diff --git a/modules/shell/zsh/default.nix b/modules/shell/zsh/default.nix index 0c14b8c..66e9556 100644 --- a/modules/shell/zsh/default.nix +++ b/modules/shell/zsh/default.nix @@ -15,7 +15,12 @@ programs.zsh.enable = true; programs.zsh.dotDir = ".config/zsh"; programs.zsh.history.path = "${config.xdg.cacheHome}/zsh/history"; - programs.zsh.initExtra = builtins.readFile ./zshrc; programs.zsh.shellAliases = config.shell.alias; + programs.zsh.initExtra = '' +${if config.tools.fzf.enable then + "eval \"$(fzf --zsh)\"" +else ""} +${builtins.readFile ./zshrc} + ''; }; } -- cgit v1.2.3