#!/usr/bin/env bash

# Link Homebrew casks in `/Applications` rather than `~/Applications`
export HOMEBREW_CASK_OPTS='--appdir=/Applications'

echo "--> Make sure we're using the latest Homebrew"
brew update

echo '--> Upgrade any already-installed formulae'
brew upgrade

echo '--> Install Homebrew-Cask'

brew tap caskroom/cask

echo '--> Install libraries and applications'

# terminal
brew cask install iterm2
brew install bash
brew install bat
brew install cmake
brew install ffmpeg
brew install fzf
brew install grc
brew install rs/tap/jaggr
brew install rs/tap/jplot
brew install oath-toolkit
brew install prettyping
brew install ncdu
brew install rga #ripgrep-all
brew install tmux
brew install reattach-to-user-namespace
brew install ucspi-tcp
brew install zsh

# tmux
brew tap greymd/tools
brew install tmux-xpanes

git clone https://github.com/tmux-plugins/tmux-resurrect ~/.tmux-resurrect
git clone https://github.com/tmux-plugins/tmux-cowboy ~/.tmux-cowboy
git clone https://github.com/tmux-plugins/tmux-cpu ~/.tmux-cpu

# browser
brew cask install google-chrome

# openssl
brew install openssl
brew link openssl --force

# fonts
brew tap homebrew/cask-fonts
brew cask install font-allerta-stencil
brew cask install font-roboto-slab

# asdf
brew install asdf

# devops
brew cask install virtualbox
brew cask install vagrant
brew cask install docker

# image/video
brew cask install vlc

# php dependencies
brew install bison
brew install libiconv
brew install re2c

# tools
brew cask install slack
brew cask install tableplus

# misc
brew cask install gpgtools

brew install awscli
brew install curl
brew install fd
brew install findutils --with-default-names
brew install git
brew install graphviz
brew install btop
brew install jq
brew install tcpdump
brew install tig
brew install tree
brew install wget
brew install zsh-syntax-highlighting

echo '--> Link homebrew apps'
brew linkapps

echo '--> Cleanup !'
brew cask cleanup
brew cleanup