overhaul of some dotfiles

This commit is contained in:
Blake Ridgway
2026-04-05 10:42:44 -05:00
parent 05cdb1ca14
commit 8a006faf65
69 changed files with 697 additions and 6191 deletions

92
bashrc
View File

@@ -1,58 +1,50 @@
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return ;;
esac
# Set default user
DEFAULT_USER="$USER"
# Editor
export EDITOR='nvim'
# Environment variables
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:$GOPATH/bin:/usr/local/go/bin"
# Local bin
export PATH="$PATH:$HOME/.local/bin"
# Node.js and NVM configuration
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"
# Go-specific paths
export PATH="$PATH:/usr/local/go/bin"
# Rust/Cargo
[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
# Haskell tools
export PATH="$PATH:$HOME/.cabal/bin"
export PATH="$PATH:/opt/cabal/1.22/bin"
export PATH="$PATH:/opt/ghc/7.10.3/bin"
# Ruby tools
export PATH="$PATH:$HOME/.rvm/bin"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Neovim
export PATH="$PATH:/opt/nvim-linux64/bin"
# Postgres
export PATH="$PATH:/usr/local/var/postgres"
# Editor
export EDITOR='vim'
# SSH settings
# SSH agent
if [ -z "$SSH_AGENT_PID" ]; then
eval "$(ssh-agent -s)"
ssh-add -A 2>/dev/null;
eval "$(ssh-agent -s)"
ssh-add -A 2>/dev/null
fi
# FZF (if installed)
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# Starship prompt (if installed)
export PATH=$PATH:/home/cipher/.local/bin
eval "$(oh-my-posh init bash --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/refs/heads/main/themes/kali.omp.json')"
#eval "$(starship init bash)"
# Oh My Posh prompt
eval "$(oh-my-posh init bash --config ~/.config/oh-my-posh/theme.omp.json)"
# Bash completion for Git
if [ -f /usr/share/bash-completion/completions/git ]; then
source /usr/share/bash-completion/completions/git
source /usr/share/bash-completion/completions/git
fi
# Custom aliases (include your existing aliases.zsh content here or source it)
# Custom aliases
if [ -f "$HOME/dotfiles/aliases.bash" ]; then
source "$HOME/dotfiles/aliases.bash"
source "$HOME/dotfiles/aliases.bash"
fi
# Key timeout
@@ -61,37 +53,23 @@ export KEYTIMEOUT=1
# C++ include path
export CPLUS_INCLUDE_PATH=/usr/local/include
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return ;;
esac
work() {
set +e
set +e
local proj="$HOME/Drives/500GB/PycharmProjects/time_logix"
cd "$proj" || { echo "No such dir: $proj" >&2; return 1; }
local proj="$HOME/Drives/500GB/PycharmProjects/time_logix"
cd "$proj" || { echo "No such dir: $proj" >&2; return 1; }
# Ensure venv exists
[ -d venv ] || python3 -m venv venv || { echo "venv create failed" >&2; return 1; }
[ -d venv ] || python3 -m venv venv || { echo "venv create failed" >&2; return 1; }
# Activate venv
. venv/bin/activate
. venv/bin/activate
trap 'deactivate 2>/dev/null || true' RETURN
# Always deactivate when function returns
trap 'deactivate 2>/dev/null || true' RETURN
python main.py
local code=$?
# Run the app
python main.py
local code=$?
cd ~ || true
# Move back to home regardless of success/failure
cd ~ || true
if [ $code -ne 0 ]; then
echo "main.py exited with code $code"
fi
if [ $code -ne 0 ]; then
echo "main.py exited with code $code"
fi
}
# added by 02-dev-tools-setup.sh
export PATH=$PATH:/usr/local/go/bin