Crop Custom Part or as PNG to Desktop with cmd+shift+4 OR cmd+shift+3 for FULL Screenshot


<Clippy> OS X? pfft, how can I print full desktop screen prints like in Windows?

<Clippy> What’s the Mac/OS X alternative to the clumsy prnt-scrn (print screen) > paste > MS Paint > save > name and format (oops, saved as useless .bmp again?) > find the file (and possibly resize it if you forgot the first time around) > use file > delete > possibly repeat enter process > or clear clipboard if Windows is feeling sluggish, even if the perceived latency or load is purely psychological. Nothing subjective matters when your brain is subjectively seventeen times slower than “real” time.

Snippet of Desktop Screen Instantly Automatically Saves to BG

Shortcut to Crop Rectangle &  Save PNG to Desktop (or change default location/format)

The shortcuts use any combination of the left and right command/shift keys and either the number 3 (full screenprint) or 4 (crop rectangular area) If you want to workout your fingers, use use leftCommand + leftShift + rightCommand + rightShift + 3 (or 4)). Here’s the result, two screenshots,

In Mac OS X (From Yosemite to Maverick to Snow Leopard to Lion, etc)*, you can crop any part of any screen on any monitor you have running, anytime by using Command + Shift + 4 and check the desktop for a new image. (It helps to have it sorted by Date Modified)

Use Command + Shift + 3

and check the desktop for the new image(s).

