Normally, we will use keystrokes Cmd-Shift-3 or Cmd-Shift-4 to take snapshot with Mac default screencapture utility. And new in Snow Leopard, we will end up having a PNG image file automatically stored inside ourDesktop folder with the name Screen shot … .
Those behaviors mentioned above are the default ones. We can easily change those with simple command lines.
- Change Screencapture Filename
defaults write com.apple.screencapture name "New Name"
killall SystemUIServerYou can change the value "New Name" to the name of your liking. And if you put the name as empty string (i.e. ""), you will get your screencapture named with the format: [current date] at [time], e.g. "2009-10-20 at AM 03.02.57". - Change Screencapture Location
defaults write com.apple.screencapture location "New Location"
killall SystemUIServerHint. You can drag-drop the folder to Terminal pane to get the folder location.
As seen in both command lines, the second line killall SystemUIServer is needed and used to restart the screencapture application. Only after restarting, changes will take effect. - Change Screencapture File Format
defaults write com.apple.screencapture type [new format]
killall SystemUIServerThese file formats are available: PNG, PDF, JPG, JP2, GIF, TIF, BMP, PICT, and TGA.
Note. Replace the [new format] with one of those available formats, e.g. JPG. - Disable Window Shadow
When we used key combination [Cmd-Shift-4] + [Space], we will be able to capture a snapshot of window along with the shadow. The following command lines are used to disable the shadow.defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServerYou can change -bool true to -bool false to enable back the shadow. - Capture from Terminal Command
One of these command lines can be used to capture from terminal:screencapture -c
screencapture -i ~/Desktop/snapshot.png
screencapture -io ~/Desktop/screenshot.png
screencapture -M ~/Desktop/screenshot.png
screencapture -P ~/Desktop/screenshot.png
screencapture -t png ~/Desktop/screenshot.png
screencapture -T 5 ~/Desktop/screenshot.png
screencapture -x ~/Desktop/screenshot.pngThe usages of each command line can be checked using:man screencapture
Personally, I love to play around with Terminal tweaks. If you have any other interesting tweaks, feel free to share with us; we provided a comment box for that. Have a good time screencapture-ing!
출처 : http://www.usingmac.com/2009/10/19/tweak-screencapture-behavior
댓글 없음:
댓글 쓰기