Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update install for M1 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -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 <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>

" Disable Arrow keys in Insert mode
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>

" 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 <Leader><Tab> :call VexToggle(getcwd())<CR>
noremap <Leader>` :call VexToggle("")<CR
" tree listing by default
let g:netrw_liststyle=3
" open files in right window by default
let g:netrw_chgwin=1
" remap shift-enter to fire up the sidebar
nnoremap <silent> <S-CR> :rightbelow 20vs<CR>:e .<CR>
" the same remap as above - may be necessary in some distros
nnoremap <silent> <C-M> :rightbelow 20vs<CR>:e .<CR>

" 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<C-R><C-W>\b"<CR>:cw<CR>

nnoremap \ :Ag<SPACE>

" Allow for per-project vim configuration files.
set exrc

" Secure only though.
set secure
9 changes: 9 additions & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -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=(
Expand All @@ -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"
Expand All @@ -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
41 changes: 7 additions & 34 deletions bin/common/functions.sh
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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.
Expand All @@ -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=(
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -443,4 +416,4 @@ function set_mac_preferences() {
function update_dotfile_submodules() {
echo "Updating Dotfile submodules..."
dotfiles submodule update --init --recursive
}
}