Skip to content

Commit

Permalink
Mac merge (#10)
Browse files Browse the repository at this point in the history
Fixed git credential config bug (global & local) (previously cached my username)
Fixed copy bug in tmux mode when using jldeen dotfiles
Fixed insert mode error in vim (allow backspacing over everything in insert mode)
Fixed pip for setuptools upgrade
Added checks in for zsh, oh-my-zsh install, and vs code symlink
Added new features embedded with Powerlevel9k
- Dir_writable
- Kubernetes support
Added iTerm and Azure CLI installs to brewfile for autoinstall
Removed hardcode source from .zshrc and .bashrc for az
Updated auto sourcing for zsh-autosuggestions plugin
Updated settings.json for VS Code
Updated iterm config
Streamlined and enhanced bandwidth data performance
- Speedtest-cli command moved to crontab to be run in 15min increments and output data to log
- Tmux internet_info.sh reads log and prints relevant data
General code cleanup and optimization
  • Loading branch information
jldeen authored Jun 4, 2018
1 parent 04d435b commit 1cd3cf5
Show file tree
Hide file tree
Showing 13 changed files with 188 additions and 177 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ atom.symlink/themes
atom.symlink/blob-store
atom.symlink/recovery

bin/ip.sh
bin/kubectl
bin/ssh.sh
bin/bandwidth.json
bin/bandwidth.log

git/gitconfig.local.symlink
13 changes: 4 additions & 9 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,38 @@
cask_args appdir: '/Applications'

tap 'homebrew/bundle'
tap 'puma/puma'

brew 'ack'
brew 'azure-cli'
brew 'coreutils'
brew 'go'
brew 'grc'
brew 'imagemagick'
brew 'jp2a'
brew 'jq'
brew 'libgit2'
brew 'openssl'
brew 'node'
brew 'readline'
brew 'postgresql'
brew 'puma/puma/puma-dev'
brew 'python'
brew 'ruby-build'
brew 'rbenv'
brew 'roundup'
brew 'shpotify'
brew 'spaceman-diff'
brew 'speedtest-cli'
brew 'spark'
brew 'tmux'
brew 'unrar'
brew 'wget'
brew 'yarn'
brew 'youtube-dl'

cask '1password'
cask 'adium'
cask 'atom'
cask 'firefox'
cask 'google-chrome'
cask 'handbrake'
cask 'iterm2'
cask 'slack'
cask 'spotify'
cask 'transmission'
cask 'tunnelbear'
cask 'transmission'
cask 'visual-studio-code'
cask 'vlc'
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Run the following to configure macOS from scratch...
bash -c "$(curl -fsSL https://raw.githubusercontent.com/jldeen/dotfiles/mac/configure.sh)"
```

It should go without saying, you should never run a script on your system without reading it to understand what changes it will make to your system. My scripts and code samples are no exception to the rule.

If you choose to use my dotfiles, my configure script will backup your current dotfiles, but will also make changes to your crontab - it's in your best interest to understand these changes prior to opting in.

### Notes
Your dotfiles are how you personalize your system. These are mine.

Expand Down Expand Up @@ -83,7 +87,7 @@ said, I do use this as *my* dotfiles, so there's a good chance I may break
something if I forget to make a check for a dependency.

If you're brand-new to the project and run into any blockers, please
[open an issue](https://github.com/holman/dotfiles/issues) on this repository
[open an issue](https://github.com/jldeen/dotfiles/issues) on this repository
and I'd love to get it fixed for you!

## thanks
Expand Down
5 changes: 2 additions & 3 deletions bash/bashrc.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,5 @@ GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM="auto"

export PATH=$PATH:/home/jldeen/bin

source '/home/jldeen/lib/azure-cli/az.completion'
# az cli
autoload bashcompinit && bashcompinit
8 changes: 4 additions & 4 deletions bin/internet_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ if [[ $? -eq 0 ]]
fi

# Speedtest
DL=$(speedtest-cli --simple | awk 'NR==2{print $2}')
UP=$(speedtest-cli --simple | awk 'NR==3{print $2}')
DL=$(cat ~/bin/bandwidth.log | awk 'NR==2{print $2}')
UP=$(cat ~/bin/bandwidth.log | awk 'NR==3{print $2}')

# # Public IP
PUB_IP=$(speedtest-cli --json | jq -r .client.ip)
PUB_IP=$(cat ~/bin/bandwidth.json | jq -r .client.ip)

if [[ "$PUB_IP" = ";; connection timed out; no servers could be reached" ]]; then
PUB_IP="Not Available"
elif [[ "$PUB_IP" = "" ]]; then
PUB_IP="No external access"
else
PUB_IP=$(speedtest-cli --json | jq -r .client.ip)
PUB_IP=$(cat ~/bin/bandwidth.json | jq -r .client.ip)
fi

INTERNET=''
Expand Down
6 changes: 3 additions & 3 deletions code/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"remote.onstartup": true,

// Controls the font family.
"editor.fontFamily": "'SauceCodePro Nerd Font'",
"terminal.integrated.fontFamily": "'SauceCodePro Nerd Font'",
"editor.fontFamily": "'SourceCodePro Nerd Font'",
"terminal.integrated.fontFamily": "'SourceCodePro Nerd Font'",
"terminal.integrated.fontSize": 11,
"workbench.startupEditor": "newUntitledFile",
"typescript.check.npmIsInstalled": false,
Expand All @@ -21,7 +21,7 @@
// "window.zoomLevel": 0,
// "workbench.startupEditor": "newUntitledFile",
//PowerShell
// "terminal.integrated.shell.osx": "/usr/local/bin/powershell",
"terminal.integrated.shell.osx": "/usr/local/bin/zsh",
// Color Override for terminal
"workbench.colorCustomizations": {
"terminal.foreground": "#839496",
Expand Down
87 changes: 40 additions & 47 deletions configure.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
#!/bin/bash

# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
if test ! $(which brew)
then
echo " Installing Homebrew for you."

# Install the correct homebrew for each OS type
if test "$(uname)" = "Darwin"
then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
elif test "$(expr substr $(uname -s) 1 5)" = "Linux"
then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
fi

fi

echo "Updating package lists..."
brew update

# zsh install
if test $(which zsh)
then
echo ''
echo "Now installing zsh..."
echo "zsh already installed..."
else
echo "zsh not found, now installing zsh..."
echo ''
brew install zsh zsh-completions
fi

# Installing git completion
echo ''
Expand All @@ -27,10 +46,25 @@ if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then
fi

# oh-my-zsh install
echo ''
echo "Now installing oh-my-zsh..."
if [ -d ~/.oh-my-zsh/ ] ; then
echo ''
echo "oh-my-zsh is already installed..."
read -p "Would you like to update oh-my-zsh now?" -n 1 -r
echo ''
if [[ $REPLY =~ ^[Yy]$ ]] ; then
cd ~/.oh-my-zsh && git pull
if [[ $? -eq 0 ]]
then
echo "Update complete..." && cd
else
echo "Update not complete..." >&2 cd
fi
fi
else
echo "oh-my-zsh not found, now installing oh-my-zsh..."
echo ''
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi

# oh-my-zsh plugin install
echo ''
Expand Down Expand Up @@ -94,9 +128,7 @@ then
echo ''
echo "Now configuring symlinks..." && $HOME/.dotfiles/script/bootstrap
echo ''
echo "Now setting up dependencies..."
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport


if [[ $? -eq 0 ]]
then
echo "Successfully configured your environment with jldeen's macOS dotfiles..."
Expand All @@ -115,43 +147,4 @@ else
echo ''
echo "source $HOME/.git-completion.bash" >> ${ZDOTDIR:-$HOME}/.bashrc && echo "added git-completion to .bashrc..."

fi

# Set default shell to zsh
echo ''
read -p "Do you want to change your default shell? y/n" -n 1 -r
echo ''
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Now setting default shell..."
chsh -s $(which zsh)
if [[ $? -eq 0 ]]
then
echo "Successfully set your default shell to zsh..."
else
echo "Default shell not set successfully..." >&2
fi
else
echo "You chose not to set your default shell to zsh. Exiting now..."
fi

# Setup and configure az cli
echo ''
read -p "Do you want to install Azure CLI? y/n (This will take some time...)" -n 1 -r
echo ''
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Now installing az cli..."
brew install azure-cli
if [[ $? -eq 0 ]]
then
echo "Successfully installed Azure CLI 2.0."
else
echo "Azure CLI not installed successfully." >&2
fi
else
echo "You chose not to install Azure CLI. Exiting now."
fi

echo ''
echo ' Badass macOS terminal installed!'
fi
5 changes: 1 addition & 4 deletions git/gitconfig.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,4 @@
# for more information on different options of the below setting.
#
# Setting to git 2.0 default to suppress warning message
default = simple
[user]
name = jldeen
email = jessde@microsoft.com
default = simple
56 changes: 20 additions & 36 deletions iterm/itermcfg.symlink/com.googlecode.iterm2.plist
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<integer>0</integer>
<key>AppleSmoothFixedFontsSizeThreshold</key>
<integer>1</integer>
<key>AppleWindowTabbingMode</key>
<string>manual</string>
<key>AutoHideTmuxClientSession</key>
<false/>
<key>Custom Color Presets</key>
Expand Down Expand Up @@ -36037,12 +36039,14 @@
<string>B8A14F96-3D88-4036-8529-B7A7A23FA30F</string>
<key>EnableRendezvous</key>
<false/>
<key>HotkeyMigratedFromSingleToMulti</key>
<true/>
<key>LoadPrefsFromCustomFolder</key>
<true/>
<key>NSNavLastRootDirectory</key>
<string>~/Desktop/mbadolato-iTerm2-Color-Schemes-89b3f62/schemes</string>
<string>~</string>
<key>NSNavPanelExpandedSizeForOpenMode</key>
<string>{849, 448}</string>
<string>{712, 448}</string>
<key>NSQuotedKeystrokeBinding</key>
<string></string>
<key>NSRepeatCountBinding</key>
Expand All @@ -36058,7 +36062,7 @@
gAKACoAN0xAJChEVGVdOUy5rZXlzoxITFIADgASABaMWFxiABoAHgAiACVpJZGVudGlm
aWVyVVdpZHRoVkhpZGRlblEwI0BowAAAAAAACNIhIiMkWiRjbGFzc25hbWVYJGNsYXNz
ZXNcTlNEaWN0aW9uYXJ5oiMlWE5TT2JqZWN00xAJCicrGaMSExSAA4AEgAWjLC0YgAuA
DIAIgAlRMSNAczGdsi0OVtIhIjM0Xk5TTXV0YWJsZUFycmF5ozM1JVdOU0FycmF5XxAP
DIAIgAlRMSNAc7Gdsi0OVtIhIjM0Xk5TTXV0YWJsZUFycmF5ozM1JVdOU0FycmF5XxAP
TlNLZXllZEFyY2hpdmVy0Tg5VUFycmF5gAEACAARABoAIwAtADIANwBGAEwAUQBcAGMA
ZgBoAGoAbABzAHsAfwCBAIMAhQCJAIsAjQCPAJEAnACiAKkAqwC0ALUAugDFAM4A2wDe
AOcA7gDyAPQA9gD4APwA/gEAAQIBBAEGAQ8BFAEjAScBLwFBAUQBSgAAAAAAAAIBAAAA
Expand All @@ -36074,23 +36078,14 @@
</data>
<key>NSTableView Supports v2 KeyBingingTable</key>
<true/>
<key>NSToolbar Configuration com.apple.NSColorPanel</key>
<dict>
<key>TB Is Shown</key>
<integer>1</integer>
</dict>
<key>NSWindow Frame NSFontPanel</key>
<string>379 104 660 77 0 0 1680 1028 </string>
<string>769 110 445 103 0 0 1360 745 </string>
<key>NSWindow Frame ProfilesPanel</key>
<string>126 350 735 382 0 0 1280 778 </string>
<key>NSWindow Frame SessionsPreferences</key>
<string>269 139 606 456 0 0 1440 878 </string>
<string>159 291 735 382 0 0 1360 745 </string>
<key>NSWindow Frame SharedPreferences</key>
<string>435 464 796 473 0 0 1680 1028 </string>
<string>237 289 918 401 0 0 1360 745 </string>
<key>NSWindow Frame iTerm Window 0</key>
<string>113 106 1089 427 0 0 1680 1028 </string>
<key>NSWindow Frame iTerm Window 1</key>
<string>176 41 885 427 0 0 1440 900 </string>
<string>41 147 1279 478 0 0 1280 777 </string>
<key>New Bookmarks</key>
<array>
<dict>
Expand Down Expand Up @@ -37433,7 +37428,7 @@
<key>Non-ASCII Anti Aliased</key>
<true/>
<key>Normal Font</key>
<string>SauceCodeProNerdFontC-Regular 18</string>
<string>SourceCodeProNerdFontC-Regular 32</string>
<key>Only The Default BG Color Uses Transparency</key>
<true/>
<key>Option Key Sends</key>
Expand Down Expand Up @@ -37503,26 +37498,13 @@
<key>NoSyncHaveWarnedAboutPasteConfirmationChange</key>
<true/>
<key>NoSyncInstallationId</key>
<string>92150115-FFFB-433E-B237-D4D3D2F7B4A2</string>
<key>NoSyncLastTipTime</key>
<real>515442352.29137498</real>
<string>39B11FBA-1B8D-4F87-816C-9C4BE605D3AF</string>
<key>NoSyncNeverRemindPrefsChangesLostForFile</key>
<true/>
<key>NoSyncNeverRemindPrefsChangesLostForFile_selection</key>
<integer>0</integer>
<key>NoSyncPermissionToShowTip</key>
<true/>
<key>NoSyncTimeOfFirstLaunchOfVersionWithTip</key>
<real>513918337.30616999</real>
<key>NoSyncTipsDisabled</key>
<true/>
<key>NoSyncTipsToNotShow</key>
<array>
<string>000</string>
<string>0000</string>
<string>0001</string>
<string>0002</string>
</array>
<real>546818164.89214206</real>
<key>PointerActions</key>
<dict>
<key>Button,1,1,,</key>
Expand Down Expand Up @@ -37557,21 +37539,23 @@
</dict>
</dict>
<key>PrefsCustomFolder</key>
<string>/Users/jessicadeen/.itermcfg</string>
<string>~/.itermcfg</string>
<key>SUEnableAutomaticChecks</key>
<false/>
<true/>
<key>SUFeedAlternateAppNameKey</key>
<string>iTerm</string>
<key>SUFeedURL</key>
<string>https://iterm2.com/appcasts/final.xml?shard=43</string>
<string>https://iterm2.com/appcasts/final.xml?shard=56</string>
<key>SUHasLaunchedBefore</key>
<true/>
<key>SULastCheckTime</key>
<date>2018-05-06T16:22:22Z</date>
<key>SUSendProfileInfo</key>
<false/>
<key>WordCharacters</key>
<string>/-+\~_.</string>
<key>iTerm Version</key>
<string>3.0.15</string>
<string>3.1.6</string>
<key>kCPKSelectionViewPreferredModeKey</key>
<integer>0</integer>
<key>kCPKSelectionViewShowHSBTextFieldsKey</key>
Expand Down
Loading

0 comments on commit 1cd3cf5

Please sign in to comment.