From f7b2e9e7fe39b21e868c81597bacad1af2fe7df3 Mon Sep 17 00:00:00 2001 From: Josh Patra <30350506+SoPat712@users.noreply.github.com> Date: Sat, 18 May 2024 18:10:39 -0400 Subject: [PATCH] zshrc cleanup, tmux fix, iterm update --- iTerm/settings/com.googlecode.iterm2.plist | 752 +++++++++++++++++++++ tmux/.tmux.conf | 1 - zsh/.zshrc | 193 ++---- 3 files changed, 800 insertions(+), 146 deletions(-) diff --git a/iTerm/settings/com.googlecode.iterm2.plist b/iTerm/settings/com.googlecode.iterm2.plist index 557cbea..936d011 100644 --- a/iTerm/settings/com.googlecode.iterm2.plist +++ b/iTerm/settings/com.googlecode.iterm2.plist @@ -3861,6 +3861,758 @@ Working Directory /Users/joshp + + ASCII Anti Aliased + + Ambiguous Double Width + + Ansi 0 Color + + Alpha Component + 1 + Blue Component + 0.18431372549019609 + Color Space + sRGB + Green Component + 0.1254901960784314 + Red Component + 0.1137254901960784 + + Ansi 1 Color + + Alpha Component + 1 + Blue Component + 0.55686274509803924 + Color Space + sRGB + Green Component + 0.46274509803921571 + Red Component + 0.96862745098039216 + + Ansi 10 Color + + Alpha Component + 1 + Blue Component + 0.41568627450980389 + Color Space + sRGB + Green Component + 0.80784313725490198 + Red Component + 0.61960784313725492 + + Ansi 11 Color + + Alpha Component + 1 + Blue Component + 0.40784313725490201 + Color Space + sRGB + Green Component + 0.68627450980392157 + Red Component + 0.8784313725490196 + + Ansi 12 Color + + Alpha Component + 1 + Blue Component + 0.96862745098039216 + Color Space + sRGB + Green Component + 0.63529411764705879 + Red Component + 0.47843137254901957 + + Ansi 13 Color + + Alpha Component + 1 + Blue Component + 0.96862745098039216 + Color Space + sRGB + Green Component + 0.60392156862745094 + Red Component + 0.73333333333333328 + + Ansi 14 Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 0.81176470588235294 + Red Component + 0.49019607843137247 + + Ansi 15 Color + + Alpha Component + 1 + Blue Component + 0.96078431372549022 + Color Space + sRGB + Green Component + 0.792156862745098 + Red Component + 0.75294117647058822 + + Ansi 2 Color + + Alpha Component + 1 + Blue Component + 0.41568627450980389 + Color Space + sRGB + Green Component + 0.80784313725490198 + Red Component + 0.61960784313725492 + + Ansi 3 Color + + Alpha Component + 1 + Blue Component + 0.40784313725490201 + Color Space + sRGB + Green Component + 0.68627450980392157 + Red Component + 0.8784313725490196 + + Ansi 4 Color + + Alpha Component + 1 + Blue Component + 0.96862745098039216 + Color Space + sRGB + Green Component + 0.63529411764705879 + Red Component + 0.47843137254901957 + + Ansi 5 Color + + Alpha Component + 1 + Blue Component + 0.96862745098039216 + Color Space + sRGB + Green Component + 0.60392156862745094 + Red Component + 0.73333333333333328 + + Ansi 6 Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 0.81176470588235294 + Red Component + 0.49019607843137247 + + Ansi 7 Color + + Alpha Component + 1 + Blue Component + 0.83921568627450982 + Color Space + sRGB + Green Component + 0.69411764705882351 + Red Component + 0.66274509803921566 + + Ansi 8 Color + + Alpha Component + 1 + Blue Component + 0.40784313725490201 + Color Space + sRGB + Green Component + 0.28235294117647058 + Red Component + 0.25490196078431371 + + Ansi 9 Color + + Alpha Component + 1 + Blue Component + 0.55686274509803924 + Color Space + sRGB + Green Component + 0.46274509803921571 + Red Component + 0.96862745098039216 + + BM Growl + + Background Color + + Alpha Component + 1 + Blue Component + 0.23137254901960791 + Color Space + sRGB + Green Component + 0.15686274509803921 + Red Component + 0.14117647058823529 + + Background Image Location + + Badge Color + + Alpha Component + 0.5 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.1491314172744751 + Red Component + 1 + + Blend + 1 + Blinking Cursor + + Blur + + Bold Color + + Alpha Component + 1 + Blue Component + 0.61176470588235299 + Color Space + sRGB + Green Component + 0.73725490196078436 + Red Component + 0.1019607843137255 + + Bound Hosts + + Character Encoding + 4 + Close Sessions On End + + Columns + 100 + Command + automux qbit + Cursor Color + + Alpha Component + 1 + Blue Component + 0.96078431372549022 + Color Space + sRGB + Green Component + 0.792156862745098 + Red Component + 0.75294117647058822 + + Cursor Guide Color + + Alpha Component + 0.25 + Blue Component + 0.96078431372549022 + Color Space + sRGB + Green Component + 0.792156862745098 + Red Component + 0.75294117647058822 + + Cursor Text Color + + Alpha Component + 1 + Blue Component + 0.23137254901960791 + Color Space + sRGB + Green Component + 0.15686274509803921 + Red Component + 0.14117647058823529 + + Custom Command + No + Custom Directory + No + Custom Tab Title + + Custom Window Title + asdfasdfasdf + Default Bookmark + No + Description + Default + Disable Smcup Rmcup + + Disable Window Resizing + + Draw Powerline Glyphs + + Flashing Bell + + Foreground Color + + Alpha Component + 1 + Blue Component + 0.96078431372549022 + Color Space + sRGB + Green Component + 0.792156862745098 + Red Component + 0.75294117647058822 + + Guid + 7C64F00F-926C-477D-A6F0-EF54D56262B0 + Horizontal Spacing + 1 + Idle Code + 0 + Initial Text + automux qbit + Jobs to Ignore + + rlogin + ssh + slogin + telnet + + Keyboard Map + + 0x2d-0x40000 + + Action + 11 + Text + 0x1f + + 0x32-0x40000 + + Action + 11 + Text + 0x00 + + 0x33-0x40000 + + Action + 11 + Text + 0x1b + + 0x34-0x40000 + + Action + 11 + Text + 0x1c + + 0x35-0x40000 + + Action + 11 + Text + 0x1d + + 0x36-0x40000 + + Action + 11 + Text + 0x1e + + 0x37-0x40000 + + Action + 11 + Text + 0x1f + + 0x38-0x40000 + + Action + 11 + Text + 0x7f + + 0xf700-0x220000 + + Action + 10 + Text + [1;2A + + 0xf700-0x240000 + + Action + 10 + Text + [1;5A + + 0xf700-0x260000 + + Action + 10 + Text + [1;6A + + 0xf700-0x280000 + + Action + 11 + Text + 0x1b 0x1b 0x5b 0x41 + + 0xf701-0x220000 + + Action + 10 + Text + [1;2B + + 0xf701-0x240000 + + Action + 10 + Text + [1;5B + + 0xf701-0x260000 + + Action + 10 + Text + [1;6B + + 0xf701-0x280000 + + Action + 11 + Text + 0x1b 0x1b 0x5b 0x42 + + 0xf702-0x220000 + + Action + 10 + Text + [1;2D + + 0xf702-0x240000 + + Action + 10 + Text + [1;5D + + 0xf702-0x260000 + + Action + 10 + Text + [1;6D + + 0xf702-0x280000 + + Action + 11 + Text + 0x1b 0x1b 0x5b 0x44 + + 0xf703-0x220000 + + Action + 10 + Text + [1;2C + + 0xf703-0x240000 + + Action + 10 + Text + [1;5C + + 0xf703-0x260000 + + Action + 10 + Text + [1;6C + + 0xf703-0x280000 + + Action + 11 + Text + 0x1b 0x1b 0x5b 0x43 + + 0xf704-0x20000 + + Action + 10 + Text + [1;2P + + 0xf705-0x20000 + + Action + 10 + Text + [1;2Q + + 0xf706-0x20000 + + Action + 10 + Text + [1;2R + + 0xf707-0x20000 + + Action + 10 + Text + [1;2S + + 0xf708-0x20000 + + Action + 10 + Text + [15;2~ + + 0xf709-0x20000 + + Action + 10 + Text + [17;2~ + + 0xf70a-0x20000 + + Action + 10 + Text + [18;2~ + + 0xf70b-0x20000 + + Action + 10 + Text + [19;2~ + + 0xf70c-0x20000 + + Action + 10 + Text + [20;2~ + + 0xf70d-0x20000 + + Action + 10 + Text + [21;2~ + + 0xf70e-0x20000 + + Action + 10 + Text + [23;2~ + + 0xf70f-0x20000 + + Action + 10 + Text + [24;2~ + + 0xf729-0x20000 + + Action + 10 + Text + [1;2H + + 0xf729-0x40000 + + Action + 10 + Text + [1;5H + + 0xf72b-0x20000 + + Action + 10 + Text + [1;2F + + 0xf72b-0x40000 + + Action + 10 + Text + [1;5F + + + Left Option Key Changeable + + Link Color + + Alpha Component + 1 + Blue Component + 0.792156862745098 + Color Space + sRGB + Green Component + 0.85490196078431369 + Red Component + 0.45098039215686281 + + Minimum Contrast + 0.0 + Mouse Reporting + + Name + qbit + Non Ascii Font + Monaco 12 + Non-ASCII Anti Aliased + + Normal Font + MesloLGS-NF-Regular 17 + Only The Default BG Color Uses Transparency + + Option Key Sends + 2 + Prevent Opening in a Tab + + Prompt Before Closing 2 + + Right Option Key Changeable + + Right Option Key Sends + 2 + Rows + 35 + Screen + -1 + Scrollback Lines + 0 + Selected Text Color + + Alpha Component + 1 + Blue Component + 0.96078431372549022 + Color Space + sRGB + Green Component + 0.792156862745098 + Red Component + 0.75294117647058822 + + Selection Color + + Alpha Component + 1 + Blue Component + 0.39215686274509798 + Color Space + sRGB + Green Component + 0.23529411764705879 + Red Component + 0.1803921568627451 + + Send Code When Idle + + Shortcut + + Silence Bell + + Sync Title + + Tags + + Terminal Type + xterm-256color + Transparency + 0.0 + Unlimited Scrollback + + Use Bold Font + + Use Bright Bold + + Use Cursor Guide + + Use Custom Tab Title + + Use Custom Window Title + + Use Italic Font + + Use Non-ASCII Font + + Vertical Spacing + 1 + Visual Bell + + Window Type + 0 + Working Directory + /Users/joshp + OpenArrangementAtStartup diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index f9dec93..b3b2cf3 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -99,7 +99,6 @@ set -g @dracula-plugins "git battery time date" set -g @dracula-show-location false set -g @dracula-show-flags true set -g @dracula-show-left-icon session -set -g @continuum-restore 'on' #show -g default-command for vim set -g @resurrect-strategy-vim 'session' diff --git a/zsh/.zshrc b/zsh/.zshrc index 0b5403a..544c005 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,127 +1,45 @@ +# Environment variables export GPG_TTY=$TTY -gpgconf --launch gpg-agent export BAT_THEME="Enki-Tokyo-Night" - -# history stuff export HISTSIZE=5000 export SAVEHIST=10000 export HISTFILE=~/.cache/zsh/.zsh_history -setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format. -setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. -setopt SHARE_HISTORY # Share history between all sessions. -setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history. -setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again. - -source ~/Projects/zsh-autocomplete/zsh-autocomplete.plugin.zsh -# 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 - -# 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" +export SOLARIZED_THEME="dark" +export ET_NO_TELEMETRY=FALSE +export PATH="$HOME/.pyenv/bin:$PATH" +export PATH="$HOME/.cargo/bin:$PATH" +export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git" +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git" +export FZF_CTRL_T_OPTS="--preview 'bat -n --color=always --line-range :500 {}'" +export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head -200'" -# 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" -SOLARIZED_THEME="dark" +# History settings +setopt EXTENDED_HISTORY +setopt INC_APPEND_HISTORY +setopt SHARE_HISTORY +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_IGNORE_DUPS -# 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 one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 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. -# 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" - -# 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="mm/dd/yyyy" - -# 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 plugins=(git hacker-quotes) +# Source files +source ~/Projects/zsh-autocomplete/zsh-autocomplete.plugin.zsh +source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" source $ZSH/oh-my-zsh.sh +source ~/.p10k.zsh +source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +eval "$(zoxide init zsh)" +export ATUIN_NOBIND="true" +eval "$(atuin init zsh)" +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" +eval "$(fzf --zsh)" -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -if [[ -n $SSH_CONNECTION ]]; then - export EDITOR='vim' -else - export EDITOR='nvim' -fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases +# Aliases alias zshconfig="nvim ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" alias vim=nvim alias cd=z alias ls="eza --color=always --git --no-filesize --icons=always --no-time --no-user --no-permissions" @@ -129,52 +47,30 @@ alias ll="eza -alh" alias tree="eza --tree" alias cat=bat -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh -source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -# source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh -eval "$(zoxide init zsh)" -# zsh-autocomplete keybinds -bindkey '\t' menu-select "$terminfo[kcbt]" menu-select -bindkey -M menuselect '\t' menu-complete "$terminfo[kcbt]" reverse-menu-complete -# Atuin -eval "$(atuin init zsh)" -eval "$(atuin init zsh)" -# Eternal Terminal -export ET_NO_TELEMETRY=FALSE -export PATH="$HOME/.pyenv/bin:$PATH" -eval "$(pyenv init -)" -eval "$(pyenv virtualenv-init -)" - if [[ "$OSTYPE" == "darwin"* ]]; then +# OS-specific settings +if [[ "$OSTYPE" == "darwin"* ]]; then export PATH=$PATH:/Users/joshp/.spicetify -export DISPLAY=:0 + alias alluptd="mas list; mas upgrade; brew update; brew upgrade; brew cu --all; sudo port selfupdate; sudo port upgrade outdated" + export DISPLAY=:0 + source ~/fzf-git.sh/fzf-git.sh fi -eval "$(fzf --zsh)" - -export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git" -export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" -export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git" +# Editor settings +if [[ -n $SSH_CONNECTION ]]; then + export EDITOR='vim' +else + export EDITOR='nvim' +fi +# Functions _fzf_compgen_path() { fd --hidden --exclude .git . "$1" } -# Use fd to generate the list for directory completion _fzf_compgen_dir() { fd --type=d --hidden --exclude .git . "$1" } -if [[ "$OSTYPE" == "darwin"* ]]; then - source ~/fzf-git.sh/fzf-git.sh -fi - -export FZF_CTRL_T_OPTS="--preview 'bat -n --color=always --line-range :500 {}'" -export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head -200'" - -# Advanced customization of fzf options via _fzf_comprun function -# - The first argument to the function is the name of the command. -# - You should make sure to pass the rest of the arguments to fzf. _fzf_comprun() { local command=$1 shift @@ -186,3 +82,10 @@ _fzf_comprun() { *) fzf --preview "bat -n --color=always --line-range :500 {}" "$@" ;; esac } + +# Keybinds +bindkey '\t' menu-select "$terminfo[kcbt]" menu-select +bindkey -M menuselect '\t' menu-complete "$terminfo[kcbt]" reverse-menu-complete +bindkey '^r' atuin-search +bindkey '^[[A' atuin-up-search +bindkey '^[OA' atuin-up-search