# Only execute this file once per shell.
set -q __fish_home_manager_config_sourced; and exit
set -g __fish_home_manager_config_sourced 1




status --is-login; and begin

    # Login shell initialisation


end

status --is-interactive; and begin

    # Abbreviations


    # Aliases
    alias backup '$HOME/.borg/backup.sh'
    alias budget 'hledger print income:krankengeld | grep -Po '\''^\d\d\d\d-\d\d-\d\d'\'' | tail -1 | xargs -I{} hledger balance budgets date:{}-today'
    alias fox cat
    alias g git
    alias grep rg
    alias hl hledger
    alias la 'exa --git -al'
    alias ll 'exa --git -l'
    alias ls 'exa --git'
    alias mountNas 'systemctl start home-vi-nas.mount'
    alias t task
    alias tt 'exa --git -Tl'
    alias vimdiff 'nvim -d'
    alias vim 'nvim'
    alias cat batcat
    alias pkgs 'vim ~/ansible/packages.yml'
    alias anal 'ansible-playbook -K ~/ansible/packages.yml'

    # Interactive shell initialisation
    set -gx GPG_TTY (tty)

#    source $HOME/.config/fish/device-conf.fish

end

if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]
  exec sway
end

set -g EDITOR /usr/bin/nvim
set -g VISUAL /usr/bin/nvim
#set -g SSH_AUTH_SOCK $XDG_RUNTIME_DIR/ssh-agent.socket
