dotfiles/.config/fish/config.fish

66 lines
1.2 KiB
Fish

set -x PATH "$HOME/bin:$PATH"
alias sudo="doas"
alias vim="nvim"
set -x EDITOR "nvim"
alias datenow="date '+%Y-%m-%d'"
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"
alias ll="ls -l"
alias ls="ls"
alias g="git"
mkdir -p ~/.local
set time_diff (expr (date '+%s') - (cat "$HOME/.local/last_shell" 2>/dev/null || echo 0))
if [ "$time_diff" -gt "28800" ]
[ -d "$HOME/tmp" ] && rm -rf "$HOME/tmp/*"
git sit && date '+%s' > "$HOME/.local/last_shell"
echo ""
end
set remind (remind)
if [ ! -z "$remind" ]
echo Reminders:
echo "$remind"
echo ""
end
end