From e9ec336d236dd30287c19f1542812b73d5d7f1c8 Mon Sep 17 00:00:00 2001 From: Lucas Rinaldi Date: Mon, 16 Dec 2024 19:33:29 -0300 Subject: [PATCH] More --- .Brewfile##os.Darwin | 14 +- .aliases | 12 +- .bash_profile | 34 +--- .iterm2/com.googlecode.iterm2.plist | 266 ++++++++++++---------------- .zshrc | 72 ++++++-- 5 files changed, 192 insertions(+), 206 deletions(-) diff --git a/.Brewfile##os.Darwin b/.Brewfile##os.Darwin index 78b4ae6..5858e07 100644 --- a/.Brewfile##os.Darwin +++ b/.Brewfile##os.Darwin @@ -26,8 +26,11 @@ brew "git-lfs" brew "rename" brew "tree" brew "fd" -brew "asdf" +# brew "asdf" brew "yadm" + +# Zsh custom plugins +brew "zsh-autosuggestions" brew "zsh-completions" # Easier documentation for bash commands @@ -58,10 +61,15 @@ cask "firefox" cask "google-chrome" cask "google-drive" cask "tomatobar" -cask "1password" -cask "lunar" +# cask "1password" +# cask "betterdisplay" +# cask "lunar" cask "obsidian" cask "calibre" +cask "marta" +cask "iina" +cask "jordanbaird-ice" +cask "stats" # cask "cron" # cask "docker" diff --git a/.aliases b/.aliases index 0250353..3049630 100644 --- a/.aliases +++ b/.aliases @@ -75,6 +75,17 @@ alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && kil alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" +# Quickly access dotfiles +alias dotals="${=EDITOR} ~/.aliases" +alias dotboot="${=EDITOR} ~/.config/yadm/bootstrap" +alias dotbrew="${=EDITOR} ~/.Brewfile" +alias dotexp="${=EDITOR} ~/.exports" +alias dotfun="${=EDITOR} ~/.functions" +alias dotmacos="${=EDITOR} ~/.macos" +alias dotrc="${=EDITOR} ~/.zshrc" + +# Command-line GUI tool to handle git operations +alias lg="lazygit" ############################################################################### # Cleanup # @@ -120,4 +131,3 @@ alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.ar # list open internet files and its ports alias listport="lsof -i" -alias lg="lazygit" diff --git a/.bash_profile b/.bash_profile index c131961..b86a6d7 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,34 +1,6 @@ -# Case-insensitive globbing (used in pathname expansion) -shopt -s nocaseglob -# Append to the Bash history file, rather than overwriting it -shopt -s histappend -# Autocorrect typos in path names when using `cd` -shopt -s cdspell +if [ -f ~/.bashrc ]; then + source ~/.bashrc +fi -# Enable some Bash 4 features when possible: -# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux` -# * Recursive globbing, e.g. `echo **/*.txt` -for option in autocd globstar; do - shopt -s "$option" 2> /dev/null -done - -# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards -[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh - -BREW_PREFIX=$(brew --prefix) - -# Add tab completion for many Bash commands -test -f /etc/bash_completion && . /etc/bash_completion -test -f $BREW_PREFIX/etc/bash_completion && . $BREW_PREFIX/etc/bash_completion -test -f $BREW_PREFIX/etc/profile.d/bash_completion.sh && . $BREW_PREFIX/etc/profile.d/bash_completion.sh - -# Git auto complete -test -f ~/.git-completion.bash && . ~/.git-completion.bash - -# NPM Auto Completion -type npm >/dev/null 2>&1 && . <(npm completion) - -# Add `killall` tab completion for common apps -complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; diff --git a/.iterm2/com.googlecode.iterm2.plist b/.iterm2/com.googlecode.iterm2.plist index 4c01bfe..901ebc8 100644 --- a/.iterm2/com.googlecode.iterm2.plist +++ b/.iterm2/com.googlecode.iterm2.plist @@ -2,6 +2,8 @@ + ClickToSelectCommand + Custom Color Presets 3024 Day @@ -88984,241 +88986,207 @@ Ansi 0 Color - Alpha Component - 1 Blue Component - 0.0 + 0.26666666666666999 Color Space - Calibrated + sRGB Green Component - 0.0 + 0.23137254901960999 Red Component - 0.0 + 0.22352941176471 Ansi 1 Color - Alpha Component - 1 Blue Component - 0.56078433990478516 + 0.42745098039216001 Color Space - Calibrated + sRGB Green Component - 0.094117648899555206 + 0.30980392156863001 Red Component - 0.96470588445663452 + 0.78823529411765003 Ansi 10 Color - Alpha Component - 1 Blue Component - 0.25490197539329529 + 0.64313725490196005 Color Space - Calibrated + sRGB Green Component - 0.75686275959014893 + 0.72941176470587998 Red Component - 0.14509804546833038 + 0.55686274509804001 Ansi 11 Color - Alpha Component - 1 Blue Component - 0.32941177487373352 + 0.53725490196077996 Color Space - Calibrated + sRGB Green Component - 0.95686274766921997 + 0.78823529411765003 Red Component - 0.99215686321258545 + 0.87843137254902004 Ansi 12 Color - Alpha Component - 1 Blue Component - 0.92941176891326904 + 0.86274509803921995 Color Space - Calibrated + sRGB Green Component - 0.61568629741668701 + 0.67058823529412004 Red Component - 0.18431372940540314 + 0.52549019607842995 Ansi 13 Color - Alpha Component - 1 Blue Component - 0.21568627655506134 + 0.88627450980391997 Color Space - Calibrated + sRGB Green Component - 0.44313725829124451 + 0.63137254901961004 Red Component - 0.97647058963775635 + 0.72941176470587998 Ansi 14 Color - Alpha Component - 1 Blue Component - 0.90196079015731812 + 0.83921568627451004 Color Space - Calibrated + sRGB Green Component - 0.80392158031463623 + 0.83529411764705996 Red Component - 0.098039217293262482 + 0.47843137254902002 Ansi 15 Color - Alpha Component - 1 Blue Component - 1 + 0.89803921568626999 Color Space - Calibrated + sRGB Green Component - 1 + 0.89411764705882002 Red Component - 1 + 0.89411764705882002 Ansi 2 Color - Alpha Component - 1 Blue Component - 0.16862745583057404 + 0.60392156862744995 Color Space - Calibrated + sRGB Green Component - 0.73333334922790527 + 0.69803921568627003 Red Component - 0.11764705926179886 + 0.50588235294118 Ansi 3 Color - Alpha Component - 1 Blue Component - 0.20392157137393951 + 0.45490196078431 Color Space - Calibrated + sRGB Green Component - 0.97254902124404907 + 0.75294117647059 Red Component - 0.99215686321258545 + 0.85882352941175999 Ansi 4 Color - Alpha Component - 1 Blue Component - 0.92549020051956177 + 0.83921568627451004 Color Space - Calibrated + sRGB Green Component - 0.52549022436141968 + 0.61176470588234999 Red Component - 0.12941177189350128 + 0.44313725490195999 Ansi 5 Color - Alpha Component - 1 Blue Component - 0.12941177189350128 + 0.83921568627451004 Color Space - Calibrated + sRGB Green Component - 0.35294118523597717 + 0.47450980392156999 Red Component - 0.97254902124404907 + 0.61568627450979996 Ansi 6 Color - Alpha Component - 1 Blue Component - 0.88627451658248901 + 0.81176470588234995 Color Space - Calibrated + sRGB Green Component - 0.76470589637756348 + 0.80392156862745001 Red Component - 0.070588238537311554 + 0.38823529411765001 Ansi 7 Color - Alpha Component - 1 Blue Component - 1 + 0.87843137254902004 Color Space - Calibrated + sRGB Green Component - 1 + 0.87450980392156996 Red Component - 1 + 0.87450980392156996 Ansi 8 Color - Alpha Component - 1 Blue Component - 0.0 + 0.37647058823529 Color Space - Calibrated + sRGB Green Component - 0.0 + 0.34509803921568999 Red Component - 0.0 + 0.34117647058824002 Ansi 9 Color - Alpha Component - 1 Blue Component - 0.62745100259780884 + 0.51372549019608005 Color Space - Calibrated + sRGB Green Component - 0.25490197539329529 + 0.41176470588234998 Red Component - 0.97254902124404907 + 0.81960784313724999 BM Growl Background Color - Alpha Component - 1 Blue Component - 0.0 + 0.18823529411765 Color Space - Calibrated + sRGB Green Component - 0.0 + 0.13725490196078 Red Component - 0.0 + 0.098039215686274994 Background Image Location Badge Color Alpha Component - 0.50196078431372548 + 0.5 Blue Component - 0.55990481376647949 + 0.0 Color Space - Calibrated + sRGB Green Component - 0.12854912877082825 + 0.14910030364990234 Red Component - 0.95228904485702515 + 1 Blinking Cursor @@ -89226,16 +89194,14 @@ Bold Color - Alpha Component - 1 Blue Component - 0.78039216995239258 + 0.81176470588234995 Color Space - Calibrated + sRGB Green Component - 0.85098040103912354 + 0.80784313725489998 Red Component - 0.85490196943283081 + 0.80392156862745001 Brighten Bold Text @@ -89249,42 +89215,38 @@ Cursor Color - Alpha Component - 1 Blue Component - 0.90196079015731812 + 0.81176470588234995 Color Space - Calibrated + sRGB Green Component - 0.80392158031463623 + 0.80784313725489998 Red Component - 0.098039217293262482 + 0.80392156862745001 Cursor Guide Color Alpha Component - 0.25098039215686274 + 0.25 Blue Component - 0.87706279754638672 + 1 Color Space - Calibrated + sRGB Green Component - 0.76422178745269775 + 0.92681378126144409 Red Component - 0.12722404301166534 + 0.70214027166366577 Cursor Text Color - Alpha Component - 1 Blue Component - 0.78039216995239258 + 0.18823529411765 Color Space - Calibrated + sRGB Green Component - 0.85098040103912354 + 0.13725490196078 Red Component - 0.85490196943283081 + 0.098039215686274994 Custom Command No @@ -89302,16 +89264,14 @@ Foreground Color - Alpha Component - 1 Blue Component - 0.78039216995239258 + 0.81176470588234995 Color Space - Calibrated + sRGB Green Component - 0.85098040103912354 + 0.80784313725489998 Red Component - 0.85490196943283081 + 0.80392156862745001 Guid DAA9A892-D2C4-40EE-8682-E4327CAFFE62 @@ -89624,13 +89584,13 @@ Alpha Component 1 Blue Component - 0.49411764740943909 + 0.73422706127166748 Color Space - Calibrated + sRGB Green Component - 0.17647059261798859 + 0.35915294289588928 Red Component - 0.35686275362968445 + 0.0 Mouse Reporting @@ -89656,29 +89616,25 @@ 1000 Selected Text Color - Alpha Component - 1 Blue Component - 0.0 + 0.81176470588234995 Color Space - Calibrated + sRGB Green Component - 0.0 + 0.80784313725489998 Red Component - 0.0 + 0.80392156862745001 Selection Color - Alpha Component - 1 Blue Component - 0.90196079015731812 + 0.31764705882353 Color Space - Calibrated + sRGB Green Component - 0.80392158031463623 + 0.23137254901960999 Red Component - 0.098039217293262482 + 0.16862745098039 Send Code When Idle @@ -89758,12 +89714,16 @@ PromptOnQuit ShowFullScreenTabBar - + SoundForEsc VisualIndicatorForEsc findMode_iTerm 0 + kCPKSelectionViewPreferredModeKey + 0 + kCPKSelectionViewShowHSBTextFieldsKey + diff --git a/.zshrc b/.zshrc index f989400..9fa30f4 100644 --- a/.zshrc +++ b/.zshrc @@ -11,13 +11,6 @@ export PATH="$HOME/bin:$PATH"; # `/usr/local/bin` export PATH="/usr/local/bin:$PATH" -# `pnpm``path -export PNPM_HOME="/Users/lhrinaldi/Library/pnpm" -case ":$PATH:" in - *":$PNPM_HOME:"*) ;; - *) export PATH="$PNPM_HOME:$PATH" ;; -esac - # Add gnubin for `coreutils`, `findutils` and `gnu-sed` packages export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH" export PATH="$(brew --prefix findutils)/libexec/gnubin:$PATH" @@ -47,15 +40,18 @@ export SPACESHIP_CONFIG="$HOME/.config/zsh/spaceship.zsh" # If set to an empty array, this variable will have no effect. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "eastwood" "emotty" "frisk" "geoffgarside" ) +# ------------------------------- +# zsh-completions +# ------------------------------- # -# To enable completions, add the following to your .zshrc: +#To enable completions, add the following to your .zshrc: # -if type brew &>/dev/null; then - FPATH=$(brew --prefix)/share/zsh-completions:$FPATH - - autoload -Uz compinit - compinit -fi +# if type brew &>/dev/null; then +# FPATH=$(brew --prefix)/share/zsh-completions:$FPATH +# +# autoload -Uz compinit +# compinit +# fi # # You may also need to force rebuild `zcompdump`: # @@ -70,6 +66,18 @@ fi # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" +# ------------------------------- +# zsh-autosuggestions +# ------------------------------- +# To activate the autosuggestions, add the following at the end of your .zshrc: +# +source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh +# +# You will also need to restart your terminal for this change to take effect. + +# ------------------------------- +# ZSH configuration +# ------------------------------- # Uncomment the following line to use hyphen-insensitive completion. # Case-sensitive completion must be off. _ and - will be interchangeable. # HYPHEN_INSENSITIVE="true" @@ -99,6 +107,10 @@ fi # see 'man strftime' for details. # HIST_STAMPS="mm/dd/yyyy" + +# ------------------------------- +# ZSH plugins +# ------------------------------- # Which plugins would you like to load? # Standard plugins can be found in $ZSH/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/ @@ -106,15 +118,13 @@ fi # Add wisely, as too many plugins slow down shell startup. plugins=( aliases - asdf colored-man-pages - fd fzf # Fuzzy search config gh git - httpie macos # See https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/macos npm + nvm node vscode z # Jump around @@ -126,7 +136,6 @@ source $ZSH/oh-my-zsh.sh # User configuration # ############################################################################### - export LANG='en_US.UTF-8'; export LC_ALL='en_US.UTF-8'; @@ -148,3 +157,30 @@ for file in ~/.{aliases,functions}; do [ -r "$file" ] && [ -f "$file" ] && source "$file" done unset file + +# ------------------------------- +# tabtab (added by `pnpm install-completion zsh` command) +# ------------------------------- +[[ -f ~/.config/tabtab/zsh/__tabtab.zsh ]] && . ~/.config/tabtab/zsh/__tabtab.zsh || true + +# ------------------------------- +# nvm +# ------------------------------- +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +# ------------------------------- +# pnpm +# ------------------------------- +export PNPM_HOME="/Users/lhrinaldi/Library/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac + +# ------------------------------- +# yvm +# ------------------------------- +export YVM_DIR=/Users/lhrinaldi/.yvm +[ -r $YVM_DIR/yvm.sh ] && . $YVM_DIR/yvm.sh