summaryrefslogtreecommitdiff
path: root/.config/fish/config.fish
blob: 527e96e3f41e953bbb274a7a98defb8d8e330eaa (plain)
if status is-interactive
    if type -qf zoxide
        zoxide init fish | source
    end
    if type -qf devenv
        devenv hook fish | source
    end

    if type -q fundle
        fundle plugin 'PatrickF1/fzf.fish'

        fundle init
    end

    function mkcd --description "Make a directory and cd into it"
        mkdir -p $argv[1]
        cd $argv[1]
    end

    function rm --wraps rm
        argparse f/force -- $argv
        if set -ql _flag_f
            command rm $argv
        else
            echo "No. Use trash or shred instead."
        end
    end

    function dot --wraps git --description "Performs git actions on the dotfiles repo"
        git -C ~/Projects/dotfiles $argv
    end

    function upgrade
        sudo pacman -Syuu
        flatpak update
        dot pull
    end

    alias ls="eza"
    alias ll="ls -l"
    alias la="ls -A"
    alias lla="ls -lA"
    alias lal="ls -Al"
    alias tree="eza -T"

    alias hx="helix"
    alias bios="systemctl reboot --firmware-setup"
    alias stow="stow -t ~"
end