diff --git a/home/base/programs/tmux.nix b/home/base/programs/tmux.nix index 99d44bf..f3a54cc 100644 --- a/home/base/programs/tmux.nix +++ b/home/base/programs/tmux.nix @@ -42,4 +42,5 @@ tmuxPlugins.yank ]; }; + programs.fzf.tmux.enableShellIntegration = true; } diff --git a/home/base/shell/fish.nix b/home/base/shell/fish.nix index 9f77881..de30e4d 100644 --- a/home/base/shell/fish.nix +++ b/home/base/shell/fish.nix @@ -6,18 +6,17 @@ interactiveShellInit = '' set fish_greeting # Disable greeting fish_vi_key_bindings # Enable Vi mode - fish_config theme choose "Catppuccin Frappe" + + function fzf --wraps=fzf --description="Use fzf-tmux if in tmux session" + if set --query TMUX + fzf-tmux $argv + else + command fzf $argv + end + end ''; shellAbbrs = { cd = "z"; ngc = "sudo nix-collect-garbage -d"; }; plugins = [ { name = "fzf"; src = pkgs.fishPlugins.fzf.src; } ]; }; - # Fetch the Catppuccin theme - xdg.configFile."fish/themes/Catppuccin Frappe.theme".source = pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "fish"; - rev = "a3b9eb5eaf2171ba1359fe98f20d226c016568cf"; - sha256 = "sha256-shQxlyoauXJACoZWtRUbRMxmm10R8vOigXwjxBhG8ng="; - } + "/themes/Catppuccin Frappe.theme"; - }