# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi # Open VSCode from the terminal code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;} source $HOME/dotfiles/scripts/p.sh # Shortcuts to extract files extract () { if [[ -z $* ]]; then echo "No files provided for extraction." return 1 fi for file in "$@"; do case "${file##*.}" in (zip) unzip "$file" ;; (tar.gz|tgz|gzip) tar -xzf "$file" ;; (tar.bz2|tbz2) tar -xf "$file" ;; (bz2) bunzip2 "$file" ;; (*) echo "Unsupported file format: $file" ;; esac done } export ZSH="$HOME/.oh-my-zsh" ZSH_THEME="powerlevel10k/powerlevel10k" zstyle ':omz:update' mode auto # update automatically without asking zstyle ':omz:update' frequency 7 # Uncomment the following line if pasting URLs and other text is messed up. # DISABLE_MAGIC_FUNCTIONS="true" # Uncomment the following line to enable command auto-correction. ENABLE_CORRECTION="true" # Uncomment the following line to display red dots whilst waiting for completion. # You can also set it to another string to have that shown instead of the default red dots. # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) # COMPLETION_WAITING_DOTS="true" plugins=(git) source $ZSH/oh-my-zsh.sh # Preferred editor for local and remote sessions if [[ -n $SSH_CONNECTION ]]; then export EDITOR='zed' else export EDITOR='zed' fi # Compilation flags # export ARCHFLAGS="-arch x86_64" # # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh