Full ~/.bashrc file:

Feel free to copy bits and pieces. The full file may be unusable to people other than myself. This is more for my own benefit / backup. I recommend taking a look the environments page to get a better breakdown of the useful bits and pieces.

#BEGIN - Table of Contents ====================================

   #  File Information
   #  Bash Settings
      #  Only run interactively
      #  Ignore duplicate lines
      #  History
         #  Don't overwrite history
         #  Set history length
      #  Adjust window size
      #  Match directories and subdirecties
      #  Make less more friendly
      #  Prompt
         #  Set chroot var
         #  Fancy prompt
         #  Colored prompt
            #  Set colored prompt
            #  Unset force color
   #  Virtual Env
      #  Setup virtual env prompt info
   #  Quickeasy prompt text decorations
      #  Color changed on input
      #  Quickeasy prompt colors
      #  Git repo
      #  Prevent directory from wrapping
   #  Conda Init
      #  Conda Auto Env script:
      #  Remove conda env
      #  Easy Django environment with Conda
   #  Dumb fun stuff
      #  Sexy Window with Shadow Screenshot
      #  Animated background waterfall
      #  Animated terminal screensaver
   #  Nautilus (Linux File Manager)
   #  DJANGO Aliases
   #  Alacritty Themes
      #  Theme switcher function
      #  Quick Themes
         #  Light Themes
         #  Dark Themes
   #  Shift-related aliases

#END   - Table of Contents ====================================

#* File Information

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

#* Bash Settings

#** Only run interactively
# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

#** Ignore duplicate lines
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

#** History
#*** Don't overwrite history
# append to the history file, don't overwrite it
shopt -s histappend

#*** Set history length
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=100000
HISTFILESIZE=10000

#** Adjust window size
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

#** Match directories and subdirecties
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

#** Make less more friendly
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

#** Prompt
#*** Set chroot var
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

#*** Fancy prompt
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

#*** Colored prompt
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes

#**** Set colored prompt
if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
    # We have color support; assume it's compliant with Ecma-48
    # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
    # a case would tend to support setf rather than setaf.)
    color_prompt=yes
    else
    color_prompt=
    fi
fi

#**** Unset force color
if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

#* Virtual Env
#** Setup virtual env prompt info
function __virtualenv_info() {
   # Get Virtual Env
   if [[ -n "$VIRTUAL_ENV" ]]; then
      # Strip out the path and just leave the env name
      venv="${VIRTUAL_ENV##*/}"
   else
      # In case you don't have one activated
      venv=''
   fi
   [[ -n "$venv" ]] && echo "($venv) "
}

VENV="\$(__virtualenv_info)";


#* Quick/easy prompt text decorations
ansi()          { echo -e "\e[${1}m${*:2}\e[0m"; }
bold()          { ansi 1 "$@"; }
italic()        { ansi 3 "$@"; }
underline()     { ansi 4 "$@"; }
strikethrough() { ansi 9 "$@"; }

#** Color changed on input
# Change color of the PS1 prompt time bashed on bash output
__color_change() {
    if [ $? == 0 ]; then
        Gre
      else
        Red
    fi
}
export -f __color_change

#** Quick/easy prompt colors
Man() { echo -e "\033[0m"; }
Blu() { echo -e "\033[36m"; }
Gol() { echo -e "\033[34m"; }
Yel() { echo -e "\033[33m"; }
Gre() { echo -e "\033[32m"; }
Red() { echo -e "\033[31m"; }

#** Git repo
__git_repo() {
    echo " $(basename -s .git `git config --get remote.origin.url` 2>/dev/null)"
}
export -f __git_repo

