work on dotfiles
This commit is contained in:
66
aliases.bash
Normal file
66
aliases.bash
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
# Unix
|
||||||
|
alias ll="ls -la"
|
||||||
|
alias ln="ln -v"
|
||||||
|
alias mkdir="mkdir -p"
|
||||||
|
alias e="$EDITOR"
|
||||||
|
alias v="$VISUAL"
|
||||||
|
alias tmux='tmux -u'
|
||||||
|
|
||||||
|
# Top
|
||||||
|
alias cpu='top -o CPU'
|
||||||
|
alias mem='top -o MEM'
|
||||||
|
|
||||||
|
# Get your current public IP
|
||||||
|
alias ip="curl icanhazip.com"
|
||||||
|
alias ip6="wget -q0- -ti -T2 ipv6.icanhazip.com"
|
||||||
|
|
||||||
|
# Git
|
||||||
|
alias ga="git add"
|
||||||
|
alias gaa="git add ."
|
||||||
|
alias gc="git commit "
|
||||||
|
alias gp='git push -u origin "$(git symbolic-ref --short HEAD)"'
|
||||||
|
alias gs="git status"
|
||||||
|
alias nah="git reset --hard; git clean -df;"
|
||||||
|
alias grr="git remote remove origin"
|
||||||
|
alias gra="git remote add origin "
|
||||||
|
alias clonerepo="git fetch --all && git pull --all && git clone-branches"
|
||||||
|
|
||||||
|
# Python
|
||||||
|
alias initvenv='python3 -m venv venv'
|
||||||
|
alias startvenv='source venv/bin/activate'
|
||||||
|
alias stopvenv='deactivate'
|
||||||
|
alias pyinstall='python3 -m pip install -r requirements.txt'
|
||||||
|
alias py='python3'
|
||||||
|
alias py3='python3'
|
||||||
|
alias python='python3'
|
||||||
|
alias pip='pip3'
|
||||||
|
|
||||||
|
# Bundler
|
||||||
|
alias b="bundle"
|
||||||
|
alias bi="bundle install"
|
||||||
|
alias be="bundle exec"
|
||||||
|
alias bu="bundle update"
|
||||||
|
|
||||||
|
# Rails
|
||||||
|
alias migrate="rake db:migrate db:rollback && rake db:migrate"
|
||||||
|
alias s="rspec"
|
||||||
|
alias rk="rake"
|
||||||
|
alias rc="rails c"
|
||||||
|
alias rs="rails s"
|
||||||
|
alias gi="gem install"
|
||||||
|
|
||||||
|
# Pretty print the path
|
||||||
|
alias path='echo $PATH | tr -s ":" "\n"'
|
||||||
|
|
||||||
|
# Configuration Reloads
|
||||||
|
alias tmuxreload='source ~/.tmux.conf'
|
||||||
|
alias bashreload='source ~/.bashrc'
|
||||||
|
|
||||||
|
# nvim
|
||||||
|
alias vim=nvim
|
||||||
|
alias vi=nvim
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
alias vimrc='nvim ~/.vimrc'
|
||||||
|
alias ealias='nvim ~/dotfiles/aliases.bash'
|
||||||
|
alias bashrc='nvim ~/.bashrc'
|
||||||
68
bashrc
Normal file
68
bashrc
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
# Set default user
|
||||||
|
DEFAULT_USER="$USER"
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
export GOPATH="$HOME/go"
|
||||||
|
export PATH="$PATH:$GOPATH/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"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
if [ -z "$SSH_AGENT_PID" ]; then
|
||||||
|
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/clean-detailed.omp.json')"
|
||||||
|
#eval "$(starship init bash)"
|
||||||
|
|
||||||
|
# Bash completion for Git
|
||||||
|
if [ -f /usr/share/bash-completion/completions/git ]; then
|
||||||
|
source /usr/share/bash-completion/completions/git
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Custom aliases (include your existing aliases.zsh content here or source it)
|
||||||
|
if [ -f "$HOME/dotfiles/aliases.bash" ]; then
|
||||||
|
source "$HOME/dotfiles/aliases.bash"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Key timeout
|
||||||
|
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
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[user]
|
[user]
|
||||||
email = blake@blakeridgway.dev
|
email = hello@ciphervance.com
|
||||||
name = Blake Ridgway
|
name = Cipher Vance
|
||||||
[commit]
|
[commit]
|
||||||
template = ~/dotfiles/commit-conventions.txt
|
template = ~/dotfiles/commit-conventions.txt
|
||||||
[core]
|
[core]
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ fi
|
|||||||
|
|
||||||
# Symlink files (keeping the original simple approach)
|
# Symlink files (keeping the original simple approach)
|
||||||
echo "Symlinking dotfiles..."
|
echo "Symlinking dotfiles..."
|
||||||
FILES=('vimrc' 'vim' 'zshrc' 'zsh' 'agignore' 'gitconfig' 'gitignore' 'commit-conventions.txt' 'aliases.zsh')
|
FILES=('vimrc' 'vim' 'bashrc' 'zsh' 'agignore' 'gitconfig' 'gitignore' 'commit-conventions.txt' 'aliases.zsh')
|
||||||
|
|
||||||
for file in "${FILES[@]}"; do
|
for file in "${FILES[@]}"; do
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user