72 lines
1.3 KiB
Fish
72 lines
1.3 KiB
Fish
set -x PATH "$HOME/bin:$PATH"
|
|
|
|
|
|
|
|
if which doas > /dev/null 2>&1
|
|
alias sudo="doas"
|
|
else
|
|
alias doas="sudo"
|
|
end
|
|
|
|
if which nvim >/dev/null 2>&1
|
|
alias vim="nvim"
|
|
set -x EDITOR nvim
|
|
else
|
|
alias nvim="vim -u ~/.config/vim/vimrc"
|
|
alias vim="vim -u ~/.config/vim/vimrc"
|
|
set -x EDITOR "vim -u ~/.config/vim/vimrc"
|
|
end
|
|
|
|
|
|
|
|
function please
|
|
eval doas $history[1]
|
|
end
|
|
|
|
function pingme
|
|
$argv
|
|
|
|
tput bel
|
|
sleep 0.1
|
|
tput bel
|
|
sleep 0.1
|
|
tput bel
|
|
end
|
|
|
|
|
|
|
|
fish_vi_key_bindings
|
|
function fish_mode_prompt; end; funcsave fish_mode_prompt > /dev/null
|
|
|
|
set fish_cursor_default block blink
|
|
set fish_cursor_insert line blink
|
|
set fish_cursor_replace_one underscore blink
|
|
set fish_cursor_visual block
|
|
|
|
if which starship >/dev/null 2>&1
|
|
export STARSHIP_CONFIG="$HOME/.config/starship/config.toml"
|
|
starship init fish | source
|
|
end
|
|
|
|
|
|
|
|
if status --is-interactive
|
|
alias la="ls -a -G"
|
|
alias ll="ls -l -G"
|
|
alias ls="ls -G"
|
|
alias g="git"
|
|
|
|
mkdir -p ~/.local
|
|
if [ (expr (date '+%s') - (cat "$HOME/.local/last_shell" 2>/dev/null || echo 0)) -gt "28800" ]
|
|
git sit && date '+%s' > "$HOME/.local/last_shell"
|
|
echo ""
|
|
end
|
|
|
|
set remind (remind)
|
|
if [ ! -z "$remind" ]
|
|
echo Reminders:
|
|
echo "$remind"
|
|
echo ""
|
|
end
|
|
end
|