Unclutted Your Desktop (Change location and format of stored shots/prints

Soon your desktop will look like this:

changing filename screenshot mac os x yosemite

Change Prefix of Default Screenshot Name Saved to Desktop

defaults write name “___ss” && killall SystemUIServer

Restore name to default “Screen Shot” prefix

defaults write name "Screen Shot" && killall SystemUIServer

WTF is a command or “defaults” anyway? The command line structure and syntax, dissected and easy to visualize.

Change Where Captured Shots Instantly Get Saved In

Instruct, invoke, run, execute, call the defaults cmd, which like most commands isjust the name of an app your (make sure it's open!, use SpotLight) or iTerm or other terminal emu or shell is aware of (technically it exists in your shell's $PATH variable) (usually) should write 3 underscores as a prefix to shots stored in ~/Pictures/Screenshots

Change the Format of the Saved Screenshot to JPG, TIFF, PDF, GIF or default PNG

defaults write type jpg
defaults write type tiff
defaults write type pdf
defaults write type gif
defaults write type png

*pro tip: To avoid repetition in documentation and tutorials, we can put all choices between square [ brackets ] and delimit or separate each choice with a vertical pipe |. The result is [only|one|of|these|words|not|all]. The above 5 calls to default can be abbreviated, ie in their man/documentation pages as:

defaults write type [png|tiff|jpg|pdf|gif]

though typing all of this out would be invalid. You just have to learn that a pipe | is an OR, as you agreed that in literature (or major languages) an ampersand & is an AND. Just remember it.

Read current format Images get Saved As

defaults read

Tip: This is how you read any of these “OS X user defaults”. The Command Line Explained in Detail. To see the documentation, type

man defaults

in the Terminal/iTerm/shell/Bash/Zsh and hit enter to read the manual page. press q or Q to quit and the UP arrow to cycle through the last commands you ran in descending order.


Troubleshooting / Screenshot shortcut doesn’t work?

It’s the number 4, not F4, ensure exclusively three keys held. If you can’t locate the images, open up Finder (Command + Space, type finder and press Return when it’s found (usually by the 3rd letter, ‘fin’. Typing nothing else and waiting will drop down mixed results. )

* You can do this in Microsoft Windows 7, Windows 8 or above by using the included SnipperTool.exe (type it into the Start > Search bar, then create a shortcut to it on your Start Bar and/or create a universal shortcut for it. and in Linux and other versions of Mac or Windows (XP, Vista, etc) using third party apps or browser extensions if you’re only interested in grabbing screen captures/crops within your browser.

WTF is a “command” or “passing arguments”? Making Sense of the Command Line

Meow Meow.. Let’s understand how commands, “passing things” to them and “executing” or “running” them works in the terminal/shell by giving hard definitions for what we think we understand a term (pun intended) to mean and how the operating system, shell, scripts, apps, commands, functions and arguments work and how our mental model of them may be (very) skewed.

The following command will replace the prefix for screenshots you automatically capture or crop to your desktop in OS X to “SS” instead of the default “Screen Shot”, just to use as an example. If hit cmd+space type ‘term‘ and wait for ambiguities or hit Return. A terminal window or “shell” where you can type stuff hopefully opens. WTF just happened?

You hit a universal OS X shortcut that runs Mac’s built in open command to execute some binary file (meaning a compiled source file) somewhere in
Then pass its main function 1 parameter, a string argument with a value of “term”- it does a fuzzy or wildcard search in the index of every single file/directory on your machine (except those you exclude)
defaults write name “SS” && killall SystemUIServer


defaults.write(defaults.get('').name('Screen Shot')

Let’s define some terms first

Kernel is the OS itself. The set of “functions” people at Apple, people they contracted and people before them wrote you’re running on the very expensive hardware Apple sold you. The Kernel class is a blueprint or sketch on a napkin, or a form of Plato’s kind, not a tangible thing, except in the following code syntax context, where tangible means a thing you can make instance an of, copy, mutate, read, write-to, etc. A tangible class is an instantiated object, rather than being an abstract class. Thing of a chair class vs an actual chair. Your physical body cannot sit on an abstract chair. It must exist. The “abstract chair” itself cannot just transform to a wooden tangible chair that follows the same rules as your body. It is only an idea, an electrical pattern humans conditioned themselves to agree on so solidly that we can build/import/export/buy/sell/make-shift/DIY/fix and do a million other things with this concept of a chair.

A Tangible class means an object and an abstract object means a class. Kind of. Avoid these terms. They are only here as a koan to break you from your usual stream of consciousness.

`kill` is a function, procedure or method, a “verb” on the concrete object. You can and do have abstract functionality on abstract objects (aka classes),


function killall(name) {
   Kernel.kill(Kernel.findIdByProccess(name), SIGNAL_TERMINATE);

defaults is an app, probably written in a language called C or in another call =ed Objective-C and compiled. It could also be written in Ruby, Python, Java, Javascript, Lua, or another interpreted language (“script”) that has its “executable” permission set ON. If you see something like |rwx-rw-r defaults| It is simple in that it probably is written to serve a single purpose. The Unix philosophy is “Write something that does one thing and does it well.” “one thing” is relative. Is “email” one thing? Is browsing the web “one thing”? It used to be, but now browsers are extremely complex pieces of architecture that seemingly do different things for different user archtypes.


killall SystemUIServer

Hard restart of the SystemUIServer (just an app running in the background. You can also kill it the hard way without a terminal by killing it using killall after defaults succeeds (the && is important)
killall SystemUIServer


Terminal/iTerm2/console/shell/Bash/Zsh.. are these synonymous?

Display Hidden (dotfiles) in OS X Finder

Showing hidden dotfiles in Finder

Showing hidden dotfiles in Finder

By default, files beginning with a dot (like the .DS_Store file prevalent in nearly every OS X directory* see note below on the awesome Asepsis) are hidden in OS X’ Finder. To enable this, use the following steps:

  1. Open Terminal found in Finder > Applications > Utilities. (or use spotlight CMD+space > Terminal
  2. In Terminal, paste the following:

    defaults write AppleShowAllFiles TRUE

  3. Press enter
  4. Now you need to reload Finder. I personally just type killall Finder in terminal and let Finder restart itself. An alternative is to hold alt (option) on your keyboard, then right click on the Finder icon in the dock and click Relaunch to restart Finder. Now you should be able to see dotfiles such as .DS_Store, .htaccess or .vimrc in Finder.
  5. To revert/disable this behavior, simply run the same command in the console passing TRUE instead of FALSE:

    defaults write AppleShowAllFiles FALSE

Used this post as reference for this post. Contains more details and a shell alias to toggle hidden files on/off

Note that you may substitute TRUE/FALSE with YES/NO in the above commands.

* To avoid having .DS_Store contaminating your entire OS X folder structure, I recommend highly Asepsis.

Shortcuts for OS X System Preference Panes

These shortcuts are activated by using Option (alt) + one of the Function (F1, F2, ..) keys.

If you have changed the function keys in the system preferences to actually be F1 instead of decreasing brightness, and you need to press Fn + F1 to lower brightness, then you will need to add the Fn to every shortcut below.

For example, the Keyboard Preferences Pane can be reached by using Option(ALT) + F5 or F6. If you need to use the Fn to access the out-of-the-box function of the function keys, then the Keyboard Preferences pane shortcut is Fn + Option(ALT) + F5 or F6.

The correlated preference pane for each Fn button is:

  • F1 Brightness- Function key: Display Preferences Pane
  • F2 Brightness+ Function key: Display Preferences Pane
  • F3 Mission Control Function key: Display Preferences Pane
  • F4 Dashboard Control Function key: Display Preferences Pane
  • F5 Keyboard Brightness Function key: Keyboard Preferences Pane
  • F6 Keyboard Brightness Function key: Keyboard Preferences Pane
  • F10 Mute Function key: Audio Preferences Pane
  • F11 Volume- Function key: Audio Preferences Pane
  • F12 Volume+ Function key: Audio Preferences Pane

Fixing Cmd+tilde (~`) shortcut to Switch Between Application Windows

If Cmd+` stops working on OS X Snow Leopard, Lion or Mountain Lion, enable it again by:

Top Left Apple Logo > System Preferences > Keyboard > Keyboard Shortcuts > ChooseKeyboard & Text input” in left list > Enable “Move focus to next window”

By default, this is set to Cmd` – to reset the actual shortcut key, double click “Move focus to next window” and hit Cmd + ` on your keyboard. Enables feature right away.

Normally in OS X shortcut Cmd + tilde (~) or Cmd + back tick/grave accent/backquote (`) lets you switch between windows in the current application.  For example, if you have multiple Chrome, TextEdit, MacVim etc windows open, you can press Cmd+ Tilde (~)  or Cmd + Shift + Tilde (~) and move to the next or previous windows only within the same app.