- defaults:
    link:
      relink: true

- clean: ['~']

- create:
    - ~/.config/bash
    - ~/.config/tmux
    - ~/.vim/undo-history

- link:
    ~/.gitconfig: home/gitconfig
    ~/.git-completion.bash: home/config/bash/git-completion.bash
    ~/.git-prompt-colors.sh: home/config/bash/git-prompt-colors.sh

    ~/.bashrc: home/bashrc
    ~/.config/bash/.bash_profile: home/config/bash/bash_profile

    # apps
    ~/.config/alacritty: home/config/alacritty
    ~/.config/btop: home/config/btop

    # tmux
    ~/.tmux.conf: home/tmux.conf
    ~/.config/tmux/themes: home/config/tmux/themes

    ~/.config/.aliases: home/config/aliases

    ~/.vim : home/vim
    ~/.vimrc: home/vimrc

    ~/.zshenv: home/zshenv
    ~/.config/zsh: home/config/zsh

    # mac os
    ~/.hushlogin:
      if: '[ `uname` = Darwin ]'
      path: macos/hushlogin


- shell:
  - git submodule sync --recursive
  # the following have to run after linking ~/.gitconfig
  - git update-submodules
  - >
    git cleanall -f
    home/config/tmux/plugins
    home/config/bash/bash-git-prompt
    home/config/zsh/plugins
    home/vim/bundle/

  # install BD zsh plugin - this needs to happen after the cleanall
  - mkdir -p ~/.config/zsh/plugins/bd
  - curl https://raw.githubusercontent.com/Tarrasch/zsh-bd/master/bd.zsh > ~/.config/zsh/plugins/bd/bd.zsh
