Skip to content
This repository

More .osx suggestions? #5

Open
mathiasbynens opened this Issue September 06, 2011 · 27 comments

10 participants

Mathias Bynens volsk Nicolas Gallagher 3vincent Aristides Lourenco Peter Aronoff Matt Tagg Haralan Dobrev Kevin Suttle Kornel
Mathias Bynens

http://superuser.com/questions/11026/textmate-creates-temporary-files-and-doesnt-delete-them

defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1
volsk

Great work! Lovin' it.

Maybe not .osx but a suggestion:

quit () {
        for app in $*; do
                osascript -e 'quit app "'$app'"'
        done
}

and

pman() { man -t "${1}" | open -f -a Preview; }
Deleted user

The content you are editing has changed. Reload the page and try again.

Hidden

defaults write -g NSSavePanelStandardDesktopShortcutOnly -bool true # cmd-D, not cmd-delete (10.7)
defaults write -g WebAutomaticDashSubstitutionEnabled -bool false
defaults write -g WebAutomaticTextReplacementEnabled -bool false
defaults write -g WebContinuousSpellCheckingEnabled -bool false
defaults write com.apple.CrashReporter DialogType none
defaults write com.apple.Safari NSQuitAlwaysKeepsWindows -bool true #* enable Resume per application
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
defaults write com.apple.dashboard mcx-disabled -bool true # disable Dashboard
defaults write com.apple.helpviewer NormalWindow -bool true # not always on top
defaults write com.apple.iTunes hide-ping-dropdown -bool true #* oblong buttons that appear on song lists
defaults write com.apple.spotlight DictionaryLookupEnabled -bool false # disable Dictionary results
# Already included in .osx
defaults write com.apple.finder QuitMenuItem -bool true
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.frameworks.diskimages skip-verify -bool true # don't verify mounted DMGs

Not hidden

defaults write -g AppleEnableSwipeNavigateWithScrolls -bool false # Swipe between pages
defaults write -g InitialKeyRepeat -int 15 # in milliseconds, shortest shown in System Preferences is 15
defaults write -g KeyRepeat -int 2 # fastest shown in System Preferences is 2
defaults write -g com.apple.keyboard.fnState -bool true # Use all F1, F2, etc. keys as standard function keys
defaults write -g userMenuExtraStyle -int 2 # Show fast user switching menu as: icon
# Already included in .osx
defaults write com.apple.finder AppleShowAllExtensions -bool true # Show all filename extensions
Sending Request…

Attach images by dragging & dropping or selecting them. Octocat-spinner-32 Uploading your images… Unfortunately, we don't support that file type. Try again with a PNG, GIF, or JPG. Yowza, that's a big file. Try again with an image file smaller than 10MB. This browser doesn't support image attachments. We recommend updating to the latest Internet Explorer, Google Chrome, or Firefox. Something went really wrong, and we can't process that image. Try again.

Mathias Bynens

Woah, thanks @Lri! Will go over these and cherry-pick.

I noticed AppleShowAllExtensions is not in the com.apple.finder domain (at least not on Lion). Looks like it should be defaults write NSGlobalDomain AppleShowAllExtensions -bool true.

Nicolas Gallagher

Is there an option to automatically enable snap-to-grid on desktop icons?

Mathias Bynens

@necolas Added in dda45e2.

FWIW, this is how I find the correct keys:

  1. defaults read > a
  2. Change the setting
  3. defaults read > b
  4. diff a b

If that doesn’t work, I usually try to run strings on the binary and look for anything that resembles a preference name.

(There might be a better way, so please let me know if I’m being silly!)

Update: Lauri Ranta shares some more tricks on how to discover hidden preferences: http://osxnotes.net/defaults.html


Unfortunately, in this case it’s a list and not a simple property, so we can’t just use defaults write. PlistBuddy to the rescue!

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

Thanks for the suggestion, I should’ve added this one sooner.

Nicolas Gallagher

Awesome, thanks. Been looking for this one.

Deleted user

The content you are editing has changed. Reload the page and try again.

A few more hidden preferences that aren't currently included in .osx and I didn't mention before.

# Display ASCII control characters using caret notation in standard text views
defaults write -g NSTextShowsControlCharacters -bool true

# Add a context menu item for showing the web inspector to web views
defaults write -g WebKitDeveloperExtras -bool true

# Disable the animation for showing and hiding information panels in Finder
defaults write com.apple.finder AnimateInfoPanes -bool false

# Don't open a Finder window when mounting an external disk
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool false

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

Attach images by dragging & dropping or selecting them. Octocat-spinner-32 Uploading your images… Unfortunately, we don't support that file type. Try again with a PNG, GIF, or JPG. Yowza, that's a big file. Try again with an image file smaller than 10MB. This browser doesn't support image attachments. We recommend updating to the latest Internet Explorer, Google Chrome, or Firefox. Something went really wrong, and we can't process that image. Try again.

Mathias Bynens

Thanks, @Lri!

3vincent
External drives remain mounted after logout / externel drives are mounted before first login (works for 10.6+)
$ sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true

Address Book Debug Menu
$ defaults write com.apple.addressbook ABShowDebugMenu -bool YES

iCal Debug Menu
$ defaults write com.apple.iCal IncludeDebugMenu YES

Time Machine: Support for unsupported Network Volumes 
$ defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Time Machine: Change Interval of Backups (1800 = 1800 seconds)  
$ sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 1800

Set Limit Of Safari History Elements to a NUMBER
$ defaults write com.apple.Safari WebKitHistoryItemLimit 2000

Set Limit Of Safari History Elements to a Number of DAYS
$ defaults write com.apple.Safari WebKitHistoryAgeInDaysLimit 30
Mathias Bynens
Owner

Thanks, @3vincent! I’ve enabled the iCal and Address Book debug menus. The other settings are interesting too, but I personally don’t need them — good thing you’ve posted them here for other people to learn though! Thanks again.

Mathias Bynens
Owner

@necolas pointed me to http://poller.se/2010/08/optimizing-mac-os-x-for-ssd-drives/ — some of the listed commands have been proposed here before. I should consider adding them to .osx in commented form anyway, so it’s easier for other people to use.

