Utilize PROMPT_COMMAND to set PS1
Minimize calls to external commands

* Prefer `command` over `which`
* Avoid grep calls by using the =~ operator in bash conditionals
Fix typo in functions.sh
Use $EUID to detect root rather than $USER
Add alias mplayer=mpv
Clean up dead code
Style changes

* Use tabs to indent all levels of case statements
* Use lowercase for non-environment variables
* Only put `then` on its own line after multi-line conditionals
* Quote more things