-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.fish
92 lines (84 loc) · 3.72 KB
/
config.fish
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
status is-interactive; or exit
for fzf_dir in /opt/homebrew/opt/fzf/ /usr/local/opt/fzf/
if [ -f $fzf_dir/shell/key-bindings.fish ]
source $fzf_dir/shell/key-bindings.fish
break
end
end
command -q mise; and mise activate fish | source
# if the terminal supports it, set keyboard_transmit mode
# fixes st
if tput smkx 2>/dev/null
function mrak_disable_keypad_transmit --on-event fish_preexec
tput rmkx 2>/dev/null
end
function mrak_enable_keypad_transmit --on-event fish_postexec
tput smkx 2>/dev/null
end
end
fish_config theme choose Mrak
# Emulates vim's cursor shape behavior
set fish_cursor_default block
set fish_cursor_insert line
set fish_cursor_replace underscore
set fish_cursor_replace_one underscore
set fish_cursor_visual block
# git prompt
set __fish_git_prompt_showdirtystate 1
set __fish_git_prompt_char_dirtystate ±
set __fish_git_prompt_color_dirtystate brblack
set __fish_git_prompt_char_invalidstate !
set __fish_git_prompt_char_stagedstate =
set __fish_git_prompt_color_stagedstate brblack
set __fish_git_prompt_char_untrackedfiles ?
set __fish_git_prompt_showupstream 1
set __fish_git_prompt_char_upstream_ahead ↑
set __fish_git_prompt_char_upstream_behind ↓
set __fish_git_prompt_char_upstream_diverged ↑↓
set __fish_git_prompt_char_upstream_equal ''
set __fish_git_prompt_char_upstream_prefix ' '
set __fish_git_prompt_color_upstream brblack
set __fish_git_prompt_showcolorhints 1
set __fish_git_prompt_color_flags brblack
set __fish_git_prompt_color_branch yellow
set __fish_git_prompt_color_branch_detached yellow
set __fish_git_prompt_color_branch_dirty yellow
set __fish_git_prompt_color_merging brblack
complete --command xhs --wraps xh
abbr --add ... --regex '^\.\.+$' --function __mrak_abbr_dotdotdot
abbr --add !! --position anywhere --function __mrak_abbr_bangbang
abbr --position command --add lg lazygit
abbr --position command --add g git
abbr --position command --add k kubectl
abbr --position command --add kns kubens
abbr --position command --add kctx kubectx
abbr --position command --add tf terraform
abbr --position command --add v env \$VISUAL
abbr --position command --add e env \$EDITOR
abbr --position command --add ne npm-exec
abbr --position command --add be bundle exec
abbr --position command --add rmrf rm -rf
abbr --position command --add cdd --set-cursor=% cd \$DEV_HOME/%
abbr --position command --add cdp --set-cursor=% cd \$DEV_HOME/Projects/%
abbr --position command --add cds --set-cursor=% cd \$DEV_HOME/Sources/%
abbr --position command --add glsg git ls-files \| grep
abbr --position command --add xrdbmerge xrdb -quiet -merge \$HOME/.Xresources
abbr --position command --add serve python3 -m http.server
switch (uname)
case Linux
abbr --position command --add cdbuild --set-cursor=% cd \$DEV_HOME/PKGBUILDs/%
abbr --position command --add cdaur --set-cursor=% cd \$DEV_HOME/AUR/%
abbr --position command --add cdabs --set-cursor=% cd /var/abs/%
abbr --position command --add p pacman
abbr --position command --add a aura
abbr --position command --add repkg makepkg -scrfi
abbr --position command --add o xdg-open
abbr --position command --add orphans sudo pacman -Rs \(pacman -Qqdt\)
abbr --position command --add upgrade paccache -rk2\; and paccache -ruk0\; and sudo pacman -Syu
abbr --position command --add psg ps -eo pid,user,start_time,cmd --sort -etime \| grep -Fv grep \| grep -E
case Darwin
abbr --position command --add o open
abbr --position command --add orphans brew autoremove
abbr --position command --add upgrade brew update\; and brew upgrade
abbr --position command --add psg ps -eo pid,user,start,command \| grep -Fv grep \| grep -E
end