aboutsummaryrefslogtreecommitdiff
path: root/.config/fish/config.fish
blob: 2fddce3c3514e8483b5640a4ffb356a8bf771431 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
if not status is-interactive
    exit
end

# fish
set -gx FISH_CFG $XDG_CONFIG_HOME/fish
set -g fish_greeting
source $FISH_CFG/path.fish
set -gx LANG "en_US.UTF-8"

# xdg
set -gx XDG_CONFIG_HOME "$HOME/.config"
set -gx XDG_CACHE_HOME "$HOME/.cache"
set -gx XDG_DATA_HOME "$HOME/.local/share"
set -gx XDG_STATE_HOME "$HOME/.local/state"

# program
set -gx EDITOR "nvim"
set -gx VISUAL "lite-xl"
set -gx PF_INFO "ascii title os wm editor shell kernel palette"
set -gx BAT_THEME "ansi"
set -gx PNPM_HOME "$HOME/.local/share/pnpm"
set -gx GTK_USE_PORTAL 1
set -gx LITE_SCALE 1.3
set -gx RANGER_LOAD_DEFAULT_RC "FALSE"

# $PATH
source $FISH_CFG/path.fish

# colors
source $FISH_CFG/colors.fish

# bindings
source $FISH_CFG/bindings.fish

# configs
source $FISH_CFG/done_cfg.fish

# abbreviations & aliases
abbr -a paru paru --limit 10
abbr -a projects cd ~/DesktopTemp/RealProjects
abbr -a gc git commit -m
abbr -a ga git add
abbr -a gcl git clone
alias imgcat="wezterm imgcat"
alias dots="git --git-dir=$HOME/.dots --work-tree=$HOME"
alias sudo="doas"
alias ls="ls --color=auto"
function ssh 
    export TERM=xterm-color
    /usr/bin/ssh $argv
    export TERM=xterm-kitty
end
function multicd
    echo (string repeat -n (math (string length -- $argv[1]) - 1) ../)
end
abbr -a dotdot --regex '^\.\.+$' --position anywhere --function multicd
function last_history_item
    echo $history[1]
end
abbr -a !! --position anywhere --function last_history_item

# shell init
eval "$(ssh-agent -c)"
starship init fish | source