diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 889799550..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "usbify"] - path = usbify - url = https://github.com/wpcarro/usbify.git diff --git a/configs/shared/.gitconfig b/configs/shared/.gitconfig index ffe42ef9b..d75fcb1ae 100644 --- a/configs/shared/.gitconfig +++ b/configs/shared/.gitconfig @@ -1,7 +1,6 @@ [user] name = William Carroll email = wpcarro@gmail.com - signingkey = C7A53CC58D3B1F8C [alias] recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format=\"%(refname:short)\" today = ! git log --date=relative --since=00:00:00 --all --no-merges --oneline --author=\"$(git config --get user.email)\" @@ -9,10 +8,6 @@ conflicts = diff --name-only --diff-filter=U yday = ! git log --name-only --since=yesterday.midnight --until=today.midnight --author=\"$(git config --get user.email)\" patch-grep = log -p -S -[commit] - gpgsign = true -[gpg] - program = gpg2 [credential] helper = osxkeychain [push] diff --git a/launchd_scripts/attempt_vim_switch.sh b/launchd_scripts/attempt_vim_switch.sh deleted file mode 100755 index 65f77c342..000000000 --- a/launchd_scripts/attempt_vim_switch.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - - -if [ -d /Volumes/usb_vim ] && \ # usb has mounted - [ ! -L "$HOME/.vimrc" ] && \ # .vimrc is a symlink - [ ! -L "$HOME/.vim" ]; then # .vim dir is a symlink - . "/Volumes/usb_vim/vim/vim_point_to_usb.sh" - . "$HOME/pc_settings/launchd_scripts/notice.sh" -else - . "$HOME/pc_settings/launchd_scripts/notice_2.sh" -fi - - diff --git a/launchd_scripts/bootstrap.sh b/launchd_scripts/bootstrap.sh deleted file mode 100755 index 0df2689ae..000000000 --- a/launchd_scripts/bootstrap.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - - -# Unload scripts in case there have been changes since it was last loaded. -echo -n "Unloading personal *.plist files... " && -launchctl unload ~/Library/LaunchAgents/watch_volumes.plist && -echo "Done." || echo "Error." - - -# Remove *.plist symlinks created last time. -echo -n "Removing *.plist symlinks... " && -rm ~/Library/LaunchAgents/watch_volumes.plist && -echo "Done." || echo "Error." - - -# Process the *.tpl files, replacing global identifiers with the values -# from vars.json. -echo -n "Processing *.tpl files... " && -. ./process_files.sh && -echo "Done." || echo "Error." - - -# Recreate those symlinks. -echo -n "Recreating *.plist symlinks to ~/Library/LaunchAgents ... " && -ln -s ~/pc_settings/launchd_scripts/watch_volumes.plist \ - ~/Library/LaunchAgents/watch_volumes.plist && -echo "Done." || echo "Error." - - -# Reload scripts in case there have been changes since it was last loaded. -echo -n "Reloading personal *.plist files... " && -launchctl load ~/Library/LaunchAgents/watch_volumes.plist && -echo "Done." || echo "Error." - diff --git a/launchd_scripts/notice.sh b/launchd_scripts/notice.sh deleted file mode 100755 index 1567be360..000000000 --- a/launchd_scripts/notice.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -osascript -e "tell Application \"System Events\" to display alert\ - \"New volume mounted.\"" - diff --git a/launchd_scripts/notice_2.sh b/launchd_scripts/notice_2.sh deleted file mode 100755 index 188ee813a..000000000 --- a/launchd_scripts/notice_2.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -osascript -e "tell Application \"System Events\" to display alert\ - \"Not going to switch!\"" - diff --git a/launchd_scripts/process_files.sh b/launchd_scripts/process_files.sh deleted file mode 100755 index a5e330d77..000000000 --- a/launchd_scripts/process_files.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# This script processes certain files and replaces -# {{}} with the entries in vars.json - -output_path="./watch_volumes.plist" -template_file="watch_volumes.plist.tpl" -usb_drive_path=$(jq < ./vars.json '.USB_DRIVE_PATH' | \ - sed 's/\//\\\//g' | sed 's/"//g') - -cat "$template_file" | perl -p -e 's/(\{\{[^}]+\}\})/'$usb_drive_path'/g' \ - >"$output_path" - -echo "Done." - diff --git a/launchd_scripts/vars.json b/launchd_scripts/vars.json deleted file mode 100644 index 6b5328c46..000000000 --- a/launchd_scripts/vars.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "USB_DRIVE_PATH": "/Volumes/usb_vim/" -} diff --git a/launchd_scripts/watch_volumes.plist b/launchd_scripts/watch_volumes.plist deleted file mode 100644 index f082952fe..000000000 --- a/launchd_scripts/watch_volumes.plist +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Label - WatchVolumes - - ProgramArguments - - /Users/wcarroll/pc_settings/launchd_scripts/attempt_vim_switch.sh - - - WatchPaths - - /Volumes/usb_vim/ - - - diff --git a/launchd_scripts/watch_volumes.plist.tpl b/launchd_scripts/watch_volumes.plist.tpl deleted file mode 100644 index be5cb4ad7..000000000 --- a/launchd_scripts/watch_volumes.plist.tpl +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Label - WatchVolumes - - ProgramArguments - - /Users/wcarroll/pc_settings/launchd_scripts/attempt_vim_switch.sh - - - WatchPaths - - {{USB_DRIVE_PATH}} - - - diff --git a/usbify/.gitignore b/usbify/.gitignore deleted file mode 100644 index f31b3e29c..000000000 --- a/usbify/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store -*.swp diff --git a/usbify/update.sh b/usbify/update.sh deleted file mode 100755 index 57a5965e9..000000000 --- a/usbify/update.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -# This script is used to ensure the USB has the latest code from the repository. - -# Update the following values to reflect the locations of each directory on your -# particular machine. -path_to_local_repo="$HOME/pc_settings" # path to git repo -path_to_ext_device="/Volumes/usb_vim" # path to USB device - - -if [ ! -d "$path_to_ext_device" ]; then - echo "No external device found at ${path_to_ext_device}." && \ - echo "Make sure the values input within update.sh are correct." && \ - echo "path_to_ext_device: $path_to_ext_device" && \ - echo "Exiting." && return 1 -fi - -if [ ! -d "$path_to_local_repo" ]; then - echo "No repository found at ${path_to_local_repo}." && \ - echo "Make sure the values input within update.sh are correct." && \ - echo "path_to_local_repo: $path_to_local_repo" && \ - echo "Exiting." && return 1 -fi - - -# Update the local copy of the repo. -echo -n "Updating pc_settings..." && \ - pushd "$path_to_local_repo" >/dev/null && \ - git pull origin master >/dev/null - - if [ ! "$?" -eq 0 ]; then - echo "Error: git pull error. Exiting." && \ - return 1 - else - echo "Done." - fi - - -# Copy vim directory to USB device. -echo -n "Copying files to external device..." && \ - pushd "$path_to_ext_device" >/dev/null && \ - rm -rf "${path_to_ext_device}/vim" &>/dev/null && \ - cp -r "${path_to_local_repo}/usbify/vim" "${path_to_ext_device}/vim" \ - &>/dev/null && \ - - if [ ! "$?" -eq 0 ]; then - echo "Error: rm or cp error. Exiting." && \ - return 1 - else - echo "Done." - fi - - -# restore the dirs to its state before running this script -popd >/dev/null && popd >/dev/null && echo "Complete." && return 0 diff --git a/usbify/vim/.vimrc b/usbify/vim/.vimrc deleted file mode 100644 index 151391950..000000000 --- a/usbify/vim/.vimrc +++ /dev/null @@ -1,378 +0,0 @@ -" -- BEGIN: Vundle config -- -set nocompatible " be iMproved, required -filetype off " required - -" set the runtime path to include Vundle and initialize -set rtp+=~/.vim/bundle/Vundle.vim -call vundle#begin() -" alternatively, pass a path where Vundle should install plugins -"call vundle#begin('~/some/path/here') - -" let Vundle manage Vundle, required -Plugin 'VundleVim/Vundle.vim' - -" The following are examples of different formats supported. -" Keep Plugin commands between vundle#begin/end. - -" Displays git information in airline. -Plugin 'tpope/vim-fugitive' - -Plugin 'Raimondi/delimitMate' - -" Autocompletion -Plugin 'Valloric/YouCompleteMe' - -" Displays git-tracked C*UD ops within gutter. -Plugin 'airblade/vim-gitgutter' -Plugin 'kien/ctrlp.vim' -Plugin 'mileszs/ack.vim' -Plugin 'pangloss/vim-javascript' -Plugin 'scrooloose/nerdtree' -Plugin 'scrooloose/syntastic' - -" Themes -Plugin 'sickill/vim-monokai' -Plugin 'altercation/vim-colors-solarized' - -" Executes shell commands and pipes output into new Vim buffer. -Plugin 'sjl/clam.vim' - -" Multiple cursors for simultaneous edits. -" NOTE: use to run miltiple cursors not -Plugin 'terryma/vim-multiple-cursors' - -" Visualize buffers -Plugin 'vim-airline/vim-airline' -Plugin 'vim-airline/vim-airline-themes' - - -call vundle#end() " required -filetype plugin indent on " required -" Put your non-Plugin stuff after this line -" -- END: Vundle config -- - - -" Airline Settings -" Enables the list of buffers. -let g:airline#extensions#tabline#enabled = 1 - -" Shows the filename only. -let g:airline#extensions#tabline#fnamemod = ':t' - -" Allow glyphs in airline -let g:airline_powerline_fonts = 1 - - -" It's the twenty-first century...no swaps. -set noswapfile - - -" Allow visual tab completion in command mode -set wildmenu - - -" Show Vim commands as they're being input. -set showcmd - - -" Changes to character. -let mapleader = " " - - -" Supports mouse interaction. -set mouse=a - - -" Highlights matches during a search. -set hlsearch - -nnoremap / :set hlsearch! - - -" Use custom-made snippets. -nnoremap ,jsfn :-1read $HOME/.vim/function_skeleton.jso - - -" backspace settings -set backspace=2 -set backspace=indent,eol,start - - -" Javascript specific variables -let g:javascript_plugin_jsdoc = 1 -" set foldmethod=syntax - -" GlobalListchars -set list -set listchars=eol:¶,trail:~,nbsp:␣ - - -" Keeps everything concealed at all times. Even when cursor is on the word. -set conceallevel=1 -set concealcursor=nvic - -" JavaScript thanks to pangloss/vim-javascript -" let g:javascript_conceal_function = "ƒ" -" match ErrorMsg /ƒ/ - - -" Ultisnips -" Track the engine. -Plugin 'SirVer/ultisnips' - -" Snippets are separated from the engine. Add this if you want them: -Plugin 'honza/vim-snippets' - -" Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. -let g:UltiSnipsExpandTrigger="" -" let g:UltiSnipsJumpForwardTrigger="" -" let g:UltiSnipsJumpBackwardTrigger="" - - -" map jk to -inoremap jk - - -" Conventional Emacs line-editor defaults -inoremap I -inoremap A - - -" Manage Vertical and Horizontal splits -nnoremap vs :vs -nnoremap vv :vs -nnoremap sp :sp -nnoremap ss :sp - - -" Move around splits with -nnoremap h h -nnoremap j j -nnoremap k k -nnoremap l l -nnoremap q q - - -" Fuzzy-find open buffer via CtrlP -nnoremap bg :CtrlPBuffer - - -" Buffer creation and management -" Buffer movement -nnoremap :1bnext -nnoremap :1bprevious - -" Buffer creation -nnoremap :enew - -" Buffer deletion -nnoremap bq :bp bd # - - -" make Y do what is intuitive given: -" D: deletes until EOL -" C: changes until EOL -nnoremap Y y$ - - -" flip number keys to their shift+ counterparts -nnoremap t1 t! -nnoremap t2 t@ -nnoremap t3 t# -nnoremap t4 t$ -nnoremap t5 t% -nnoremap t6 t^ -nnoremap t7 t& -nnoremap t8 t* -nnoremap t9 t( -nnoremap t0 t) - -nnoremap T1 T! -nnoremap T2 T@ -nnoremap T3 T# -nnoremap T4 T$ -nnoremap T5 T% -nnoremap T6 T^ -nnoremap T7 T& -nnoremap T8 T* -nnoremap T9 T( -nnoremap T0 T) - -nnoremap f1 f! -nnoremap f2 f@ -nnoremap f3 f# -nnoremap f4 f$ -nnoremap f5 f% -nnoremap f6 f^ -nnoremap f7 f& -nnoremap f8 f* -nnoremap f9 f( -nnoremap f0 f) - -nnoremap F1 F! -nnoremap F2 F@ -nnoremap F3 F# -nnoremap F4 F$ -nnoremap F5 F% -nnoremap F6 F^ -nnoremap F7 F& -nnoremap F8 F* -nnoremap F9 F( -nnoremap F0 F) - - -" Karate edits -nnoremap ca9 ca( -nnoremap da9 da( -nnoremap va9 va( - -nnoremap ca0 ca) -nnoremap da0 da) -nnoremap va0 va) - -nnoremap ci9 ci( -nnoremap di9 di( -nnoremap vi9 vi( - -nnoremap ci0 ci) -nnoremap di0 di) -nnoremap vi0 vi) - - -" scrolling and maintaing mouse position -nnoremap j -nnoremap k - - -" reload file after git changes -nnoremap :e - - -" -- Syntastic Settings -- -set statusline+=%#warningmsg# -set statusline+=%{SyntasticStatuslineFlag()} -set statusline+=%* - -let g:syntastic_always_populate_loc_list = 1 -let g:syntastic_auto_loc_list = 1 -let g:syntastic_check_on_open = 1 -let g:syntastic_check_on_wq = 1 -let g:syntastic_javascript_checkers = ['gjslint'] - - -" Basic settings -set number -set tabstop=2 -set expandtab -set shiftwidth=2 - -syntax enable -set background=dark -colorscheme solarized - -set t_Co=255 - - -" Support italics -highlight Comment cterm=italic - - -" Define highlighting groups -" NOTE: The ANSII aliases for colors will change when iTerm2 settings are -" changed. -highlight InterestingWord1 ctermbg=Magenta ctermfg=Black -highlight InterestingWord2 ctermbg=Blue ctermfg=Black - -" h1 highlighting -nnoremap 1 :execute '2match InterestingWord1 /\<\>/' -nnoremap x1 :execute '2match none' - -" h2 highlighting -nnoremap 2 :execute '3match InterestingWord2 /\<\>/' -nnoremap x2 :execute '3match none' - -"clear all highlighted groups -nnoremap xx :execute '2match none' :execute '3match none' hh - - -" pasteboard copy & paste -nnoremap V"+y -vnoremap "+y - -inoremap "+pa -nnoremap o"+p -vnoremap "+p - - -" Manage 80 char line limits -highlight OverLength ctermbg=White ctermfg=Black -match OverLength /\%81v.\+/ -set wrap! - - -" Toggle word-wrapping -nnoremap w :set wrap! - - -" Resize split to 10,20,...,100 chars -" Uncomment the next lines for support at those sizes. -" These bindings interfere with the highlight groups, however. -" Increases the width of a vertical split. -" nnoremap 1 :vertical resize 10 -" nnoremap 2 :vertical resize 20 -nnoremap 3 :vertical resize 30 -nnoremap 4 :vertical resize 40 -nnoremap 5 :vertical resize 50 -nnoremap 6 :vertical resize 60 -nnoremap 7 :vertical resize 70 -nnoremap 8 :vertical resize 80 -nnoremap 9 :vertical resize 90 -nnoremap 0 :vertical resize 100 - -" Increases the height of a horizontal split. -nnoremap v1 :resize 5 -nnoremap v2 :resize 10 -nnoremap v3 :resize 15 -nnoremap v4 :resize 20 -nnoremap v5 :resize 25 -nnoremap v6 :resize 30 -nnoremap v7 :resize 35 -nnoremap v8 :resize 40 - - -" View Directory tree with ctrl + \ -nnoremap :NERDTreeToggle - - -" BOL and EOL -nnoremap H ^ -vnoremap H ^ -nnoremap L $ -vnoremap L $ - - -" trim trailing whitespace on save -autocmd BufWritePre *.{js,py,tpl,html} :%s/\s\+$//e - - -" set default font and size -set guifont=Operator\ Mono:h16 - - -" CtrlP Config. -set runtimepath^=~/.vim/bundle/ctrlp.vim -" let g:ctrlp_map = '' -let g:ctrlp_cmd = 'CtrlP' - -" Maps CtrlP to leader to future-proof config. -nnoremap p :CtrlP - -" Fuzzy-finds files within cwd. -" nnoremap pf :CtrlP - -" Ignores dirs and files -let g:ctrlp_custom_ignore = { - \ 'dir': 'node_modules', - \ 'file': '\v\.(exe|dll|png|jpg|jpeg)$' -\} - diff --git a/usbify/vim/vim_point_to_usb.sh b/usbify/vim/vim_point_to_usb.sh deleted file mode 100755 index 7ea24fb0b..000000000 --- a/usbify/vim/vim_point_to_usb.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -path_to_ext_device="/Volumes/usb_vim" - - -# ensure there is an external device connected and that the path to it is -# accurate. -if [ ! -d "$path_to_ext_device" ]; then - echo "No external device found at: $path_to_ext_device" - echo "Ensure that the value set for path_to_ext_device is correct." - echo "path_to_ext_device: $path_to_ext_device" - echo "Exiting." - return 1 -fi - - - -# This script toggles between local vim and a version that can be stored on an -# external device like a USB. - -# USB --> local machine -if [ -L "$HOME/.vim" ] && [ -L "$HOME/.vimrc" ]; then - echo "Pointing to USB. Toggling back to local machine..." - - # remove the symlinks - rm "$HOME/.vim" - rm "$HOME/.vimrc" - - # restore back-ups as active files - [ -d "$HOME/.vim.bak" ] && mv "$HOME/.vim.bak" "$HOME/.vim" - [ -f "$HOME/.vimrc.bak" ] && mv "$HOME/.vimrc.bak" "$HOME/.vimrc" - - echo ".vim now points to $HOME/.vim" - echo ".vimrc now points to $HOME/.vimrc" - -# local machine --> USB -else - echo "Pointing to local machine. Toggling to USB..." - - # back-up local machine's files - [ -d "$HOME/.vim" ] && mv "$HOME/.vim" "$HOME/.vim.bak" - [ -f "$HOME/.vimrc" ] && mv "$HOME/.vimrc" "$HOME/.vimrc.bak" - - # symlink .vim and .vimrc to external device - ln -s "${path_to_ext_device}/vim/.vim" "$HOME/.vim" - ln -s "${path_to_ext_device}/vim/.vimrc" "$HOME/.vimrc" - - echo ".vim now points to ${path_to_ext_device}/vim/.vim" -fi - -echo "Done." -