
~/.osx updated — sensible hacker defaults for OS X Mountain Lion - mathias
https://github.com/mathiasbynens/dotfiles/blob/master/.osx?os-x-10.8
======
oacgnol
As with any dotfile repo, I wouldn't recommend installing the entire thing at
once. Instead, try and take the time to read through it and select settings
that you want piecemeal. You'll end up knowing what everything does,
especially in the case that something strange happens and you want to tweak
things.

Edit: I should note that I learned this the hard way starting out, I went
backwards by ripping out things that didn't work for me/did not like, but not
until after making some horrible mistakes!

~~~
mathias
As the author of this dotfiles repository, I completely agree. These are my
settings, and I’m sure not everyone will like this configuration. The idea is
that automating all these OS X preferences (hidden or not) can save you a lot
of time if you need to set up new accounts for yourself on a regular basis.

TL;DR This repository is meant to be forked, not used as-is.

~~~
gdg92989
For example, dont use this AS-IS unless you want to make the scrollbar visible
all the time.

------
fredsted
This isn't "sensible hacker defaults", it's more like "some guy's view of what
Mac OS X should be like".

~~~
irons
Unilaterally resetting the scroll direction to the 10.6 standard is insanely
presumptuous.

~~~
swdunlop
So was unilaterally setting it to the 10.7 standard. I think we should have
the script flip a coin so people are annoyed evenly.

~~~
dasil003
It's not arbitrary though. The point was to move away from the metaphor of
moving _the window around a document_ to just manipulating the document
directly as you do in iOS. Granted it's not as obviously the right thing when
touch is not involved, but it is the right thing.

~~~
Evbn
Why did no one notice the supposed wrong behavior in 10.6? No one is fingering
their OS X displays.

~~~
dasil003
You've answered your own question.

The last time someone really thought about scroll direction was when they
invented the scroll wheel. The implementors associated it with the motion of
the position indicator in the scrollbar rather than the motion of the
document. The reason this is wrong is because it's an unnecessary indirection
from the document itself. At the time computers could not documents quickly
enough to have any kind of physicality, so the scrollbar + indicator were
critical UI elements simply for performance reasons (ie. the scrollbar is what
could be drawn fast enough to enable responsive dragging, and the window
wouldn't redraw til you let go). Once people got used to it, there was no
reason to question it until the modernization of touch interfaces where
suddenly the inconsistency became apparent.

~~~
swdunlop
While it may be wrong in theory, changing it meant that all muscle memory
developed by users thus far was thrown out of whack.

What was the gain for disorienting the users by introducing a new default? An
improvement in acceptance by users who had only used tablets and phones but
never PC's? Is that a large set?

~~~
dasil003
Consistency. It takes a few days to get used to then you have consistency
across the Apple platform for the rest of time.

------
msbarnett

         defaults write com.apple.LaunchServices LSQuarantine -bool false
    

This is a terrible idea. If your browser, or anything else, is ever conned
into downloading and opening a file, the quarantine is the difference between
"what the fuck, why is an executable I've never launched before trying to
launch?" and silently getting owned.

~~~
radley
Sorry - this is total security theater.

I download almost everything from the net - how else would I install? CD?
Floppy? Telling me that it's downloaded from the internet doesn't do anything
to identify that it's dangerous and so I ignore the warning.

Under what circumstance would I go "whoa, maybe it's dangerous this time"???

Mac's don't have auto-install .exe files. Yet we get warning for everything
from JPEGs to TXT to DMG. Ridiculous.

~~~
brigade
If you can execute code, said code could be an auto-installer.

If there's a vulnerability in the application used to open a JPEG or whatever,
you can execute code.

It's less asking "is this dangerous?" and more "did _you_ download and open
this?"

~~~
chc
If something else downloaded and opened the file, it's already owned your
account, hasn't it? The horses are out of the barn at that point, right?

~~~
brigade
There are 3 steps needed to exploit this attack vector (assuming no wetware
exploits):

1\. Download the file. Any website can do this by design.

2\. Get LaunchServices to open the file. This requires at least one
vulnerability.

3\. Bypass quarantine. This requires at least one additional vulnerability.

------
pixelcort
See also <http://secrets.blacktree.com> , a database of known hidden settings
that can be changed. There is also a Preference Pane available there that
makes it really easy to adjust them form System Preferences.

------
jkbr
This:

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

Combined with "Use OSX Finder Quicklook (Spacebar) to preview all plain text
files"[1] is pretty useful.

[1] <http://news.ycombinator.com/item?id=4230594>

------
glhaynes

      # Set language and text formats
      # Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with
      # `Inches`, and `true` with `false`.
    

:)

