#!/bin/sh
# shellcheck disable=SC2139

unalias -a

alias sbcl='rlwrap sbcl'
alias sqlite='rlwrap sqlite3'
alias guile='rlwrap guile'

alias l="ls -lahF --color"
alias copy="tr -d '\\n' | xclip -sel clip"
alias cop="xclip -sel clip"
alias vpn="sudo openvpn --config $DOTFILES/VPN/euandreh.ovpn"
# Source: https://unix.stackexchange.com/questions/25327/watch-command-alias-expansion#25329
alias watch="watch --color "
alias mr="mr -s"
alias ncdu="ncdu --color dark"
alias mm="mbsync -A && notmuch new"
alias m="mbsync EuAndreh && notmuch new"
alias n='neomutt'
alias p='ping euandre.org -c 3'
alias playerctl="playerctl --player=\"\$(cat ~/.cache/andreh/mpris-player.txt)\""
alias mux="tmuxinator start"
alias s="git status"
alias d="git diff"
alias ds="git diff --staged"

u() {
  cd ~/annex > /dev/null || exit 1;
  git annex info --fast | grep available;
  cd - > /dev/null || exit 1;
}

alias reload=". $DOTFILES/sh/reload.sh"
alias rr=". $DOTFILES/sh/reload.sh"
alias r=". ~/.bashrc"

alias ag="ag --hidden"
alias jk-shell="bundix && nix-shell -E '((import <nixpkgs> {}).bundlerEnv { name=\"jekyll-env\"; gemdir = ./.; }).env'"
alias grep='grep --color=auto'
alias diff='diff --color=auto'
# https://linuxhandbook.com/run-alias-as-sudo/
alias sudo='sudo '

alias mktorrent='mktorrent -a udp://tracker.coppersurfer.tk:6969/announce -a udp://tracker.ccc.de:80/announce -a udp://tracker.publicbt.com:80 -a udp://tracker.istole.it:80 -a http://tracker.openbittorrent.com:80/announce -a http://tracker.ipv6tracker.org:80/announce'

alias :x='echo "Already out of vi XD"'
alias :w='echo "Not inside vi!" && false'
