2024-09-24 21:47:52 +00:00
|
|
|
{pkgs, ...}: let
|
2024-08-26 21:56:43 +00:00
|
|
|
catppuccin-fish = pkgs.fetchFromGitHub {
|
|
|
|
owner = "catppuccin";
|
|
|
|
repo = "fish";
|
|
|
|
rev = "a3b9eb5eaf2171ba1359fe98f20d226c016568cf";
|
|
|
|
hash = "sha256-shQxlyoauXJACoZWtRUbRMxmm10R8vOigXwjxBhG8ng=";
|
|
|
|
};
|
2024-09-24 21:47:52 +00:00
|
|
|
in {
|
2024-08-25 19:58:12 +00:00
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
|
|
|
interactiveShellInit = ''
|
|
|
|
set fish_greeting # Disable greeting
|
|
|
|
fish_vi_key_bindings # Enable Vi mode
|
2024-08-26 21:56:43 +00:00
|
|
|
fish_config theme choose "Catppuccin Frappe"
|
2024-08-25 19:58:12 +00:00
|
|
|
'';
|
2024-09-24 13:09:36 +00:00
|
|
|
shellAbbrs = {
|
|
|
|
cd = "z";
|
|
|
|
ngc = "sudo nix-collect-garbage -d";
|
|
|
|
};
|
|
|
|
plugins = [
|
|
|
|
{
|
|
|
|
name = "fzf";
|
|
|
|
src = pkgs.fishPlugins.fzf.src;
|
|
|
|
}
|
2024-09-04 10:33:11 +00:00
|
|
|
];
|
2024-08-25 19:58:12 +00:00
|
|
|
};
|
2024-08-26 21:56:43 +00:00
|
|
|
|
2024-08-27 11:22:17 +00:00
|
|
|
programs.bash = {
|
|
|
|
enable = true;
|
|
|
|
initExtra = ''
|
|
|
|
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
|
|
|
then
|
|
|
|
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
|
|
|
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-08-26 21:56:43 +00:00
|
|
|
xdg.configFile."fish/themes/Catppuccin Frappe.theme".source = "${catppuccin-fish}/themes/Catppuccin Frappe.theme";
|
2024-08-25 19:58:12 +00:00
|
|
|
}
|