#** Prevent directory from wrapping
__shortpath() {
  term_width=$(tmux display -p '#{pane_width}' || echo "0")
  if [[ ${#term_width} > 1 ]]; then
    term_width=$(tput cols)
  fi
  venv_width=${#VENV}
  cenv_width=${#CONDA_DEFAULT_ENV}
  git_repo=$(__git_repo)
  width=${term_width}-${#git_repo}-35-${cenv_width}-${venv_width}
  if [[ ${#1} -gt width ]]; then
        len=width-10
        echo "..."${1: -$len}
      else
        echo $1
    fi
}
export -f __shortpath

#* Conda Init
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/dan/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/dan/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/home/dan/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/dan/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

#** Conda Auto Env script:
# http://albertotb.com/Git-prompt-with-conda-and-conda-auto-env/
alias conda_env_make='conda env export > environment.yml'
if [ -f $HOME/.local/bin/conda_auto_env.sh ]; then
  source $HOME/.local/bin/conda_auto_env.sh
fi

#** Remove conda env
function conda_env_del {
  conda env remove -n $1
}
alias conda_env_list='conda env list'

#** Easy Django environment with Conda
# -- Make sure you have a "root" conda env activated for this to work
function conda_env_create {
  # =========================================
  # Bash script for easy Django env creation.
  # =========================================
  # Create the Conda env
  echo "============================="
  echo "Creating Conda environment..."
  echo "============================="
  conda create -y --name $1 python=3.8 anaconda
  conda deactivate
  conda activate $1
  # Install Django
  echo "============================="
  echo "Installing Django..."
  echo "============================="
  conda install -y -c anaconda django
  # Update Django to latest
  python -m pip install --progress-bar pretty -U Django
  # Create Django project
  echo "============================="
  echo "Creating Django project..."
  echo "============================="
  django-admin startproject $1
  # Install livereload for easier dev
  echo "============================="
  echo "Installing livereload server..."
  echo "============================="
  pip install django-livereload-server
  cd $1
  # Make conda env .yml to auto-activate in this project dir
  conda env export > environment.yml
  # Build .gitignore
  echo "============================="
  echo "Building .gitignore..."
  echo "============================="
  echo "environment.yml" >> .gitignore
  echo "db.sqlite3" >> .gitignore
  echo "__pycache__/" >> .gitignore
  echo "**/__pycache__/" >> .gitignore
  echo "**/migrations/" >> .gitignore
  # Default settings
  echo "============================="
  echo "Setting up default settings..."
  echo "============================="
  echo "import os" >> $1/default_settings.py
  echo "from pathlib import Path" >> $1/default_settings.py
  echo "BASE_DIR = Path(__file__).resolve().parent.parent" >> $1/default_settings.py
  echo "ADDITIONAL_APPS = [ 'livereload', ]" >> $1/default_settings.py
  echo "ADDITIONAL_MIDDLEWARE = [ 'livereload.middleware.LiveReloadScript', ]" >> $1/default_settings.py
  echo "TEMPLATE_BASE = [ os.path.join(BASE_DIR, 'templates'), ]" >> $1/default_settings.py
  echo "STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), )" >> $1/default_settings.py
  echo "STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')" >> $1/default_settings.py
  # Create Django project dirs
  # for static files and templates
  mkdir templates
  mkdir static
  cd ..
  conda deactivate
  conda activate base
  # Finishing setup, providing notice
  echo "============================="
  echo "Setup finished."
  echo "============================="
  echo "Please complete configuration by adding the following to 'settings.py':"
  echo "-----------------------------"
  echo "from .default_settings import ADDITIONAL_APPS, ADDITIONAL_MIDDLEWARE, STATIC_ROOT, STATICFILES_DIRS, TEMPLATE_BASE"
  echo "..."
  echo "INSTALLED_APPS += ADDITIONAL_APPS"
  echo "MIDDLEWARE += ADDITIONAL_MIDDLEWARE"
  echo "TEMPLATES[0]['DIRS'] += TEMPLATE_BASE"
}

# Ultimate PS1
function ultimate_ps1 {
  PS1="$(Man)┎─〚(${CONDA_DEFAULT_ENV}) \`__color_change\`${VENV}\T$(Man)\] \[$(Blu)\]\u@\h \[$(Yel)\]\`__shortpath '\w'\`$(Man)\]$(bold $(italic \`__git_repo\`))\`__git_ps1 ' $(bold $(italic  %s)) '\`\] 〛\n┗━━━━━━━━▶ "
}
export PROMPT_COMMAND="conda_auto_env;ultimate_ps1"

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='exa --icons -h --git -a -F --color-scale --color=always -G -x'
    #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

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -a'
alias l='ls -T -L=2'

# 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 definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

export ip4=$(ifdata -pa wlp2s0)
alias serve="browser-sync start -s -f . --extensions 'html' --no-notify --host $ip4 --port 9000"

alias nginxStart='sudo service nginx start'
alias nginxStop='sudo service nginx stop'
alias nginxRestart='sudo service nginx restart'
alias mysqlStart='sudo service mysql start'
alias mysqlStop='sudo service mysql stop'
alias mysqlRestart='sudo service mysql restart'
alias lstart='sudo service nginx start && sudo service mysql start'
alias lstop='sudo service nginx stop && sudo service mysql stop'
alias lhome='cd "$HOME/projects/l-o-o-s-e-d.net"'
alias dhome='cd "/home/dan/Documents/dato.work"'
alias slhome='cd "/home/dan/Documents/startup-ideas/startup_logger/"'
alias loosed="ssh -i ~/.ssh/id_rsa.pub -o 'IdentitiesOnly yes' dan@l-o-o-s-e-d.net"
alias loosedtv='ssh dan@loosed.tv'
alias loosedstore='ssh dan@loosed.store'
alias dato='ssh dan@dato.work'

alias home='cd "/home/dan/Documents"'
alias tvhome='cd "/home/dan/Documents/loosed.tv/node_modules/node-media-server"'

# Linux modules reload (Sound still requires restart)
alias fixWIFI='sudo dpkg -i /home/dan/Downloads/fixWIFI/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu5_amd64.deb'
#alias fixWIFI='sudo apt-get install --reinstall --upgrade bcmwl-kernel-source'
alias fixSOUND='sudo pulseaudio -k && alsa force-reload'

# Virtual Env Wrapper
export WORKON_HOME='~/.virtualenvs'
export VIRTUAL_ENV_DISABLE_PROMPT=1
VIRTUALENVWRAPPER_PYTHON='/usr/bin/python3'
source ~/.local/bin/virtualenvwrapper.sh

#alias phome='cd "/home/dan/Documents/p5"'
alias tball='tar xopf'

# Android Studio
export ANDROID_HOME=/home/dan/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
alias emulatorUp='adb start-server && $ANDROID_HOME/emulator/emulator @Nexus_5_API_28'
alias streamStart='pm2 start pm2.config.js --env sit'

# FFMpeg
function mkvid() {
  ffmpeg -r 1 -f image2 -pattern_type glob -i "$1" -vf scale=720:480 -filter:v "crop=in_w:480" -vcodec libx264 -crf 0 -pix_fmt yuv444p test.mp4
}
export -f mkvid

function convsvg() {
  filename=$(basename -- "$1")
  extension="${filename##*.}"
  filename="${filename%.*}"
  autotrace -output-file "$2" -input-format "$extension" -dpi 600 -color-count 16 "$1"
}
export -f convsvg

function convpng() {
  ffmpeg -i "$1" -vf "scale=(iw*sar)*max("$2"/(iw*sar)\,"$3"/ih):ih*max("$2"/(iw*sar)\,"$3"/ih), crop="$2":"$3"" "$4"
}
export -f convpng

alias convgif='ffmpeg -i test.mp4 -vf scale=iw/2:ih/2 -f gif test.gif'

function mkgif() {
  ffmpeg -pattern_type glob -r 1 -i "$1" -vf "scale='min(640,iw)':'min(480,ih)':force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2" -pix_fmt yuv420p -f gif output.gif
}
export -f mkgif

# Kitty Terminal
alias icat="kitty +kitten icat"

# Neovim
alias vim='nvim'

# Trash-CLI
alias rm='trash -v'

# Minify JS file, lint
# usage: `minJS input.js output.min.js`
function minJS() {
  terser "$1" --compress --mangle -o "$2"
}
export -f minJS

# Style linter, autoprefixer and minifier
# usage: `minCSS input.css output.min.css`
function minCSS() {
  postcss "$1" --use autoprefixer postcss-clean --no-map -o "$2"
}
export -f minCSS

# Sort CSS delcarations
function sortCSS() {
  postcss "$1" --use css-declaration-sorter -o "$2"
}
export -f sortCSS


# polygonized lqip image for single file
function poly() {
  if [ ${1##*.} != "gif" ]
    then
      primitive -i $1 -o lqip/${1%.*}-lqip.${1##*.} -r 32 -s 32 -bg 'avg' -n 150 -v
  fi
  if [ ${1##*.} = "gif" ]
    then
      convert "$1[0]" temp.gif
      primitive -i temp.gif -o lqip/${1%.*}-lqip.jpg -bg 'avg' -r 32 -s 32 -n 150 -v
      rm temp.gif
  fi
}
export -f poly

# polygonized lqip images for all image in a directory
polyAll () {
  for image in *;
    do
      poly "$image"
  done
}
export -f polyAll

# Thumbnail images for faster load times
function thumb() {
  if [ ${1##*.} != "gif" ]
    then
      convert $1 -resize 300x300 thumbs/${1%.*}-thumbnail.${1##*.}
  fi
  if [ ${1##*.} = "gif" ]
    then
      convert $1 -coalesce -resize 300x300 thumbs/${1%.*}-thumbnail.${1##*.}
  fi
}
export -f thumb

# Thumbnail for all images in a directory
thumbAll () {
  for image in *;
    do thumb "$image"
  done
}
export -f thumbAll

# Imagemagick Smart-Resize
smartRes() {
   mogrify -write thumbs/${1%.*}-thumbnail.${1##*.} -filter Triangle -define filter:support=2 -thumbnail 500 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB $1
}
export -f smartRes

# Knowledge base commands
alias wiki='cd /var/www/l-o-o-s-e-d/html/kb/markdown/'
alias mkhtml='generate-md --input ./ --output ../ --layout ../loosed-template'


# Kunst
export KUNST_SIZE="250x250"
export KUNST_POSITION="+0+0"
export KUNST_MUSIC_DIR="/media/dan/MUSIC/"

# Navigation tools
# -------------------------
function cd() {
  builtin cd "$@" && exa --icons -h --git -a -F --color-scale --color=always -G -x
}
export -f cd

# Jupyter Notebook
# ------------------------------------
function nobook() {
  python /home/dan/.local/bin/create-notebook.py "$@"
}
alias jupcon='jupyter console'


# fzf and ripgrep
if type rg &> /dev/null; then
  export FZF_DEFAULT_COMMAND='rg --files'
  export FZF_DEFAULT_OPTS='-m --height 50% --border'
fi

# Pretty Git Diff
alias gdiff="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' --all"

# Python 3
alias python=python3

# GO
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

# Perl
# ------------------------------------
PATH="/home/dan/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/home/dan/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/dan/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/dan/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/dan/perl5"; export PERL_MM_OPT;

# Node / NPM / NVM
# ------------------------------------
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# Ruby
# ------------------------------------
export GEM_HOME="$HOME/.gem"

# Composer
# ------------------------------------
PATH="/home/dan/.config/composer/vendor/bin:$PATH";

# Rust
# ------------------------------------
export PATH=/home/dan/.cargo/bin:$PATH


# Start MPD daemon
# [ ! -s ~/.config/mpd/pid ] && mpd


# Command to run TMUX at each terminal startup,
# uses incrementing session name:
# ----------------------------------------
SESSION_PREFIX="main"
if [ "$SSH_CLIENT" == "" ] # local terminal emulator or tty
then
  if [[ -n "$PS1" ]] && [[ -z ${TMUX} ]] # If TMUX session already exists:
  then
    ACTIVE=$(tmux ls -F '#S' 2>/dev/null || echo "false") # Get list of active tmux session, or set false
    if [[ $ACTIVE == "false" ]]
    then
      # If session doesn't exist, start new one
      /usr/bin/tmux new -s "$SESSION_PREFIX-0" -c "$PWD" 2>/dev/null && exit
    else
      # If session exists, increment from most recent
      ACTIVE="${ACTIVE//[!0-9[:space:]]/}" # Remove non-numeric / space characters
      ACTIVE=($ACTIVE) # Convert to array
      COUNT=$(echo "${#ACTIVE[@]}")
      if [[ $COUNT -gt 0 ]]
      then
        if [[ $COUNT -gt 1 ]] # More than one TMUX session already exist
        then
          max=${ACTIVE[0]}
          for sess in ${ACTIVE[@]}
          do
            ((sess > max)) && max=$sess
          done
          INCREMENTED=$(($max+1))
          SESSION_INCREMENTED="$SESSION_PREFIX-$INCREMENTED"
          # Starts new tmux session using increment of largest session number
          /usr/bin/tmux new -s "$SESSION_INCREMENTED" -c "$PWD" 2>/dev/null && exit
        else
          # Only one session is active
          ACTIVE=$(echo ${ACTIVE[0]} | awk -F- '{print $NF}')
          INCREMENTED=$(($ACTIVE+1))
          SESSION_INCREMENTED="$SESSION_PREFIX-$INCREMENTED"
          /usr/bin/tmux new -s "$SESSION_INCREMENTED" -c "$PWD" 2>/dev/null && exit
        fi
      fi
    fi
  else
    # No sessions, start new one
    /usr/bin/tmux new -s "$SESSION_PREFIX-0" -c "$PWD" 2>/dev/null && exit
  fi
fi

# Tmux
# -----------------------------
alias tls="tmux ls"
alias t0="tmux attach -t $SESSION_PREFIX-0"
alias t1="tmux attach -t $SESSION_PREFIX-1"
alias t2="tmux attach -t $SESSION_PREFIX-2"
alias t3="tmux attach -t $SESSION_PREFIX-3"
alias t4="tmux attach -t $SESSION_PREFIX-4"
alias t5="tmux attach -t $SESSION_PREFIX-5"
alias t6="tmux attach -t $SESSION_PREFIX-6"
alias t7="tmux attach -t $SESSION_PREFIX-7"
alias t8="tmux attach -t $SESSION_PREFIX-8"
alias t9="tmux attach -t $SESSION_PREFIX-9"
alias k0="tmux kill-session -t $SESSION_PREFIX-0"
alias k1="tmux kill-session -t $SESSION_PREFIX-1"
alias k2="tmux kill-session -t $SESSION_PREFIX-2"
alias k3="tmux kill-session -t $SESSION_PREFIX-3"
alias k4="tmux kill-session -t $SESSION_PREFIX-4"
alias k5="tmux kill-session -t $SESSION_PREFIX-5"
alias k6="tmux kill-session -t $SESSION_PREFIX-6"
alias k7="tmux kill-session -t $SESSION_PREFIX-7"
alias k8="tmux kill-session -t $SESSION_PREFIX-8"
alias k9="tmux kill-session -t $SESSION_PREFIX-9"
# Extra Tmux
alias tirss='tmux attach -t irssi'
alias tslack='tmux attach -t slack'

alias LS='tmux split-window -hbdl 30 "tmux-filetree"'
#alias LS='tmux resize-pane -x 30; while sleep 1; do clear && ls -a "$(tmux display-message -p -F "#{pane_current_path}" -t1)"; done'
#livels() { while :; do clear; tmux display-message -p -F "#{pane_current_path}" -t0 | xargs tree -L 1 ; sleep 1; done }
#export -f livels

# Pipe-Viewer
# ------------------------------------
alias newpipe="pipe-viewer"
alias pimnt="sshfs pi@192.168.0.2:/media/pi/My\ Passport/FULL\ BACKUP\ -\ 01-06-2016/Music/ /mnt/pi/"
alias pissh="ssh pi@192.168.0.2"
alias vissh="ssh pi@192.168.99.2"

# Alacritty Bash Completion
# ------------------------------------
source /home/dan/.config/alacritty/alacritty.bash
# Django Bash Completion
# ------------------------------------
source /etc/bash_completion.d/django.bash

# Vim-like navigation in bash
set -o vi
# Set vim to be default editor
export VISUAL=vim
# Disable editor shortcut on "v" keypress in prompt
#bind -m vi-command '"v": ""'
# Enable edit-and-execute
bind -m vi-command '"v": edit-and-execute-command'

#* Dumb fun stuff

#** Sexy Window with Shadow Screenshot
alias omsse='mpv --no-terminal /usr/share/sounds/freedesktop/stereo/camera-shutter.oga'
alias oms='maim -st 9999999 | convert - \( +clone -background black -shadow 50x3+0+0 \) +swap -background none -layers merge +repage $(date +%s).png && omsse'

#** Animated background waterfall
alias waterfall_rain='paperview ~/Pictures/Wallpapers/Waterfall/Rain/ 1'
alias waterfall_day='paperview ~/Pictures/Wallpapers/Waterfall/Day/ 1'
alias waterfall_night='paperview ~/Pictures/Wallpapers/Waterfall/Night/ 1'

#** Animated terminal screensaver
alias ss='gh screensaver -sstarfield -- --density=1000 --speed=10'

#* Nautilus (Linux File Manager)
# Open file browser in directory
alias here='xdg-open .'

#* DJANGO Aliases
# Go to Django Projects
alias projects='cd ~/projects'
# Make Migrations
alias djangoMM='python manage.py makemigrations'
# Migrate
alias djangoM='python manage.py migrate'
# Both
alias djangoMMM='python manage.py makemigrations; python manage.py migrate'

#* Alacritty Themes
#** Theme switcher function
function theme() {
  ColorStart='## <- START ->'
  ColorEnd='## <- END ->'
  color="$(colortty get "$1")"
  perl -0777 -pi -e 's/'"$ColorStart"'.*?'"$ColorEnd"'/'"$ColorStart\n$color\n$ColorEnd"'/sg;' ~/.config/alacritty/alacritty.yml

  if [[ "$1" == "Gruvbox Dark" ]]
  then
    echo "gruvbox"
  fi

  if [[ "$1" == "Gruvbox Light" || "$1" == "Tinacious Design (Light)" ]]
  then
    echo "earthburn"
  fi

  if [[ "$1" == "Tomorrow" ]]
  then
    echo "$1"
  fi

  if [[ "$1" == "Duotone Dark" ]]
  then
    echo "duotone-dark"
  fi

  if [[ "$1" == "BlulocoLight" ]]
  then
    echo "Tomorrow"
  fi

  if [[ "$1" == "Spacedust" || "$1" == "Tomorrow Night Eighties" || "$1" == "Novel" ]]
  then
    echo "Tomorrow-Night-Eighties"
  fi

  if [[ "$1" == "Scarlet Protocol" ]]
  then
    echo "wellsokai"
  fi

  if [[ "$1" == "Aurora" ]]
  then
    echo "evokai"
  fi

  if [[ "$1" == "Ollie" || "$1" == "Seafoam Pastel" || "$1" == "N0tch2k" || "$1" == "Square" || "$1" == "Teerb" || "$1" == "Neutron" ]]
  then
    echo "wwdc16"
  fi

  if [[ "$1" == "Molokai" || "$1" == "Monokai Remastered" || "$1" == "Monokai Soda" || "$1" == "Monokai Vivid" || "$1" == "Lavandula" || "$1" == "Nocturnal Winter" || "$1" == "Urple" ]]
  then
    echo "monokai-phoenix"
  fi

  if [[ "$1" == "Tomorrow Night Bright" ]]
  then
    echo "afterglow"
  fi

  if [[ "$1" == "IC_Orange_PPL" ]]
  then
    echo "Atelier_DuneDark"
  fi

}
export -f theme

#** Quick Themes
#*** Light Themes
#export VIM_COLOR="$(theme 'Tomorrow')"              # Light Theme
#export VIM_COLOR="$(theme 'Gruvbox Light')"         # Gruvbox Light
#export VIM_COLOR="$(theme 'BlulocoLight')"
#export VIM_COLOR="$(theme 'Belafonte Day')"         # Belafonte Day
#export VIM_COLOR="$(theme 'Novel')"
#export VIM_COLOR="$(theme 'Tinacious Design (Light)')"
#*** Dark Themes
#export VIM_COLOR="$(theme 'Operator Mono Dark')"
#export VIM_COLOR="$(theme 'Overnight Slumber')"
#export VIM_COLOR="$(theme 'Purple Rain')"
#export VIM_COLOR="$(theme 'Rapture')"
#export VIM_COLOR="$(theme 'rebecca')"
#export VIM_COLOR="$(theme 'Royal')"
#export VIM_COLOR="$(theme 'Belafonte Night')"       # Belafonte Night
#export VIM_COLOR="$(theme 'BirdsOfParadise')"       # BirdsOfParadise
#export VIM_COLOR="$(theme 'Sakura')"
#export VIM_COLOR="$(theme 'Scarlet Protocol')"
#export VIM_COLOR="$(theme 'Tinacious Design (Dark)')"
#export VIM_COLOR="$(theme 'BlulocoDark')"
#export VIM_COLOR="$(theme 'Breeze')"
#export VIM_COLOR="$(theme 'CrayonPonyFish')"
#export VIM_COLOR="$(theme 'Molokai')"               # Molokai
#export VIM_COLOR="$(theme 'DimmedMonokai')"
#export VIM_COLOR="$(theme 'Monokai Remastered')"
#export VIM_COLOR="$(theme 'Monokai Soda')"
#export VIM_COLOR="$(theme 'Monokai Vivid')"
#export VIM_COLOR="$(theme 'Lab Fox')"
#export VIM_COLOR="$(theme 'SpaceGray')"
#export VIM_COLOR="$(theme 'Fideloper')"
export VIM_COLOR="$(theme 'Duotone Dark')"          # Dark Theme
#export VIM_COLOR="$(theme 'FrontEndDelight')"
#export VIM_COLOR="$(theme 'Zenburn')"               # Zenburn
#export VIM_COLOR="$(theme 'Aurora')"                # Aurora
#export VIM_COLOR="$(theme 'IC_Orange_PPL')"
#export VIM_COLOR="$(theme 'Tomorrow Night Bright')" # Tomorrow Night
#export VIM_COLOR="$(theme 'Tomorrow Night Eighties')" # Tomorrow Night Eighties
#export VIM_COLOR="$(theme 'Ollie')"                 # 🤙
#export VIM_COLOR="$(theme 'Spacedust')"             # <<<THE SHIT
#export VIM_COLOR="$(theme 'N0tch2k')"               # N0tch2k
#export VIM_COLOR="$(theme 'Square')"                # Square
#export VIM_COLOR="$(theme 'Teerb')"                 # Teerb
#export VIM_COLOR="$(theme 'Lavandula')"
#export VIM_COLOR="$(theme 'Nocturnal Winter')"
#export VIM_COLOR="$(theme 'Whimsy')"
#export VIM_COLOR="$(theme 'Urple')"

#alias color='poetry run python /home/dan/.config/alacritty/alacritty_colorscheme/cli.py'

#* Shift-related aliases
source ~/.bashrc-shift