diff --git a/link/.bash_profile b/link/.bash_profile index b76e61b..5a8731b 100644 --- a/link/.bash_profile +++ b/link/.bash_profile @@ -1,3 +1,18 @@ if [ -f ~/.bashrc ]; then source ~/.bashrc fi + +export PATH="$HOME/.cargo/bin:$PATH" +if command -v pyenv 1>/dev/null 2>&1; then + eval "$(pyenv init -)" +fi + +[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* + +export PATH="$HOME/.poetry/bin:$PATH" + +# The next line updates PATH for the Google Cloud SDK. +if [ -f '/Users/ikeviny/src/google-cloud-sdk/path.bash.inc' ]; then . '/Users/ikeviny/src/google-cloud-sdk/path.bash.inc'; fi + +# The next line enables shell command completion for gcloud. +if [ -f '/Users/ikeviny/src/google-cloud-sdk/completion.bash.inc' ]; then . '/Users/ikeviny/src/google-cloud-sdk/completion.bash.inc'; fi diff --git a/link/.bashrc b/link/.bashrc index eb07170..cd74972 100644 --- a/link/.bashrc +++ b/link/.bashrc @@ -23,3 +23,11 @@ function dotfiles() { } src + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash + +# This is a fix for mosh-ing into this machine? +export PATH="$PATH:/usr/local/bin" + +# Add RVM to PATH for scripting. Make sure this is the last PATH variable change. +export PATH="$PATH:$HOME/.rvm/bin" diff --git a/link/.tmux.conf b/link/.tmux.conf index 4825de6..7a2f869 100644 --- a/link/.tmux.conf +++ b/link/.tmux.conf @@ -1,5 +1,6 @@ # General settings set -g default-terminal "screen-256color" +set -g default-command /bin/zsh set -g history-limit 10000 set -g mouse on set -g base-index 1 @@ -8,7 +9,7 @@ set -sg escape-time 1 setw -g mode-keys vi # Fix pasteboard commands on macOS -if-shell 'test "$(uname)" = "Darwin"' 'set-option -g default-command "reattach-to-user-namespace -l bash"' +if-shell 'test "$(uname)" = "Darwin"' 'set-option -g default-command "reattach-to-user-namespace -l zsh"' # Don't rename windows automatically set-option -g allow-rename off diff --git a/link/.vimrc b/link/.vimrc index 842d02b..d2d7007 100644 --- a/link/.vimrc +++ b/link/.vimrc @@ -58,7 +58,7 @@ set encoding=utf-8 " Set file encoding set updatetime=500 " Decrease update time to 500ms set splitbelow " Open new vertical panes below set splitright " Open new horizontal panes to the right -set diffopt+=vertical " Use vertical diffs by default +" set diffopt+=vertical " Use vertical diffs by default set breakindent " Visually indent wrapped lines " Disable swap files @@ -171,7 +171,8 @@ let g:airline_theme = 'tender' let macvim_skip_colorscheme = 1 " ===== vimwiki ===== -let g:vimwiki_list = [{'path': '~/Dropbox/vimwiki'}] +let g:vimwiki_list = [{'path': '~/Dropbox/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] +let g:vimwiki_global_ext = 0 " ===== vim-airline ===== set laststatus=2 diff --git a/link/.zshrc b/link/.zshrc new file mode 100644 index 0000000..791db26 --- /dev/null +++ b/link/.zshrc @@ -0,0 +1,120 @@ +# 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 + +# iKevinY/dotfiles stuff +export DOTFILES="$HOME/.dotfiles" + +# Add binaries into the path +PATH="$DOTFILES/bin:$PATH" +export PATH + +# Source zsh-compatible files in `source` +function src() { + source "$DOTFILES/source/aliases.sh" + source "$DOTFILES/source/functions.sh" +} + +# Run dotfiles script, then source. +function dotfiles() { + $DOTFILES/bin/dotfiles "$@" && src +} + +src + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + + +# If you come from bash you might have to change your $PATH. +export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes +ZSH_THEME="powerlevel10k/powerlevel10k" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to automatically update without prompting. +# DISABLE_UPDATE_PROMPT="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS=true + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="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. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +HIST_STAMPS="yyyy-mm-dd" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git zsh-autosuggestions) + +source $ZSH/oh-my-zsh.sh + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +export PYENV_ROOT="$HOME/.pyenv" +export PATH="$PYENV_ROOT/bin:$PATH" +if command -v pyenv 1>/dev/null 2>&1; then + eval "$(pyenv init -)" +fi + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +export SHELL=/bin/zsh + +# Extra local aliases and such +source $HOME/.extra + diff --git a/source/aliases.sh b/source/aliases.sh index c43c3c1..1ac0b6a 100644 --- a/source/aliases.sh +++ b/source/aliases.sh @@ -126,3 +126,6 @@ alias timepy="python -m timeit" # Shorter dotfile update command alias dot="dotfiles" + +# Pasteboard length +alias pbc="pbpaste | wc -c" diff --git a/source/misc.sh b/source/misc.sh index 4ed01dd..91d4e6b 100644 --- a/source/misc.sh +++ b/source/misc.sh @@ -40,5 +40,8 @@ command -v brew >/dev/null 2>&1 && [ -f $(brew --prefix)/etc/profile.d/z.sh ] && # Source liquidprompt from vendor directory [[ $- = *i* ]] && source $HOME/.dotfiles/vendor/liquidprompt/liquidprompt +# Alias hub as git if installed +command -v hub >/dev/null 2>&1 && eval "$(hub alias -s)" + # Return true so first prompt uses 0 as last exit code true