Skip to content

Commit

Permalink
Updated zsh and osx defaults script
Browse files Browse the repository at this point in the history
  • Loading branch information
iJoeCollins committed Jul 18, 2014
1 parent c378182 commit a188655
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 64 deletions.
85 changes: 42 additions & 43 deletions osx/osx
Original file line number Diff line number Diff line change
Expand Up @@ -4,81 +4,83 @@
#
##

# Enable Disk Utility's Debug Menu
defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false

# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

# Enable subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing -int 2

# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0

# Show all filename extensions in Finder
defaults write NSGlobalDomain AppleShowAllExtensions -bool true

# Show status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true

# Allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true

# Automatically open a new Finder window when a volume is mounted
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true

# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

# Enable AirDrop over Ethernet and on unsupported Macs running Lion
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true

# Enable snap-to-grid for desktop icons
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist

# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Make Safari’s search banners default to Contains instead of Starts With
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false

# Enable AirDrop over Ethernet and on unsupported Macs running Lion
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
# Disable the “Are you sure you want to open this application?” dialog
#defaults write com.apple.LaunchServices LSQuarantine -bool false

# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
#defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

# Require password immediately after sleep or screen saver begins
#defaults write com.apple.screensaver askForPassword -int 1
#defaults write com.apple.screensaver askForPasswordDelay -int 0

# Show all filename extensions in Finder
#defaults write NSGlobalDomain AppleShowAllExtensions -bool true

# Automatically open a new Finder window when a volume is mounted
#defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
#defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
#defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true

# Disable the warning before emptying the Trash
#defaults write com.apple.finder WarnOnEmptyTrash -bool false

# Hot corners
# Bottom left screen corner → Desktop
defaults write com.apple.dock wvous-bl-corner -int 4
defaults write com.apple.dock wvous-bl-modifier -int 0
#defaults write com.apple.dock wvous-bl-corner -int 4
#defaults write com.apple.dock wvous-bl-modifier -int 0
# Bottom right screen corner → Mission Control
defaults write com.apple.dock wvous-br-corner -int 2
defaults write com.apple.dock wvous-br-modifier -int 0
#defaults write com.apple.dock wvous-br-corner -int 2
#defaults write com.apple.dock wvous-br-modifier -int 0
# Top left screen corner → Application Windows
defaults write com.apple.dock wvous-tl-corner -int 3
defaults write com.apple.dock wvous-tl-modifier -int 0
#defaults write com.apple.dock wvous-tl-corner -int 3
#defaults write com.apple.dock wvous-tl-modifier -int 0
# Top right screen corner → Launchpad
defaults write com.apple.dock wvous-tr-corner -int 11
defaults write com.apple.dock wvous-tr-modifier -int 0
#defaults write com.apple.dock wvous-tr-corner -int 11
#defaults write com.apple.dock wvous-tr-modifier -int 0

# Enable hidden four-fingered double tap gesture
# Once enabled you can jump back to the most recent space used
defaults write com.apple.dock double-tap-jump-back -bool TRUE
#defaults write com.apple.dock double-tap-jump-back -bool TRUE

# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true

# Make Safari’s search banners default to Contains instead of Starts With
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false

# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
#defaults write com.apple.dock autohide -bool true

# Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4
#defaults write com.apple.terminal StringEncodings -array 4

# Make ⌘ + F focus the search input in iTunes
defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
#defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"

# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
#defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true

# Disable menu bar transparency
#defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
Expand All @@ -102,9 +104,6 @@ defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# Show item info below desktop icons
#/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist

# Enable Disk Utility's Debug Menu
defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

# Turn off hibernation [laptops only]
# sudo pmset -a hibernatemode 0

Expand Down
1 change: 1 addition & 0 deletions zsh/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ alias ...="cd ../.."
alias l="ls -F"
alias la="ls -aF"
alias dotfiles="cd $ZSH"
alias dh='dirs -v'


## Open With ##
Expand Down
16 changes: 10 additions & 6 deletions zsh/config.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,29 @@ export TERM=xterm-256color
export CLICOLOR=1
autoload colors; colors;
export LSCOLORS="Gxfxcxdxbxegedabagacad"
setopt PROMPT_SUBST

HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
HISTSIZE=4096
SAVEHIST=4096

setopt NO_BG_NICE # don't nice background tasks
setopt NO_HUP
setopt NO_LIST_BEEP
setopt LOCAL_OPTIONS # allow functions to have local options
setopt LOCAL_TRAPS # allow functions to have local traps
setopt SHARE_HISTORY # share history between sessions ???
setopt EXTENDED_HISTORY # add timestamps to history
setopt PROMPT_SUBST
#setopt EXTENDED_HISTORY # add timestamps to history
setopt CORRECT
setopt COMPLETE_IN_WORD
setopt IGNORE_EOF

setopt APPEND_HISTORY # adds history
setopt INC_APPEND_HISTORY SHARE_HISTORY # adds history incrementally and share it across sessions
setopt HIST_IGNORE_ALL_DUPS # don't record dupes in history
setopt HIST_REDUCE_BLANKS
setopt HIST_REDUCE_BLANKS

# awesome cd movements from zshkit
setopt AUTOCD
setopt AUTOPUSHD PUSHDMINUS PUSHDSILENT PUSHDTOHOME
setopt CDABLEVARS
export DIRSTACKSIZE=8
2 changes: 2 additions & 0 deletions zsh/prompt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#Setup the prompt to show up as "dir$"
#prompt="%1~$ "

setopt PROMPT_SUBST

parse_git_dirty() {
if [[ -n $(git status -s --ignore-submodules=dirty 2> /dev/null) ]]; then
echo "%{$fg[red]%}"
Expand Down
19 changes: 4 additions & 15 deletions zsh/zshrc.symlink
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# MacPorts Installer addition on 2011-04-09_at_23:30:31: adding an appropriate PATH variable for use with MacPorts.
export PATH=$HOME/.node/bin:/usr/local/heroku/bin:/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.

# shortcut to this dotfiles path is $ZSH
export ZSH=$HOME/.dotfiles

# your project folder that we can `c [tab]` to
export PROJECTS=~/Development
# edit your $PATH, and don’t forget to include $PATH at the end, example $HOME/.node/bin:$PATH
export PATH=$PATH

# all of our zsh files
typeset -U config_files
Expand All @@ -24,12 +17,8 @@ do
source $file
done

# use .localrc for SUPER SECRET CRAP that you don't
# want in your public, versioned repo.
if [[ -a ~/.localrc ]]
then
source ~/.localrc
fi
# super secret local config you don’t want in your repo
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local

# initialize autocomplete here, otherwise functions won't be loaded
autoload -U compinit
Expand Down

0 comments on commit a188655

Please sign in to comment.