if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
      #alias dir='dir --color=auto'
      #alias vdir='vdir --color=auto'
    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# ls aliases
alias count="ls -l | wc -l"
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

alias c="clear"

function csa(){ cd $1 && ls -a; }
function cs(){ cd $1 && ls; }

# Git aliases
function gcam() { git commit -a -m "$1"; }

function dt() { nohup "$@" </dev/null >/dev/null 2>&1 & disown; }

alias gm="git checkout main && git pull"


function mkcdir () { mkdir "$1" && cd "$1"; }

alias scripts="jq .scripts package.json"

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'