# vim: ft=zsh

function update() {
    $TERM --hold -e "$SHELL" -ic "pac -Syu && echo -e '\e[32mDONE'" &
    $TERM --hold -e "$SHELL" -ic "flatpak update && echo -e '\e[32mDONE'" &
    $TERM --hold -e "$SHELL" -ic "config submodule update --remote --recursive && echo -e '\e[32mDONE'" &
}

alias pac='sudo pacman'

alias vi='$EDITOR'

alias qcp='qcp -o tabsize=4' \
      qmv='qmv -o tabsize=4'

alias config='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \
      viconf='(cd "$XDG_CONFIG_HOME/nvim" && $EDITOR .)' \
      zconf='(cd "$ZDOTDIR/" && $EDITOR .) && . "$ZDOTDIR/.zshrc"'

alias ssh='TERM=linux ssh'

alias sudo='sudo ' \
      watch='watch -c ' \
      xargs='xargs '

function tmp() {
    cd "$(mktemp -d --tmpdir "$1"XXX)"
}

alias -g ...='../..' \
         ....='../../..' \
         .....='../../../..' \
         ......='../../../../..'

alias cp='cp -vi' \
      mv='mv -vi' \
      rm='rm -vI' \
      mkdir='mkdir -v' \
      rsync='rsync -P'

alias ls='ls --color=auto' \
      ll='ls -lh' \
      l='ll -a' \
      la='ll -A'

alias diff='diff --color' \
      grep='grep --color --exclude-dir={.bzr,.cache,.git,.hg,.idea,.svn,.tox,.venv,.vscode,CVS,node_modules}'

alias feh='feh --auto-zoom --scale-down'

alias xmr='monero-wallet-cli --daemon-address monero.maby.dev:18081 --wallet-file /home/ange/.config/monero/ange --trusted-daemon --log-file=/tmp/monero-wallet-cli.log'
