From 616c23ccd0902449de29702d57eab5059c3596cb Mon Sep 17 00:00:00 2001 From: Scott Weaver Date: Wed, 6 Apr 2022 17:04:34 -0700 Subject: [PATCH] chore: Update install for M1 --- .vimrc | 100 ---------------------------------------- .zshrc | 9 ++++ bin/common/functions.sh | 41 +++------------- 3 files changed, 16 insertions(+), 134 deletions(-) diff --git a/.vimrc b/.vimrc index a9e91d6..28ad9f7 100644 --- a/.vimrc +++ b/.vimrc @@ -1,101 +1 @@ syntax enable - -" Enable mouse usage and scrolling. -set mouse=a -if has("mouse_sgr") - set ttymouse=sgr -else - set ttymouse=xterm2 -end - -" No wrapping, please. -set nowrap - -" Turn on modeline (settings per file). -set modeline -set modelines=1 - -" Change leader to comma. -let mapleader = "," - -" Status Line -" set statusline=[%n]\ %<%.99f\ %h%w%m%r%{exists('*CapsLockStatusline')?CapsLockStatusline():''}%y%=%-16(\ %l,%c-%v\ %)%P -set statusline=\PATH:\ %r%F\ \ \ \ \LINE:\ %l/%L/%P\ TIME:\ %{strftime('%c')} - -" Always display status line -set laststatus=2 - -" Disable Arrow keys in Escape mode -map -map -map -map - -" Disable Arrow keys in Insert mode -imap -imap -imap -imap - -" Netrw basic configuration. -let g:netrw_banner=0 -" let g:netrw_list_hide = '\(^\|\s\s\)\zs\.\S\+,\(^\|\s\s\)ntuser\.\S\+' -autocmd FileType netrw set nolist -noremap :call VexToggle(getcwd()) -noremap ` :call VexToggle("") :rightbelow 20vs:e . -" the same remap as above - may be necessary in some distros -nnoremap :rightbelow 20vs:e . - -" Automatically open the file explorer -" autocmd VimEnter * :rightbelow 20vs -" autocmd VimEnter * :e . -" autocmd VimEnter * wincmd w - -" Specify a directory for plugins -call plug#begin('~/.vim/plugged') - -" Make sure you use single quotes - -" fzf -Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -Plug 'junegunn/fzf.vim' - -" surround.vim -Plug 'tpope/vim-surround' - -" list buffers in status plugin. -Plug 'bling/vim-bufferline' - -" bufexplorer. -Plug 'jlanzarotta/bufexplorer' - -call plug#end() - -" The Silver Searcher -if executable('ag') - " Use ag over grep - set grepprg=ag\ --nogroup\ --nocolor - - " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore - let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' - - " ag is fast enough that CtrlP doesn't need to cache - let g:ctrlp_use_caching = 0 -endif - -" bind K to grep word under cursor. -nnoremap K :grep! "\b\b":cw - -nnoremap \ :Ag - -" Allow for per-project vim configuration files. -set exrc - -" Secure only though. -set secure diff --git a/.zshrc b/.zshrc index 1e29356..8b603fa 100644 --- a/.zshrc +++ b/.zshrc @@ -10,6 +10,7 @@ export ZSH=$HOME/.oh-my-zsh # Path to your oh-my-zsh installation. DEFAULT_USER=scott ZSH_CUSTOM=$HOME/.zsh_custom HOMEBREW_CASK_OPTS="--appdir=/Applications" # brew cask directory +export DOCKER_DEFAULT_PLATFORM=linux/amd64 # Enable plugins. plugins=( @@ -21,6 +22,8 @@ plugins=( source $ZSH/oh-my-zsh.sh +fpath+=$HOME/.zsh/pure + # Custom Sources for file in $ZSH_CUSTOM/sourced/*; do source "$file" @@ -45,3 +48,9 @@ if ([ $? -eq 0 ]) && ([[ -e $COLORLS_PATH/tab_complete.sh ]]); then alias ll='colorls --group-directories-first --almost-all --long' alias ls='colorls' fi + +eval $(/opt/homebrew/bin/brew shellenv) + +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 diff --git a/bin/common/functions.sh b/bin/common/functions.sh index 9d495cb..d050042 100644 --- a/bin/common/functions.sh +++ b/bin/common/functions.sh @@ -1,16 +1,12 @@ cask_apps=( # Browsers - brave-browser # Brave is so brave. firefox # Firefox. google-chrome # Google Chrome browser. microsoft-edge # Microsoft Edge browser. By Microsoft. # Communications - discord # Freeware chat/VoIP app, primarily for video game communities. slack # Communications platform. - telegram-desktop # Secure instant messaging. - whatsapp # Simple, secure messaging with free phone calling. - zoomus # Video conferencing software. + zoom # Video conferencing software. # Dev cyberduck # File transfers (FileZilla is evil) @@ -20,9 +16,7 @@ cask_apps=( kitematic # Docker GUI. "local" # WordPress development tool. jetbrains-toolbox # JetBrains tools manager (mainly for PHPStorm). - phpstorm # The best PHP IDE there is. postman # API interaction tool. - sequel-pro # The best database management tool. sublime-text # Sublime Text is a cross-platform source code editor with a Python. trailer # Github workflow menubar app. visual-studio-code # Source code editor developed by Microsoft. @@ -31,35 +25,15 @@ cask_apps=( 1password # Digital password manager and vault. 1password-cli # Command line tool for 1Password. alfred # Spotlight replacement and productivity tool. - bartender # Organize your menu bar icons (NOTE: Dozer is a free alternative). charles # HTTP proxy monitor. See all the traffic. # rectangle # Move/resize windows. Based on Spectacle / written in Swift. spectacle # Move/resize windows. - timing # Automatic time tracking. tripmode # Controls which apps can access Internet connection. - - # Misc - bitbar # Put the output from any script/program in your Mac OS X Menu Bar. - gfxcardstatus # Menu bar app to visualize current GPU and memory hogs. - google-photos-backup-and-sync # Google Photos backup and sync manager. - horos # Free, open medical image viewer. - minecraft # Minecraft game. Sometimes I need a mental break. - omnidisksweeper # Quickly find large, unwanted files and destroy them (manually). - steam # Steam gaming platform. - transmission # Free, open torrent client. - - # Security - backblaze # Backup software. - malwarebytes # Anti-virus. - private-internet-access # VPN software. - - # Video - vlc # Free, open cross-platform media player. ) mac_store_apps=( # 918207447 # Annotate - Capture and Share - 409789998 # Twitter + # 409789998 # Twitter ) brew_apps=( @@ -73,9 +47,8 @@ brew_apps=( jq # jq is a lightweight and flexible command-line JSON processor. mas # Mac App Store command-line interface. node # Node.js. A platform built on V8 for network applications. - oracle-sdk # Java Software Development Kit (for running things like Minecraft) php # PHP (Latest). - php@7.2 # PHP (7.2). + php@8.0 # PHP (7.2). python # Python. ruby # Ruby. tldr # Simplified and community-driven man pages. @@ -362,9 +335,9 @@ function install_mac_apps() { setup_app_dir=${setup_app_dir:-/Applications/} echo "Installing applications to ${setup_app_dir}..." - brew cask install --appdir=$setup_app_dir ${cask_apps[@]} + brew install --cask --appdir=$setup_app_dir ${cask_apps[@]} - brew cask alfred link + brew alfred link else echo "Skipping..." fi @@ -381,7 +354,7 @@ function update_mac_apps() { setup_app_dir=${setup_app_dir:-/Applications/} echo "Installing applications to ${setup_app_dir}..." - brew cask install --appdir=$setup_app_dir ${cask_apps[@]} + brew install --cask --appdir=$setup_app_dir ${cask_apps[@]} echo "Updating out of date casks..." brew upgrade --cask @@ -443,4 +416,4 @@ function set_mac_preferences() { function update_dotfile_submodules() { echo "Updating Dotfile submodules..." dotfiles submodule update --init --recursive -} \ No newline at end of file +}