{ pkgs , config , lib , ... }: with lib; let cfg = config.eboskma.programs.fish; in { options.eboskma.programs.fish = { enable = mkEnableOption "Enable fish shell"; }; config = mkIf (cfg.enable) { programs.fish = { enable = true; functions = import ./functions.nix { inherit (pkgs) git; }; plugins = [ { name = "dracula"; src = pkgs.fetchFromGitHub { owner = "dracula"; repo = "fish"; rev = "62b109f12faab5604f341e8b83460881f94b1550"; sha256 = "0TlKq2ur2I6Bv7pu7JObrJxV0NbQhydmCuUs6ZdDU1I="; }; } ]; shellAliases = { # code = "${pkgs.vscode}/bin/code --enable-features=UseOzonePlatform --ozone-platform=wayland"; ls = "${pkgs.exa}/bin/exa -Fb --git"; vimdiff = mkIf (config.eboskma.programs.neovim.enable) "nvim -d"; vim = mkIf (config.eboskma.programs.neovim.enable) "nvim"; vi = mkIf (config.eboskma.programs.neovim.enable) "nvim"; }; interactiveShellInit = '' ''; }; programs.starship = { enable = true; enableFishIntegration = true; settings = { aws.disabled = true; character = { success_symbol = "[λ](bold #f8f8f2)"; error_symbol = "[λ](bold #ff5555)"; }; cmd_duration.style = "bold #f1fa8c"; directory.read_only = " "; directory.style = "bold #50fa7b"; docker_context.symbol = " "; elixir.symbol = " "; git_branch.symbol = " "; git_branch.style = "bold #ff79c6"; git_status.style = "bold #ff5555"; hostname.style = "bold #ff5555"; nix_shell.symbol = " "; memory_usage.symbol = " "; package.symbol = " "; python.symbol = " "; rust.symbol = " "; time.disabled = false; username = { format = "[$user]($style) on "; style_user = "bold #bd93f9"; }; status = { disabled = false; format = "[$symbol $status]($style) "; }; }; }; programs.fzf = { enable = true; enableFishIntegration = true; changeDirWidgetCommand = "${pkgs.fd}/bin/fd -type d"; defaultCommand = "${pkgs.fd}/bin/fd -type f"; defaultOptions = [ "--cycle" "--layout=reverse" "--border" "--height=90%" "--preview-window=wrap" "--marker='*'" ]; fileWidgetCommand = "${pkgs.fd}/bin/fd -type f"; }; programs.direnv = { enable = true; nix-direnv.enable = true; }; programs.zoxide = { enable = true; enableFishIntegration = true; }; }; }