Config and setup files
at main 6.1 kB view raw
1# Add deno completions to search path 2if [[ ":$FPATH:" != *":/Users/finxol/.zsh/completions:"* ]]; then export FPATH="/Users/finxol/.zsh/completions:$FPATH"; fi 3# If you come from bash you might have to change your $PATH. 4# export PATH=$HOME/bin:/usr/local/bin:$PATH 5 6# Path to your oh-my-zsh installation. 7export ZSH="$HOME/.oh-my-zsh" 8 9# Set name of the theme to load --- if set to "random", it will 10# load a random theme each time oh-my-zsh is loaded, in which case, 11# to know which specific one was loaded, run: echo $RANDOM_THEME 12# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes 13ZSH_THEME="gallifrey" 14 15# Set list of themes to pick from when loading at random 16# Setting this variable when ZSH_THEME=random will cause zsh to load 17# a theme from this variable instead of looking in $ZSH/themes/ 18# If set to an empty array, this variable will have no effect. 19# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) 20 21# Uncomment the following line to use case-sensitive completion. 22# CASE_SENSITIVE="true" 23 24# Uncomment the following line to use hyphen-insensitive completion. 25# Case-sensitive completion must be off. _ and - will be interchangeable. 26# HYPHEN_INSENSITIVE="true" 27 28# Uncomment one of the following lines to change the auto-update behavior 29# zstyle ':omz:update' mode disabled # disable automatic updates 30# zstyle ':omz:update' mode auto # update automatically without asking 31# zstyle ':omz:update' mode reminder # just remind me to update when it's time 32 33# Uncomment the following line to change how often to auto-update (in days). 34# zstyle ':omz:update' frequency 13 35 36# Uncomment the following line if pasting URLs and other text is messed up. 37# DISABLE_MAGIC_FUNCTIONS="true" 38 39# Uncomment the following line to disable colors in ls. 40# DISABLE_LS_COLORS="true" 41 42# Uncomment the following line to disable auto-setting terminal title. 43# DISABLE_AUTO_TITLE="true" 44 45# Uncomment the following line to enable command auto-correction. 46# ENABLE_CORRECTION="true" 47 48# Uncomment the following line to display red dots whilst waiting for completion. 49# You can also set it to another string to have that shown instead of the default red dots. 50# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" 51# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) 52# COMPLETION_WAITING_DOTS="true" 53 54# Uncomment the following line if you want to disable marking untracked files 55# under VCS as dirty. This makes repository status check for large repositories 56# much, much faster. 57# DISABLE_UNTRACKED_FILES_DIRTY="true" 58 59# Uncomment the following line if you want to change the command execution time 60# stamp shown in the history command output. 61# You can set one of the optional three formats: 62# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 63# or set a custom format using the strftime function format specifications, 64# see 'man strftime' for details. 65# HIST_STAMPS="mm/dd/yyyy" 66 67# Would you like to use another custom folder than $ZSH/custom? 68# ZSH_CUSTOM=/path/to/new-custom-folder 69 70# Which plugins would you like to load? 71# Standard plugins can be found in $ZSH/plugins/ 72# Custom plugins may be added to $ZSH_CUSTOM/plugins/ 73# Example format: plugins=(rails git textmate ruby lighthouse) 74# Add wisely, as too many plugins slow down shell startup. 75plugins=(git) 76 77source $ZSH/oh-my-zsh.sh 78 79# User configuration 80 81# export MANPATH="/usr/local/man:$MANPATH" 82 83# You may need to manually set your language environment 84# export LANG=en_US.UTF-8 85 86# Preferred editor for local and remote sessions 87# if [[ -n $SSH_CONNECTION ]]; then 88# export EDITOR='vim' 89# else 90# export EDITOR='mvim' 91# fi 92 93# Compilation flags 94# export ARCHFLAGS="-arch x86_64" 95 96# Set personal aliases, overriding those provided by oh-my-zsh libs, 97# plugins, and themes. Aliases can be placed here, though oh-my-zsh 98# users are encouraged to define aliases within the ZSH_CUSTOM folder. 99# For a full list of active aliases, run `alias`. 100# 101# Example aliases 102# alias zshconfig="mate ~/.zshrc" 103# alias ohmyzsh="mate ~/.oh-my-zsh" 104 105 106 107 108alias ll="eza -la --icons --group-directories-first --git" 109 110 111############### 112# SSH Aliases # 113############### 114 115# Connect to VM 116alias ssh-vm="ssh 'finxol@fdfa:6c9d:d516:7dda:78b0:39ff:fe3d:e285'" 117 118# Connect to local Raspberry Pi 119raspi() { 120 ip=`curl -s https://am.i.mullvad.net/ip` 121 122 if [ "$ip" = "82.67.127.125" ]; then 123 ssh finxol@192.168.1.158 124 else 125 echo "Not connected to home network" 126 echo "Please connect to Wireguard VPN" 127 fi 128} 129 130############### 131 132# bun completions 133[ -s "/Users/finxol/.bun/_bun" ] && source "/Users/finxol/.bun/_bun" 134 135# bun 136export BUN_INSTALL="$HOME/.bun" 137export PATH="$BUN_INSTALL/bin:$PATH" 138 139# Deno global packages 140export PATH="$PATH:$HOME/.deno/bin" 141 142export EDITOR="vim" 143 144alias c="clear -x" 145export PATH="/opt/homebrew/opt/node@22/bin:$PATH" 146 147# pnpm 148export PNPM_HOME="/Users/finxol/Library/pnpm" 149case ":$PATH:" in 150 *":$PNPM_HOME:"*) ;; 151 *) export PATH="$PNPM_HOME:$PATH" ;; 152esac 153# pnpm end 154 155# bit 156case ":$PATH:" in 157 *":/Users/finxol/bin:"*) ;; 158 *) export PATH="$PATH:/Users/finxol/bin" ;; 159esac 160# bit end 161 162 163eval "$(zoxide init zsh)" 164 165# Automatically attach to or create tmux session named 'default' 166# only when running inside Ghostty and not already in tmux. 167if [[ -z "$TMUX" && "$TERM_PROGRAM" = "ghostty" ]]; then 168 exec tmux new -A -s default 169fi 170 171# Deploy Jester's stock website 172deploy-stock() { 173 dopers "pm2 stop stock-stats && rm -rf /srv/http/stock-stats/*" && rsync -av --exclude=node_modules -e "ssh -i ~/.ssh/id_rsa" ~/Projects/dev/web/stock-stats/* finxol@157.230.116.140:/srv/http/stock-stats && dopers "cd /srv/http/stock-stats && ~/.bun/bin/bun install && ~/.bun/bin/bun run build && NODE_ENVIRONMENT=production pm2 start .output/server/index.mjs --name stock-stats" 174} 175 176# Unquarantine app 177fix-app() { 178 xattr -d com.apple.quarantine $1 179} 180. "/Users/finxol/.deno/env" 181# Initialize zsh completions (added by deno install script) 182autoload -Uz compinit 183compinit 184 185# fnm 186FNM_PATH="/opt/homebrew/opt/fnm/bin" 187if [ -d "$FNM_PATH" ]; then 188 eval "`fnm env`" 189fi