Mathias Bynens
Owner

Here are some more: http://www.johnkastler.net/2011/12/25/os-x-defaults/ Also note that stuff like -string "NO" can in some (?) cases be written as -bool false instead (which makes more sense, IMHO).

Nicolas Gallagher

Needs more inline comments!

Mathias Bynens
Owner

@necolas Don’t worry, I’ll take care of that :)

eth0 ethzero referenced this issue from a commit May 05, 2012
Commit has since been removed from the repository and is no longer available.
eth0 ethzero referenced this issue from a commit May 05, 2012
Commit has since been removed from the repository and is no longer available.
eth0 ethzero referenced this issue from a commit May 05, 2012
Commit has since been removed from the repository and is no longer available.
Aristides Lourenco

It would be useful to have a separate repository only with osx stuff which could be included in everyone's dotfiles

Mathias Bynens
Owner

@aristidesfl But it’s just a single file. I don’t see how anyone would benefit from having a separate repository.

Aristides Lourenco

@mathiasbynens

The idea would be to keep a repository with a central impartial collection of potentially useful Max OS X settings. This would become the place of reference for this kind of settings, and everyone could make pull requests with the new additions without affecting your personal preferencies.

This would potentially allow people to fork the repo on github; create a branch to keep only the preferences they would like to see applied in their system ((un)commenting); and include that customized branch in their own dotfile repo via submodule/subtree.

This way, you could include in your dotfiles a customized branch of the collection with only the preferences which interest you. If someone doesn't want to use git to include the file they can still just copy or execute it directly from github.

Advantages

  • Having a more impartial and uncompromised collection, independently of a single user's preferences.
  • Be able to include the collection in each individual's dotfile repository without having to include all sort of unrelated files.
  • Be able to keep the included collection up to date while maintaining personal preferences using a VCS (git in this case).

Other details

  • There could exist an index of all settings in the beginning of the file
  • There could exist a reset file the same settings but with the default OS X values and/or a backup/restore script like discussed in issue #58
Peter Aronoff
# Remove scroll bouncing
defaults write -g NSScrollViewRubberbanding -int 0
Mathias Bynens
Owner

