aboutsummaryrefslogtreecommitdiff
path: root/share/cfg/fish.nix
blob: d5b071a047109a5abc4618501b8465fdee9aa86c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ pkgs, ... }:
{
  home.packages = [ pkgs.fastfetch ];
  programs.fish = {
    functions = {
      fish_command_not_found = "echo Did not find command $argv[1]";
      __fish_command_not_found_handler = {
        body = "fish_command_not_found";
        onEvent = "fish_command_not_found";
      };
      t = "pushd $(mktemp -d /tmp/$1.XXXX)";
      # see: https://entropicthoughts.com/q
      q = ''
        llm --system "Answer in as few words as possible. Use a brief style with short replies" \
            --model gemini-2.5-flash  $(string join ' ' $argv)
      '';
    };
    interactiveShellInit = ''
      fastfetch
    '';
  };
}