55 lines
1.5 KiB
Nix
55 lines
1.5 KiB
Nix
|
{ pkgs, config, ...}: {
|
||
|
globals.hm = {
|
||
|
programs.carapace = {
|
||
|
enableFishIntegration = true;
|
||
|
enable = true;
|
||
|
};
|
||
|
home.packages = with pkgs; [ grc fzf ];
|
||
|
|
||
|
# home.file.".config/fish/config.fish".force = lib.mkForce true;
|
||
|
programs.fish = {
|
||
|
enable = true;
|
||
|
shellAliases = config.n.misc.aliases;
|
||
|
|
||
|
interactiveShellInit = ''
|
||
|
set fish_greeting
|
||
|
fish_vi_key_bindings
|
||
|
'';
|
||
|
|
||
|
plugins = with pkgs.fishPlugins; [
|
||
|
# Colorized command output
|
||
|
{ name = "grc"; src = grc.src; }
|
||
|
# Fzf integration
|
||
|
{ name = "fzf"; src = fzf-fish.src; }
|
||
|
{ name = "forgit"; src = forgit.src; }
|
||
|
# Usage frequency-based directory jumping
|
||
|
{ name = "z"; src = z.src; }
|
||
|
];
|
||
|
|
||
|
functions = {
|
||
|
fish_prompt = "string join '' -- (set_color --bold green) (prompt_login) (set_color normal) ' ['(prompt_pwd)']' (set_color green) (fish_git_prompt) ' '(fish_default_mode_prompt)\\n(set_color blue)'> '(set_color normal)";
|
||
|
fish_mode_prompt = "";
|
||
|
fish_default_mode_prompt = ''
|
||
|
switch $fish_bind_mode
|
||
|
case default
|
||
|
set_color red
|
||
|
echo '[N]'
|
||
|
case insert
|
||
|
set_color green
|
||
|
echo '[I]'
|
||
|
case replace_one
|
||
|
set_color green
|
||
|
echo '[R]'
|
||
|
case visual
|
||
|
set_color brmagenta
|
||
|
echo '[V]'
|
||
|
end
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
imp.home.dirs = [ ".local/share/fish" ];
|
||
|
users.defaultUserShell = pkgs.fish;
|
||
|
programs.fish.enable = true;
|
||
|
}
|