@telemachus That’s a nice touch. Unfortunately it only seems to actually remove the scroll bouncing effect in a few apps such as Finder. Safari, for example, still has it. :(

Matt Tagg

Out of interest, any reason imagemagick included, but commented out by default?

IE what significance or meaning does that have (if any).

oops - sorry that should be in the .brew suggestions

Mathias Bynens
Owner

I don’t want to install imagemagick by default on all the machines I work on, only on my own laptop. Listed it in .brew is like a reminder to me — “hey, you might want this too. Or not.” (For the same reason, some .osx commands have been included in commented out form.)

Matt Tagg

OK thought it was something like that (:

Mark Stacey Gudahtt referenced this issue from a commit in Gudahtt/dotfiles May 23, 2011
Nat Welch cloudapp should fail gracefully if a file isn't specified
closes #5
7ac291a
Simeon Pashley gamelinchpin referenced this issue from a commit in gamelinchpin/dotfiles February 22, 2012
Mathias Bynens .osx: Enable snap-to-grid for desktop icons
Ref. #5
c07291c
Simeon Pashley gamelinchpin referenced this issue from a commit in gamelinchpin/dotfiles February 22, 2012
Mathias Bynens .osx: Enable snap-to-grid for desktop icons
Ref. #5
5895a63
Simeon Pashley gamelinchpin referenced this issue from a commit in gamelinchpin/dotfiles February 24, 2012
Mathias Bynens .osx: Tweak some more hidden preferences
Thanks to @Lri! Ref. #5.
e40ad84
Simeon Pashley gamelinchpin referenced this issue from a commit in gamelinchpin/dotfiles February 24, 2012
Mathias Bynens .osx: Tweak some more hidden preferences
Thanks to @Lri! Ref. #5.
36d6e0f
Mathias Bynens

FWIW, @pornel suggested to look into dtrace. From https://twitter.com/pornelski/status/392985675584516096:

I haven't played with dtrace yet, but AFAIK you can intercept method calls, so you could log every preference read.

bdd desimone referenced this issue from a commit October 27, 2013
Commit has since been removed from the repository and is no longer available.
Nicklas Moberg nicksen referenced this issue from a commit in nicksen/osx_dotfiles September 22, 2011
Mathias Bynens Show all filename extensions in Finder. (Can be set via Finder → Pref…
…erences too.)


Thanks for the pointer, @Lri! mathiasbynens/dotfiles#5 (comment)
e00f487
Matt Neary mattneary referenced this issue from a commit in mattneary/dotfiles September 05, 2011
Mathias Bynens Whitespace cleanup.
Add installation instructions.

Add update instructions.

Typo.

Add TRACE and OPTIONS aliases.

Add a note about the `.osx` file.

Add `undopush` alias.

Fix a typo in the fix for the ancient UTF-8 bug in QuickLook.

Remove the disturbing ".dmg" Mounting Verification

Add some more goodies to .osx.

Avoid creating .DS_Store files on network volumes.

Enable Safari’s debug menu.

Added "lsd" to list only directories

Tweak README.

Disable Resume system-wide.

Thanks to nspragmatic on Hacker News. http://news.ycombinator.com/item?id=2974911

Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs).

Show a warning and ask for user confirmation before running the
bootstrapper. Fixes #8.

Added enable-spring-load-actions-on-all-items -bool true

Ignore duplicate history entries.

Comment tweak.

Make sure rsync output starts on a new line.

added stuff for ssh tab completion

Better tab completion for SSH hostnames based on ~/.ssh/config.

Add aliases to show/hide hidden files in Finder. Closes #15.

Posix path in finder title, sheet speed, hidden application's icons are transparent

Minor cleanup.

Fix typo.

Add tab completion for `defaults read|write NSGlobalDomain`. Useful when looking for new ~/.osx additions.

Reload dotfiles after updating through the bootstrapper.

Check if ~/.ssh/config exists before grepping it.

Add aliases to hide/show all desktop icons.

Enable AirDrop over Ethernet and on unsupported Macs running OS X Lion.

Added HISTIGNORE to ignore certain commands in history

Show indicator lights for open applications in the Dock, and don’t animate opening applications from the Dock. (These can be set through System Preferences → Dock as well.)

Disable the “Are you sure you want to open this application?” dialog.

Always show scrollbars.

Use `NSGlobalDomain` instead of `-g`.

Require password immediately after sleep or screen saver begins. (Can also be set via System Preferences → Security & Privacy → General.)

Map bottom right Trackpad corner to secondary click (right-click).

Add `emptytrash` alias.

Show all filename extensions in Finder. (Can be set via Finder → Preferences too.)

Thanks for the pointer, @Lri! mathiasbynens/dotfiles#5 (comment)

Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons.

Enable tap to click (Trackpad).

Typo.

Set a blazingly fast keyboard repeat rate.

Show remaining battery time; hide percentage.

Automatically hide and show the Dock.

Only use UTF-8 in Terminal.app.

Empty Trash securely by default.

Disable the warning when changing a file extension.

Disable the warning before emptying the Trash.

Add PlistBuddy alias, because sometimes `defaults` just doesn’t cut it.

Show item info below desktop icons.

Disable the Ping sidebar in iTunes.

Disable Ping entirely.

Use full PlistBuddy path instead of the alias, so `.osx` can be used stand-alone.

Check if `tmutil` is available before using it. (It’s not available on Snow Leopard.)

Only reset Launchpad when it’s actually available. Fixes #24.

The fix for the UTF-8 bug in QuickLook causes problems when saving files in Adobe Illustrator CS5, so comment it out.

Enable subpixel font rendering on non-Apple LCDs

Minor tweaks.

Fix .gitconfig formatting (use tabs instead of spaces).

Typo.

Add `json` function. Example usage: `json http://fronteers.nl/congres/2011/attendees.json`

make it possible for bootstap.sh to be executed from wherever

Undid some silly mistakes and made the script more simplerder

Typo.

Add a more convenient `whois` alias.

Make the `json()` function more generic by allowing any JSON string instead of just JSON URLs.

Add a link to @janmoesen’s tilde repository.

Sexier file sourcing.

Add .vimrc, heavily based on the one @gf3 uses. Fixes #4.

Link to the issue tracker for suggestions.

.vimrc: Make tabs as wide as two spaces.

Looks like `IncludeDebugMenu` was replaced by `IncludeInternalDebugMenu` recently.

Don’t source .bash_profile when PS1 is not set (for non-interactive shells).

Stolen from @janmoesen’s https://github.com/janmoesen/tilde/blob/master/.bashrc:

Use `hd` alias for canonical hex dump. Thanks, @janmoesen!

Steal some `.inputrc` goodies from @janmoesen/tilde.

Steal some nifty aliases from @janmoesen/tilde.

Prefer US English and use UTF-8.

Use double quotes more consistently.

Remove the green checkmark icons in Dropbox.

Clarify Dropbox icon comment.

Add `cleanup` alias, which recursively deletes `.DS_Store` files. Useful for cleaning up external HDDs after copying over some folders.

Make `cleanup` list the files it deletes. Kind of like how `rm -v` works.

.vimrc: add `set wildmenu` for better command-line completion. Thanks, @alrra!

Removing duplicate `set mark-symlinked-directories on` settings.

Add some more commands to `$HISTIGNORE`.

Add a link to cowboy/dotfiles

.vimrc: Centralize backups, swapfiles and undo history

Move disabled QuickLook fix to the bottom

Add `escape` function which escapes UTF-8 characters into their 3-byte format

Example:

    $ escape "♥♡♥"
    \xE2\x99\xA5\xE2\x99\xA1\xE2\x99\xA5
    $ echo -e "\xE2\x99\xA5\xE2\x99\xA1\xE2\x99\xA5"
    ♥♡♥

Add `unidecode` function

Example:

    $ unidecode "\x{1D306}"
    𝌆

Use tabs instead of double-space indents

Allow piping to the `json` function

Make `emptytrash` empty the trash for mounted external volumes too

The downside is that this requires `sudo`. Closes #32.

Create .vim/{backups,swaps,undo} directories if they don’t exist

Allow running bootstrap.sh with a --force or -f option

This avoids the confirmation prompt.

Replace the `server` alias with a function that optionally takes an argument specifying the port number

Inspired by @padolsey’s https://gist.github.com/1525217#gistcomment-71652.

Remove old `server` alias

Ref. 958517d

`server`: Use parameter expansion instead of a fake ternary

README: Document the -f/--force option for bootstrap.sh

`server` function: Set the default Content-Type to `text/plain` instead of `application/octet-stream`

Hat tip to @cowboy: https://github.com/cowboy/dotfiles/blob/2874a86d207883a18e5e4c01219f9adb42d82c09/bin/serve#L26-43

README: Add Git-less installation instructions

Closes #35.

Use `tar -z` explicitly

Ref. #35.

Serve unknown file types as UTF-8, as suggested by @janmoesen

Include .vim directory and subdirectories

README: List files while untarring

Better `json` function

Ref. 9b0af44

`.osx`: Restart the `SystemUIServer` and suppress `kill` output.

.gitignore: Add more OS-specific hidden files

`server` function: Serve everything as UTF-8

Even though this is not technically correct for binary files, it doesn’t actually break anything.

.osx: Enable iTunes track notifications in the Dock

Screenshot: http://www.maclife.com/article/howtos/5_ways_customize_dock_terminal

README: Clarify that it doesn’t matter where the repository is cloned, and document ~/.extra

README: Tweak the part about ~/.extra

.bash_prompt: Add screenshot URL

.bash_profile: Be sure to source `.bash_prompt` first, in case it sets the PATH and subsequent dotfiles rely on it

.aliases: Use `sudo` to empty local trash as well

nerfing .vimrc's setrelativenumber and undodir options in case of older vim version

.vimrc: Tabs, not spaces

Add `urlencode` alias

Via http://twatlr.com/thread/166830178226540544.

Add .gvimrc and gVim-specific color scheme

.aliases: Make `emptytrash` clear Apple System Logs

This results in a faster shell launch. I just deleted 5.1 MB of logs and my shell startup time went from about 3 seconds to 3 milliseconds (or so it feels).

Shift the '-type f' argument before the '-name' argument in `find` to make it more efficient.

.vimrc: Add some goodies found in @alrra’s dotfiles

.osx: Make ⌘ + F focus the search input in iTunes

Move `undopush` alias to `.gitconfig`, as suggested by @necolas

Also, add some other Git aliases while we’re at it.

.gitconfig: Add comments

.gitconfig: Add `go` and `ca` aliases

.gitattributes: Add a comment explaining what `* text=auto` does

.gitconfig: Add `c` alias which clones a repository including all submodules

.gitconfig: Add `d` alias

.osx: Enable snap-to-grid for desktop icons

Ref. #5

.osx: Tweak some more hidden preferences

Thanks to @Lri! Ref. #5.

.bash_profile: Tweaks

* Append to the Bash history file, rather than overwriting it
* Autocorrect typos in path names when using `cd`

README: Add @necolas and @tejr

.inputrc: Don’t prompt when autocompleting unless there are over 500 possible completions

See http://blog.sanctum.geek.nz/lazier-tab-completion/.

.gitconfig: Use `origin` as the default remote on the `master` branch

Apparently there are cases where this is not the default: http://stackoverflow.com/q/658885/96656

Hat tip to @cowboy.

.osx: Disable the “reopen windows when logging back in” option

.functions: Add `gurl` function for gzip-enabled `curl`

Inspired by @bluesmoon: http://twitter.com/bluesmoon/status/179982379098710017

.wgetrc: Initial commit

Disclaimer: most of these settings have been stolen from @janmoesen’s extremely well-commented .wgetrc.

.screenrc: Initial commit

Inspired by @janmoesen’s .screenrc.

.wgetrc: Remove the `iri` command

It’s enabled by default on builds that support it, and setting in other builds throws an error.

.wgetrc: Remove the `local_encoding` setting for now

Is it possible to conditionally configure a wget setting, only if it’s supported by the current wget build? http://unix.stackexchange.com/q/34730/6040

.functions: Add `dataurl` function

Based on @lri’s http://lri.me/profile.

.brew: Initial commit

Make .brew executable

.functions: Alias `diff` to `git diff` when available

.aliases: Enable sudo with aliases

@janmoesen explains it here: janmoesen/tilde@805e811

http://www.gnu.org/software/bash/manual/bashref.html#Aliases says: “If the last character of the alias value is a space or tab character, then the next command word following the alias is also checked for alias expansion.”

.aliases: Add `update` alias

Added codepoint function

Added newline after codepoint

.functions: Minor comment tweaks

.osx: Show status bar in Finder

.osx: Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app

Thanks to @zmoazeni for the suggestion.

.osx: Fix typo in the Dock spring loading tweak

TextMate is awesome, but it would be nice to have a SublimeText alias, too.

.osx: Remove the auto-hiding Dock delay

.osx: Enable the debug menu in iCal and Address Book

Thanks to @3vincent. See issue #5: mathiasbynens/dotfiles#5 (comment)

.exports: Highlight (color-code) section titles in manual pages

Added default to add a spacer to the dock.

.osx: Disable the “add spacer to Dock” commands by default

Added line to add text selection to QuickLook

Created another entry for the ability to select text when viewing a
document in QuickLook

.osx: Minor tweaks

.osx: Group commands by type

.bash_profile: Add tab completion for `killall SystemUIServer`

.osx: Make Trackpad settings more robust

Fixes #48.

.osx: Add hot corners

.osx: Cleanup

.osx: Add “focus follows mouse” commands for Terminal.app and X11 apps

I disabled (commented) these settings by default as I think it’s confusing that “focus follows mouse” works only for some apps. I’d rather have consistent, less confusing behavior across all apps, even if it’s not as useful.

.osx: Prevent Time Machine from prompting to use new hard drives as backup volume

.aliases: More generally useful shortcuts

.aliases: Better organization

.osx: `killall` all affected apps

.bash_profile: Add `killall` tab completion for common apps

.brew: Add `exiv2` and `imagemagick` (disabled by default)

I have some others in my `brew ls` that I’ll probably add soon.

.brew: Disable `exiv2` and `imagemagick` by default

.gitconfig: Make `git ca` remove deleted files, too

remove dupe config from .inputrc (compare lines 7-8)

Fix error thrown when Reseting Launchpad in some conditions

When multiple *.db files existed in ~/Library/Application Support/Dock/ ,
[ -e ~/Library/Application\ Support/Dock/*.db ] would throw an error.

adding screenshot location and file format

.osx: Clean up after commit 5b36bee

Icon size of 48 pixels for dock items

.osx: Set the icon size of Dock items to 36 pixels

Comment out change of "Open windows on startup", OSX 10.7.4 introduces this by default

.osx: Remove the “disable reopen windows when logging back in” command

This behavior was fixed in OS X 10.7.4, and the previous solution was a hack anyway.

Maximum set volume is 7, not 10

See:
http://docs.info.apple.com/article.html?path=AppleScript/2.1/en/as213.ht
ml

.aliases: Make `ips` show IPv6 addresses as well

.gitconfig: Add `credit` alias to quickly change the author of the latest commit

Inspired by @holman’s https://github.com/holman/dotfiles/blob/master/bin/git-credit.

Update .inputrc

.functions: Add `gz` function to get gzipped file size

.gitconfig: Add `tags`, `branches` and `remotes` aliases

.gitconfig: Show the diff when writing a commit message

Thanks to @miketaylr: http://twitter.com/miketaylr/status/209688450868326400

.gitconfig: Tweak `ca` alias

Thanks to @necolas! mathiasbynens/dotfiles@15d4c95#commitcomment-1416521

.vimrc: Use the OS clipboard by default

Add .hushlogin

The mere presence of this file in the home directory disables the system
copyright notice, the date and time of the last login, the message of the
day as well as other information that may otherwise appear on login.
See `man login`.

.aliases: Add `....` and `.....`

.aliases: Add `h` (`history`) and `j` (`jobs`)

.bash_profile: Add tab completion for many more commands

.vimrc: Explicitly allow the use of backspace in insert mode

.vimrc: Fix typo in comment

.gitignore: Ignore compiled Python files

.hgignore: Initial commit

.bash_profile: Load `.extra` last, allowing it to override any previous settings

.osx: Set language and text formats

.osx: Disable “natural” (Lion-style) scrolling

.osx: Fix typo

.osx: Enable swipe between pages with three fingers

Ref. #80. Thanks to @Lri for the help.

.osx: Group commands in categories

.osx: Minor formatting tweak

.aliases: Update to `stat` v8.17 (GNU coreutils)

.osx: Enable the debug menu in Disk Utility

.osx: Disable automatic termination of inactive apps

.osx: Speed up Mission Control animations

Note that I don’t completely disable the animation, as that results in a very unpleasant effect.

.brew: Install a recent version of `grep`

.brew: Install GNU core utilities (those that come with OS X are outdated)

.osx: Explicitly enable swipe between pages

Ref #80.

README: Mention `.brew`

Ref. #83.

.osx: Make iTunes arrows go to your library by default (rather than the iTunes Store)

.osx: Disable the iTunes arrow links completely

Enable some Bash 4 features when possible:

- `autocd`
- Recursive globbing

Remove the feature tests for Bash 4 features and just fail silently

Hat tip: @svnpenn.

.bash_prompt: Tweak `$PS2`

.osx: Show hidden files by default in Finder

I’ve had the `show` and `hide` aliases for ages, but since I use `show` as
the default setting, it makes sense to include it in `.osx` as well.

.vimrc: Respect modeline by default

.vimrc: Enable per-directory `.vimrc` files

Ref. #86. Thanks to @necolas for the suggestion.

.osx: Increase sound quality for Bluetooth headphones/headsets

This has the same effect as setting Bluetooth Explorer → Utilities →
Special Options → Minimum bitpool to `40`. See
http://scott.dier.name/2009/10/osx-snow-leopard-a2dp.html.

.brew: Install PHP 5.4

.aliases: Support colorized output for `ls` 8.17 only (GNU coreutils)

.aliases: Detect which `ls` flavor is in use and use the appropriate flag for colorized output

Thanks to @divya for making me do this ;)

.aliases: Optimize the way we detect the `ls` flavor

Follow-up to 4169a34. Thanks to @janmoesen!

.aliases: Optimize the `ls` flavor detection even further

Ref. #89.

.osx: Hide the useless Time Machine and Volume icons

Fun fact — this is what the OS X Mountain Lion menu bar looks like
with all the menu extras (/System/Library/CoreServices/Menu Extras)
enabled: http://i.imgur.com/DHTuw.png

.osx: Comment out the line that enables the 2D Dock

I’ll try out the new frost glass Mountain Lion Dock for a while.

.osx: Add Twitter.app settings

.aliases: Make `update` update `npm` and its installed packages as well

.bash_profile: Source `~/.extra` before the other dotfiles

This is needed in case `$PATH` is expanded in `~/.extra`.

.osx: Show icons for hard drives, servers, and removable media on the desktop

.osx: Add more Finder settings for icons on the desktop and in icon views

.osx: Set computer name

.osx: Don’t show Dashboard as a Space

.osx: Group windows by application in Mission Control

.osx: Hide Safari’s bookmarks bar by default

.functions: Attempt to make `server` open the browser *after* the server has started

.osx: Use the Pro theme by default in Terminal.app

.osx: Enable the Develop Menu and the Web Inspector in Safari

.osx: Add commented out command to disable smooth scrolling

This is only really useful on older Macs that mess up the animation.

.brew: Install GNU Find Utilities, `g`-prefixed

Thanks to @jacobj and @olov for the suggestion.

.aliases: Add `lscleanup` alias that cleans up LaunchServices

This removes duplicates in the “Open With” menu.

.osx: Enable HiDPI display modes without using Quartz Debug

.aliases: Add `ios` alias to launch iOS Simulator

.functions: Add `unquarantine` which force-removes a downloaded app or file from the quarantine

Thanks to @jasomill on Hacker News: http://news.ycombinator.com/item?id=4307379.

.brew: Fix typo

Thanks to @oschrenk for the heads up on mathiasbynens/dotfiles@8a79072#commitcomment-164452.

.osx: Use a modified version of the Pro theme in Terminal.app

.osx: Allow hitting the Backspace key to go to the previous page in Safari’s history

.brew: Remove outdated versions from the cellar

.osx: Don’t group windows by application in Mission Control

This makes it use the old Exposé behavior instead.

.aliases: Add `mergepdf` alias that concatenates PDF files

Credit goes to Fritz Stelluto: http://blog.gotofritz.net/howto/joining-pdf-files-in-os-x-from-the-command-line/.

.functions: Add `note` and `remind`

`note` quickly adds a note to Notes.app, and `remind` adds a reminder to — you guessed it — Reminders.app. Both applications are available on OS X 10.8.

Note that in order for `note` to work, iCloud sync must be enabled for Notes.app.

.osx: Explain how to use the ⌘ + F iTunes hack with other system languages

Thanks to @renaudleo for this discovery.

.aliases: Make `fs` work with both GNU `stat` and OS X `stat`

.osx: Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app

.osx: Reveal IP address, hostname, OS version, etc. when clicking the clock in the login window

.osx: Ask for the administrator password upfront

Use @cowboy’s `sudo` keep-alive snippet (https://gist.github.com/3118588)
to continuously update the existing `sudo` time stamp until `.osx` has
finished running.

.osx: Kill the affected applications by their new OS X 10.8 names as well

E.g. by killing both iCal and Calendar we support pre-OS X 10.8 and OS X 10.8 itself.

.osx: Add a note about the iTunes track notifications in OS X 10.8

.functions: Rename `md` to `mkd` now that OS X 10.8 has an utility named `md`

.osx: Remove the iTunes track notifications tweak

It crashes the Dock in OS X 10.7.4 and doesn’t work in OS X 10.8 anyway.

Ref. mathiasbynens/dotfiles@45c1bce#commitcomment-1671603.

.osx: Add a note saying that the iCal debug menu tweak doesn’t work in OS X 10.8

Ref. #113.

.osx: Update some iTunes tweaks to work with iTunes 10.6.3

Ref. #114. Thanks to @mourawaldson for the heads-up!

.aliases: Use `command -v` instead of `type -t`

`type -t` is not as portable (i.e., not in POSIX) as `command -v`, and `command -v` also takes aliases and functions into account.

Ref. #109.

.bash_profile: Source `~/.path` before and `~/.extra` after all the other dotfiles

.bash_profile: Fix typo

Only source `~/.extra` once.

.functions: Make `dataurl` more generic

.functions: Add `phpserver`

Ref. #116.

.bash_profile: Update `killall` Tab completion for OS X 10.8

README: Add example `~/.path` file

.osx: Use list view in all Finder windows by default

http://superuser.com/questions/320955/forcing-lion-finder-to-open-in-list-view#comment345957_320955

bin: Add `subl` symbolic link

.bash_profile: Add `~/bin` to the `$PATH`

Just like before, the `$PATH` can still safely be extended by adding `~/.path`.

.exports: Append `ls` with an argument to the `$HISTFILE`

.osx: Set NetBIOS name

.osx: Set the timezone

.osx: Enable advanced image options in Disk Utility’s debug menu

.osx: When performing a search, search the current folder by default in Finder

.osx: Enable access for assistive devices

.osx: Enable scroll to zoom

.osx: Add energy saver settings

.osx: Automatically illuminate built-in MacBook keyboard in low light

.brew: Install Bash 4

.osx: Drop the energy saver preferences

bin: Update Bash symlink

.osx: Disable the Genius sidebar in iTunes

.osx: Disable radio stations in iTunes

.osx: Set Safari’s home page to `about:blank`

.osx: Add energy saver preferences

README: Credit Chris Gerke (@cgerke)

.osx: Automatically quit printer app once the print jobs complete

.osx: Disable the crash reporter (commented)

.osx: Set Help Viewer windows to non-floating mode

.osx: Add TextEdit settings

.osx: Add Transmission.app settings

.osx: Add SizeUp.app preferences

README: Credit @ptb

.osx: Use `sudo` to set the NetBIOS name

.osx: Hide `systemsetup` output when setting the timezone

.osx: Improve categorization

.osx: Save to disk (not to iCloud) by default

README: Credit Lauri

.osx: Tweak formatting

.aliases: Add `badge`

This rings the terminal bell, and — when using Terminal.app — puts a badge on its Dock icon. Screenshot: http://i.imgur.com/OtYdu.png

.osx: Prevent Safari from opening ‘safe’ files automatically after downloading

Ref. #123.

.functions: Optimize `dataurl`

Thanks to @lri: fin1te/dotfiles@b8ce15e#commitcomment-1749202

.functions: Add `fs`

…and remove the `fs` alias from `.aliases`.

Ref. #125.

README: Link to @matijs/dotfiles instead of @matijs/homedir

.aliases: Make `flush` kill `mDNSResponder` as well

Ref. #126 and http://support.apple.com/kb/HT5343.

.osx: Add iPhone Simulator.app to Launchpad

.aliases: Remove `ios`

.gitconfig: Add `reb` alias

Stolen from porada/dotfiles@05162b5.

.aliases: Add `gurl` for Gzip-enabled `curl`

Ref. 1b3ed7a.

.osx: Check for software updates daily

.osx: Enable the WebKit Developer Tools in the Mac App Store

More info here: http://osxdaily.com/2011/09/07/enable-element-inspector-mac-app-store/

Ref. #129.

.functions: Tweak `fs`

.gitconfig: Tweak `diff` aliases

.gitconfig: Explain `diff`-related aliases

.osx: Correct symlink for iOS Simulator

Ref. #135.

.osx: Restart Dashboard

.aliases: Add `dt`

.osx: Consistency tweaks

.aliases: Alias `sha1sum` if needed

Ref. #141.

.aliases: Add `dl`

Ref. #142.

.aliases: Make `update` update Ruby gems as well

.osx: Allow installing user scripts via GitHub or gists

.osx: Allow installing user scripts via Userscripts.org

.aliases: Make `update` run `brew cleanup`

Thanks to @patrickkettner for the suggestion on Twitter:
http://twitter.com/patrickkettner/statuses/254387082791903232

.osx: Add Mac App Store section

- Move existing command to new section
- Add debug menu command

Ref. #150.

README: Recommend sourcing the bootstrapper

Thanks to @svnpenn and @nvartolomei in mathiasbynens/dotfiles@a77f487#commitcomment-2100022, and thanks to @janmoesen for the BASH_SOURCE pointer.

.osx: Add command to remove all Dock icons

.bash_prompt: Use `tput setaf 0` for white

Using `tput setaf 0` instead of `tput setaf 256` makes sure that `WHITE` is white instead of the previous color.

Thanks to @rudolph9 for reporting this in #153.

bin: Update to Bash 4.2.39

.gitconfig: Set `push.default = simple`

This will be the default in Git v2.

.bash_prompt: Fix `parse_git_dirty` for Git v1.8.0+

Git 1.8.0+ says “nothing to commit (working directory clean)”.
Older Git versions return “nothing to commit (working directory clean)”.

Thanks to @nicolahery in #143 for the suggestion.

.aliases: Add `map`

Ref. #157.

.functions: Make `gz` more awesome

.aliases: Lowercase `com.apple.finder`

Hat tip: @alrra.

.osx: Show item info to the right of the icons on the desktop

.functions: Add `calc`

.bash_profile: Move the `LANG` & `LC_ALL` exports into `.exports`

.osx: Remove the iTunes Ping settings

Apple officially closed the iTunes Ping service on September 30th, 2012 (http://i.imgur.com/U7bHo.jpg).

.osx: Document the various values for Hot Corners settings

.osx: Clarify that the iTunes settings are for pre-iTunes 11 only

README: Update Lauri Ranta’s hidden preferences URL

The previous URL now 404s.

bin: Update to Bash 4.2.42

.osx: Fix typo

Ref. #183.

.functions: Add `getcertnames`

This function shows all the names (CNs and SANs) listed in the SSL certificate for a given domain.

As always, improvements and other feedback is welcome!

.functions: Improve `getcertnames`

Follow-up to 12bb9da.

Many thanks to @dserodio!

.osx: Tweak language settings comment

Fixes #189.

.osx: Show the path bar in Finder

.osx: Add Notification Center value for hot corners

Ref. #187.

.bash_profile: Support hostname aliases defined in `~/.ssh/config`

`~/.ssh/config` allows for the usage of hostname aliases, formatted as follows:

    Host first_alias second_alias third_alias
    HostName foo.example.com

This change makes sure these aliases are parsed out individually and added to the autocomplete list.

Ref. #178.

.osx: Disable Notification Center

This also removes the annoying menu bar icon.

Ref. #168.

Use newlines at EOF consistently

.osx: Enable the MacBook Air SuperDrive on any Mac

Ref. #146.

.osx: Disable Dashboard

Ref. #136.

.osx: Configure spring loading for directories

Ref. #133.

.osx: Set highlight color to orange

.osx: Set sidebar icon size to medium

.osx: Fix typo

.brew: Install Lua 5.2

I need this specific version to test the new `GotoStatement`s in Lua during http://mths.be/luamin development.

.gitconfig: Remove the destructive `undopush` alias

.osx: Set standby delay to 24 hours

Hat tip: http://www.ewal.net/2012/09/09/slow-wake-for-macbook-pro-retina/

.bash_profile: Autocomplete Grunt commands

Ref. https://github.com/gruntjs/grunt-cli#shell-tab-auto-completion

.functions: Print trailing newlines when not piping the output

Add .curlrc

Closes #152.

.aliases: Add `week`

Thanks to @sindresorhus: https://twitter.com/sindresorhus/status/312206490880589824

.functions: Add `cdf`

`cdf` changes the working directory to the top-most Finder window location. Thanks to @sindresorhus and @paulirish!

.exports: Always enable colored `grep` output

bootstrap.sh: Pull from the master branch explicitly

.osx: Add possible values for AppleShowScrollBars

Ref. #170.

Update shebangs

If the user installs a custom Bash build, why not use it?

Ref. #196 and #198.

README: Add author field

.functions: Add `targz`

`targz some-directory` creates `some-directory.tar.gz`, where compression is handled by either `zopfli` (if available) or `gzip`.

.functions: Avoid `rm` error message in `targz` when `gzip` is used

.functions: Improve `targz`

* Only use `zopfli` when it’s available and if the `.tar` file is smaller than 50 MB.
* Use `pigz` instead of `gzip` when it’s available.
* Always exclude `.DS_Store` files when creating a tarball.

Closes #199.

bootstrap.sh: Don’t make the home directory world-readable

Fixes #159.

.brew: Install native apps through homebrew-cask

Closes #200.

.brew: Add some more applications

.osx: Update filename for Dropbox’s green checkmark icon

README: Update contributors list

Add @sindresorhus and @alrra because of their many contributions. Sort the list alphabetically.

README: Fix minor typo

.functions: Tweak `targz`

Trim the trailing slash from the path argument passed to `targz`.

This fixes the annoying behavior where `targz foo/` created `foo/.tar.gz` instead of `foo.tar.gz`.

Ref. #202.

.gitconfig: Use `push.default = matching`

I couldn’t get used to `simple`.

.functions: Add `gi`

This is an easy way to install Grunt plugins and add them as `devDependencies` to `package.json`.
Example:

    gi contrib-watch contrib-uglify zopfli

Closes #191.

.functions: Improve `note`

Give the Notes.app function the ability to add both `title` and `body`.

Closes #203.

.functions: Improve `httpcompression` and move it to its own file

Closes #162.

Dual license these dotfiles under MIT/GPL

As requested by @lathan. Closes #205.

.osx: Fix `ShowPathBar` typo

Closes #204.

.bash_profile: Try to grunt more quietly

Ref. #209.

.functions: Add `gitio`

Closes #210.

.osx: Don’t automatically rearrange Spaces

Closes #213.

.gitconfig: Tweak `l` alias

Update to Bash v4.2.45

.osx: Update the GitHub fork link

Closes #221.

Remove GPL license

The MIT license is GPL-compatible anyway, as per @sindresorhus. Ref. mathiasbynens/dotfiles@a89e2f2#commitcomment-3485954.

bootstrap.sh: Avoid `source` if there are no changes

Closes #220.

.aliases: Make Grunt print stack traces by default

README: Tweak Git-free install command

bin: Update `subl` symlink to `Sublime Text 3.app`

.osx: Add Spotlight settings

Closes #91 and #174.

.bash_profile: Remove ‘autocomplete Grunt commands’

Closes #224.

.brew: Install PHP 5.5

.gitattributes: Disable normalizing line endings globally

Instead of removing `~/.gitattributes` completely, I decided to just comment out the `* text=auto` line. This makes it easier to temporarily re-enable the setting should I ever want to.

Closes #149.

.curlrc: Disguise as IE 9 on Windows 7

This matches the `.wgetrc` settings.

.aliases: Add `timer`

`timer` can be used as a stopwatch.

Hat tip: https://twitter.com/tow8ie/status/360077953238962176

.gitconfig: Improve display of astral Unicode symbols in diffs

Thanks to @holman for the tip: https://speakerdeck.com/holman/more-git-and-github-secrets?slide=38

.osx: Add GPGMail 2 settings

http://support.gpgtools.org/kb/faq-gpgmail/gpgmail-2-hidden-settings

.osx: Disable the sound effects on boot

.aliases: Add `-F` to `ls` aliases

Don’t do this for the default `ls`, though.

Closes #234.

bin: Point `subl` to the default ST3 location

Sublime Text 3 does not use the `/Application/Sublime Text 3.app` folder by default. It uses `/Application/Sublime Text.app`.

Closes #232.

.gitconfig: Remove global remote branch

This causes duplicate remotes to be created, potentially leading Git to throw errors when `push`ing.

Closes #215.

.aliases: Add `chromekill` to kill all Chrome tabs to free up memory

Useful when you have a lot of tabs open (which I always do), but you don’t want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.

Closes #236.

.osx: `~/.CFUserTextEncoding` can break several Adobe apps

Ref. #237.

.gitconfig: Add comment about `color.ui` in Git ≥ 1.8.4

Ref. #239.

.gitconfig: Add note about whitespace defaults

Closes #256.

.functions: Add `m` to open stuff in TextMate

Closes #253.

.functions: Add `s` to open stuff in Sublime Text

Closes #252.

.functions: Add `v` to open stuff in Vim

Closes #251.

.bash_profile: Make sure only files get sourced

Closes #250.

.functions: Add `o` to `open` stuff

Closes #245.

Add `np` function to ease publishing node modules

I use this to ease the publishing of npm modules. `np`, done ;)

np = npm publish (and, `no problem`, (and `nutella party`))

Closes #261.

.osx: Remove “Enable access for assistive devices”

This feature doesn’t work anymore in OS X 10.9 Mavericks. The setting has moved to System Preferences → Security & Privacy → Accessibility, where you now have to check every app you want to allow access rather than enabling it globally.

Closes #262.

.osx: Use plain text smileys in Messages

Messages in OS X 10.9 Mavericks automatically substitutes e.g. `:)` with `😊`, with no way to disable this feature through the app’s preferences pane.

After analyzing the `defaults read` output it turns out there is a hidden preference for it.

.osx: Consistently specify the type for `dict-add` actions

.functions: Add `tre` shorthand

Closes #249.

.osx: Disable smart quotes in Messages.app

.osx: Disable continuous spell checking in Messages.app

.brew: Move casks to their own file

.osx: Add threaded email display settings for Mail.app

.osx: Remove old iTunes commands

They only applied to iTunes 10 and older anyway.

.osx: Make coding style more consistent

.osx: Disable inline attachments in Mail

Thanks to Christophe Platteeuw via Twitter: https://twitter.com/cplatteeuw/status/393465401310318592

.osx: Disable automatic spell checking in Mail.app

.osx: Stop iTunes from responding to the keyboard media keys

Commented out, as I actually use these keys.

Closes #265.

.osx: Suppress error messages when running `~/.osx` twice

Closes #266.

.aliases: Improve `ips`

Ref. #268 and #269.

Make `.cask` executable

.osx: Minimize windows into their application’s icon

Closes #271.

init: Add iTerm colors

Closes #274.

init: Install Sublime Text settings

Closes #275.

.osx: Rename computer name

.aliases: Lowercase `projects` dir

.osx: Don’t prompt when quitting iTerm

README: Update link to Lauri Ranta’s resources

.osx: Add SSD-specific tweaks

Source: http://forums.macrumors.com/showthread.php?t=1505922

.osx: Remove broken three-finger swipe commands

If anyone knows how to make this work, please let me or @necolas know!

Ref. #171.

.osx: Don’t `kill` Dashboard

`killall Dashboard` doesn’t actually do anything. To apply the changes for Dashboard, `killall Dock` is enough as Dock is Dashboard’s parent process.

Closes #277.

.aliases: Add `afk` to lock the screen

Closes #258.

README: Document the `.cask` file

Closes #280.

.osx: Disable smart quotes and dashes

.aliases: Add `reload`

`reload` invokes the shell as a login shell, which essentially reloads it.

Closes #247.
767bad8
Mathias Bynens

Some more goodies: amlweems/tilde@8f92281

Kevin Suttle

Just a heads up to anyone subscribed to this thread: https://github.com/kevinSuttle/OSXDefaults/blob/master/REFERENCE.md

Kornel

@mathiasbynens Re: dtrace http://pastebin.com/QRbJQs5M

#!/usr/sbin/dtrace -q -s


CFPreferencesServer$target:::request {
   printf("REQUEST from pid %d at %Y ( domain: %s, user: %s, host: %s, container: %s, managed: %d)\n", arg0, walltimestamp, copyinstr(arg1), copyinstr(arg2), copyinstr(arg3), copyinstr(arg4), arg5);
}

CFPreferencesServer$target:::write_rejected {
   printf("REJECTED WRITE request from pid %d for reason %s at %Y ( domain: %s, user: %s, host: %s, container: %s)\n", arg0, copyinstr(arg5), walltimestamp, copyinstr(arg1), copyinstr(arg2), copyinstr(arg3), copyinstr(arg4));
}

CFPreferencesServer$target:::write {
   printf("ACCEPTED WRITE from pid %d at %Y ( domain: %s, user: %s, host: %s, container: %s)\n", arg0, walltimestamp, copyinstr(arg1), copyinstr(arg2), copyinstr(arg3), copyinstr(arg4));
}

/*
CFPreferencesServer$target:::cache_miss {
   printf("CACHE MISS from pid %d at %Y ( domain: %s, user: %s, host: %s, container: %s, managed: %d)\n", arg0, walltimestamp, copyinstr(arg1), copyinstr(arg2), copyinstr(arg3), copyinstr(arg4), arg5);
}
*/

CFPreferencesServer$target:::read_rejected {
   printf("REJECTED READ request from pid %d for reason %s at %Y ( domain: %s, user: %s, host: %s, container: %s, managed: %d)\n", arg0, copyinstr(arg6), walltimestamp, copyinstr(arg1), copyinstr(arg2), copyinstr(arg3), copyinstr(arg4), arg5);
}

CFPreferencesServer$target:::read {
   printf("ACCEPTED READ from pid %d at %Y ( domain: %s, user: %s, host: %s, container: %s, managed: %d)\n", arg0, walltimestamp, copyinstr(arg1), copyinstr(arg2), copyinstr(arg3), copyinstr(arg4), arg5);
}

CFPreferencesServer$target:::persist {
    printf("SAVING %s TO DISK at %Y\n", copyinstr(arg0), walltimestamp);
}

CFPreferencesServer$target:::error {
    printf("ERROR %s at %Y\n", copyinstr(arg0), walltimestamp);
}

BEGIN
{
    printf("Monitoring cfprefsd instance %d\n\n", $target);
}
Mathias Bynens mathiasbynens referenced this issue in kevinSuttle/OSXDefaults January 13, 2014
Open

Implement dtrace #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.