aboutsummaryrefslogtreecommitdiff
path: root/fish/config.fish
blob: 334102b94f1e346d599dc1ff3f03ddb82b40efc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Login shell initialisation
status is-login; and begin
end

status is-interactive; and begin
    fish_config theme choose catppuccin-frappe

    # Interactive shell initialisation
    set --global hydro_color_pwd yellow
    set --global hydro_color_prompt green
    set --global hydro_color_git red
    set --global hydro_cmd_duration_threshold 30000

    set --global --export LEDGER_FILE "$HOME/finanças/dindin.journal"
    set --global --export PASSWORD_STORE_DIR $HOME/.local/share/pass

    set --global --export PASSWORD_STORE_DIR "$HOME/.local/share/pass"
    set --global --export GPG_TTY (tty)
    gpg-connect-agent --quiet updatestartuptty /bye >/dev/null

    set --global --export __done_min_cmd_duration 60000 # done só considera comandos que estejam levando mais de 1 minuto

    # use `doas(1)` no lugar de `sudo(1)`, se aplicável
    if command --query doas
        bind --user alt-s "fish_commandline_prepend doas"
    end

    if functions --query fzf_configure_bindings
        fzf_configure_bindings --directory=\ct --variables=\e\cv
    end

    if command --query any-nix-shell
        any-nix-shell fish --info-right | source
    end

    if command --query zoxide
        zoxide init fish | source
    end

    if command --query direnv
        direnv hook fish | source
    end

    if command --query nnn
        bind --user alt-n "n"
    end
end