------
pooriaazimi
This is the most important one, that's not been mentioned in OP:

    
    
        defaults write -g NSScrollAnimationEnabled -bool NO
    

It disables the stupid "smooth scrolling". on Lion (and everything before
that) you could disable it from the 'General' tab of SysPrefs, but now it's
gone.

What does it do? When you press spacebar in a web browser, or fn-downarrow in
a text editor, it "smoothly" bring new content up from the bottom of the
screen and pushes current screen up.

I don't know, maybe it works great on recent machines, but my poor old 2009
MBP's graphics card is not really powerful, and this animation is not smooth
at all. It distracts me a lot.

I _strongly_ suggest you at least try it. If you don't like it, just replace
NO with YES and everything's back to normal.

~~~
ewillbefull
Is there a way to change or disable the animation time when switching between
spaces (or "desktops" as they are now called)?

~~~
cjlm
The only way I know of is with "TotalSpaces", currently in a free beta.
<http://totalspaces.binaryage.com/>

------
Watabou
Is it really beneficial to disable disk image verification? What does OS X
actually verify when it opens a disk image? It does take some time to verify
disk images and I want to be sure of what I'm actually disabling.

~~~
msbarnett
It's taking a CRC32 of the contents of the image and comparing it to the
expected value stored in the image.

I've very occasionally run across corrupted disk images, which is what this
catches.

~~~
binarycrusader
Considering I've frequently encountered this with botched downloads of disk
images from the Apple servers, this seems like something that shouldn't be
disabled.

And no, it isn't my system, it's Apple's servers; only have the problem with
downloads from them.

------
shelf
Great list. Stripping animations out is always appreciated.

Does anyone know how to alter / remove the animation from horizontal motion
between spaces? Particularly when using the keyboard shortcuts, this whizzing
is disorienting and irritating.

I assume it is not possible, given that animation seems to be keenly bound to
the trackpad 'peeking' operation and all.

~~~
cjlm
As mentioned above, I was happy to find TotalSpaces
(<http://totalspaces.binaryage.com/>) which allows you to disable it
completely!

------
mseebach
Looks great. How about making home/end on external keyboards go to
beginning/end of the line rather than the document?

~~~
ericb
I highly recommend this app for things like that:

<http://pqrs.org/macosx/keyremap4macbook/>

It does that, and many more useful things too. I have command on mac, and from
a different app, control on my ubuntu machines mapped to caps lock. So
wherever I am, I can use the same key combo...

------
brennenHN
That's a long list. I kind of want to run the whole thing just to see what
happens...

~~~
kcl
I wouldn't run the whole script blindly. You will have to do more than one
linear pass through the script to find and invert settings you later discover
you don't like.

I recommend one close readthrough, uncommenting or commenting things you do or
don't like, and then a full run. I do recommend running the script after a
careful edit. It will save you time.

~~~
mathias
As the author of ~/.osx, I agree. Never blindly copy anyone else’s settings.
Heck, never blindly copy _anything_.

------
jayferd
You know, when I tell people I use Linux, they usually say something like,
"But don't you have to spend countless hours on pointless yak-shaving tasks
just to get things to work sensibly?"

------
pkamb
`# Group windows by application in Mission Control`

`defaults write com.apple.dock "expose-group-by-app" -bool true`

Can't believe any hackers would use this. Mountain Lion was worth $20 just for
the new `false` alone.

------
stevencorona
I don't think I'd like this at all. What's the point of disabling animations,
system-wide resume, not letting the OS terminate inactive apps, etc?

~~~
radley
Animations take time and get old fast.

Terminating inactive apps doesn't work right. Often you'll try to reopen an
app (such as Preview) and it's stuck: finder thinks it's already open but it's
not. So you have to force close it and reopen it.

There's a lot of ideas in Lion & MLion that clearly should never have passed
if there was a tasteful gatekeeper at the helm, but now everyone's a UX expert
and it's a sloppy, half-baked mess of random, unchangeable preferences.

------
lovskogen
It would be great to have a script that setup your machine with all settings,
is there a list of all "defaults write" commands somewhere?

~~~
kjbekkelund
Check out <http://secrets.blacktree.com/>

~~~
mathias
Sadly, most of those are outdated. :(

------
89a
> Sensible

HAHA! What?

How on Earth are these sensible

> # Disable the warning before emptying the Trash

> # Empty Trash securely by default

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

