Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Source plugin initializations (keep at top)
# Initialize zsh plugins and theme settings
source ~/.oh-my-posh-theme.json
source $OH_MY_POSH_THEME
source ~/zsh/plugins.zsh

# Source all modular files in appropriate order
Expand Down
3 changes: 2 additions & 1 deletion cloud-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ runcmd:
- chsh -s /bin/zsh ubuntu
- curl -s https://ohmyposh.dev/install.sh | bash -s
- sudo snap install nushell --classic
- git clone https://github.com/unitz007/dotfiles.git /home/ubuntu/dotfiles
# DOTFILES_REPO env var should be used here instead of hardcoded URL
- git clone $DOTFILES_REPO /home/ubuntu/dotfiles
- cp /home/ubuntu/dotfiles/.zshrc /home/ubuntu/
- cp /home/ubuntu/dotfiles/.oh-my-posh-theme.json /home/ubuntu/
- echo 'exec zsh' >> /home/ubuntu/.bashrc
18 changes: 8 additions & 10 deletions fzf/.fzf.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ if command -v fzf &>/dev/null; then
"

# --- Source fzf keybindings and completion ---
if [[ -d "/opt/homebrew/opt/fzf/shell" ]]; then
source "/opt/homebrew/opt/fzf/shell/key-bindings.zsh"
source "/opt/homebrew/opt/fzf/shell/completion.zsh"
elif [[ -d "/usr/local/opt/fzf/shell" ]]; then
source "/usr/local/opt/fzf/shell/key-bindings.zsh"
source "/usr/local/opt/fzf/shell/completion.zsh"
elif [[ -d "$HOME/.fzf/shell" ]]; then
source "$HOME/.fzf/shell/key-bindings.zsh"
source "$HOME/.fzf/shell/completion.zsh"
# Use dynamic detection of fzf installation path
if command -v fzf >/dev/null 2>&1; then
local fzf_base="$(dirname $(dirname $(command -v fzf)))"
if [[ -d "$fzf_base/shell" ]]; then
source "$fzf_base/shell/key-bindings.zsh"
source "$fzf_base/shell/completion.zsh"
fi
fi

fi
fi
6 changes: 3 additions & 3 deletions macos-defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ apply_defaults "Hide icons on Desktop" com.apple.finder CreateDesktop -bool fals
killall Finder || true

# ── Screenshots ─────────────────────────────────────────────────────────────
mkdir -p ~/Screenshots
apply_defaults "Set screenshot save location to ~/Screenshots" com.apple.screencapture location -string "$HOME/Screenshots"
mkdir -p $SCREENSHOT_DIR
apply_defaults "Set screenshot save location to $SCREENSHOT_DIR" com.apple.screencapture location -string "$SCREENSHOT_DIR"
apply_defaults "Set screenshot format to PNG" com.apple.screencapture type -string "png"

killall SystemUIServer || true
Expand All @@ -66,4 +66,4 @@ echo "✅ macOS defaults applied successfully."
echo "⚠️ Some changes require logging out and back in (or restarting) to take full effect."
echo " At minimum, restart Dock and Finder (already done)."

exit 0
exit 0
35 changes: 23 additions & 12 deletions zsh/aliases.zsh
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
# Aliases
alias ls="nu -c ls"
alias la="nu -c 'ls -la'"
if command -v nu >/dev/null 2>&1; then
alias ls="nu -c ls"
alias la="nu -c 'ls -la'"
else
alias ls="ls"
alias la="ls -la"
fi
alias run="sdlc run"
alias tst="sdlc test"
alias build="sdlc build"
alias vim=nvim
alias vi=nvim
alias update="brew update && brew upgrade && brew cleanup"
alias update="brew update && brew upgrade && brew cleanup && echo '✅ Brew update complete' || echo '❌ Brew update failed'"
alias k=kubectl
alias kgs="kubectl get services"
alias kgp="kubectl get pods"
alias kgd="kubectl get deployments"
alias ka="kubectl apply -f"
alias kd="kubectl delete"
alias pull="git pull"
alias kd="kubectl delete --wait"
alias gpl="git pull"
alias g="git"
alias gc="git checkout"
alias gco="git checkout"
alias ..="cd ../"
alias ...="cd ../../"
alias ....="cd ../../../"
alias cls='clear'
alias tf=terraform
alias tfp="terraform plan"
alias tfa="tf apply"
alias gwp="cd ~/Personal/Golang" # Golang workspace
alias h="cd ~/"
alias nf=neofetch

Expand All @@ -35,11 +36,21 @@ alias gs='git status'
alias ga='git add'
alias gm='git commit -m'
alias gp='git push'
alias gb="git branch"
alias glog="git log --oneline --graph --decorate --all"

# System monitoring
alias df='df -h'
alias du='du -h'
alias ps='ps aux'
alias psa='ps aux'

# Networking
alias ports='netstat -tulanp'
alias ports='netstat -tulanp'

# Personal workspace
gwp() { cd $GOWORK 2>/dev/null || echo "⚠️ Golang workspace not found at $GOWORK"; }

# Docker
alias d="docker"
alias dc="docker compose"
alias dkx="docker exec -it"
18 changes: 17 additions & 1 deletion zsh/exports.zsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
# Environment variable exports
export KUBE_EDITOR="nvim"
export VISUAL=nvim
export LANG=en_US.UTF-8
export LANG=en_US.UTF-8

# New environment variables with defaults
: ${GOWORK:=$HOME/Personal/Golang}
export GOWORK

: ${CLOUD_INIT_PATH:=$HOME/cloud-init.yaml}
export CLOUD_INIT_PATH

: ${OH_MY_POSH_THEME:=$HOME/.oh-my-posh-theme.json}
export OH_MY_POSH_THEME

: ${DOTFILES_REPO:=https://github.com/unitz007/dotfiles.git}
export DOTFILES_REPO

: ${SCREENSHOT_DIR:=$HOME/Screenshots}
export SCREENSHOT_DIR
2 changes: 1 addition & 1 deletion zsh/functions.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ustart() {
return 1
fi

multipass launch -n ubuntu --cpus 4 --disk 20G --memory 2G --cloud-init ~/cloud-init.yaml
multipass launch -n ubuntu --cpus 4 --disk 20G --memory 2G --cloud-init $CLOUD_INIT_PATH
multipass shell ubuntu
}

Expand Down
2 changes: 1 addition & 1 deletion zsh/plugins.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Plugin initialization
eval "$(oh-my-posh init zsh --config ~/.oh-my-posh-theme.json)"
eval "$(oh-my-posh init zsh --config $OH_MY_POSH_THEME)"

# Amazon Q pre block. Keep at the top of this file.
[[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh"
Expand Down
Loading