Вы находитесь на странице: 1из 5

sudokillallVDCAssistant

Turn Off Resume on a Per App Basis


Here are a few example defaults strings for individual applications, and then well show you how to find your own strings for other
applications:
Turn Off Resume for Safari

defaultswritecom.apple.SafariNSQuitAlwaysKeepsWindowsboolfalse
Turn Off for Google Chrome

defaultswritecom.google.ChromeNSQuitAlwaysKeepsWindowsboolfalse
Turn Off for QuickTime Player X
defaultswritecom.apple.QuickTimePlayerXNSQuitAlwaysKeepsWindowsboolfalse

Turn Off for Preview

defaultswritecom.apple.PreviewNSQuitAlwaysKeepsWindowsboolfalse
You will want to relaunch whatever application you have disabled the feature for in order for changes to take effect.
Disabling Resume for Other Applications
For disabling Resume with other applications, you will want access to your personal Library directory (remember that /Library and
~/Library are different) so that you can find the exact app name syntax. The folder you are looking for is:

~/Library/SavedApplicationState/
I like the Go To Folder function since its easy to access with Command+Shift+G but you can get there through Option-Clicking on the
Go menu too.

Once you are in your personal librarys Saved Application State folder, what you are looking for is
com.developerName.ApplicationName.savedState, for another example well pick Terminal which is in this directory as
com.apple.Terminal.savedState.

Remove All Applications from Launchpad


Method 2) Using the Terminal removes any application
Launch the Terminal and enter the following command, replacing APPNAME with the name of the application you want to
remove from Launchpad:

sqlite3~/Library/Application\Support/Dock/*.db"DELETEfromappsWHERE
title='APPNAME';"&&killallDock
For example, removing TmpDisk would be:

sqlite3~/Library/Application\Support/Dock/*.db"DELETEfromappsWHERE
title='TmpDisk';"&&killallDock
Launchpad will automatically refresh, open it to see the changes.

Remove All Applications from Launchpad


Using the Terminal again, the entire Launchpad can be wiped free of all apps, giving you a fresh start. To do this, enter the
following command in the Terminal:

sqlite3~/Library/Application\Support/Dock/*.db"DELETEfromapps;DELETEfrom
groupsWHEREtitle<>'';DELETEfromitemsWHERErowid>2;";killallDock
Note that there is no undoing this last change, if you use that command you will have to manually add all apps on your own
by dragging them into the Launchpad dock icon, or go with the default approach by refreshing Launchpad.

Discard the .savedState extension and enter the first part of the directory name into the same command used above, so it will look
like:

defaultswritecom.apple.TerminalNSQuitAlwaysKeepsWindowsboolfalse

Enter that into the command line and relaunch Terminal and Resume will no longer be activated for that app only. Just as the other
method, you can do this with as many or as few apps as you want.

How to Turn Resume Back On for Specific Applications


Reenabling Resume in Lion is just as easy as turning it off, we just need to adjust the defaults write command with a TRUE statement
rather than FALSE. Taking Safari as an example, the command would be:

defaultswritecom.apple.SafariNSQuitAlwaysKeepsWindowsbooltrue

Opening apps in fullscreen automatically

I'm wanting to make applications such as Chrome open in full screen automatically, I know it may seem like a small thing but it just makes
things a bit easier and quicker.
I have this AppleScript that I am running through an Automator app
Code:

if application "Google Chrome" is not running then


tell application "Google Chrome"
activate
tell application "System Events"
delay 2
keystroke "f" using {shift down, command down}
end tell
end tell
end if

Step1
Click the "Spotlight" button, which is the magnifying glass in the upper-right corner, and type "applescript editor" (without quotation marks).

Step2
Paste the following into the AppleScript Document:
tell application "Google Chrome"
activate

tell application "System Events"


key down {command}
key down {control}
keystroke "f"
key up {control}
key up {command}
end tell
end tell
Related Reading: How to Open a Picture in Full Resolution on a Mac

Step3
Click the "File" menu and select "Save As."

Step4
Type a name, such as "Chrome Full-Screen," into the File Name field.

Step5
Click the "File Format" drop-down menu and select "Application."

Step6
Click "Save." An alias that will always launch Chrome in full-screen will be saved to your desktop.