Mac(OSX)でスクリーンショット(画面キャプチャ)を撮るのはとても簡単ですが、少しばかり癖があります。
スクリーンショットの保存名、保存先、タイムスタンプ、拡張子などはターミナルを使えば簡単に変更できますが、保存名やタイムスタンプの間に入る空白(スペース)はとても邪魔くさいものです。
連続して数枚のスクリーンショットを撮影すると、1から順に連番の数字が割当られます。
保存名と数字の間に入るスペースを任意の記号に変更する方法です。
(1) まずは、設定ファイルがあるディレクトリまで移動します。
cd /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/Japanese.lproj
(2) バイナリ形式のプロパティファイルをXML形式に変換します。
sudo plutil -convert xml1 ScreenCapture.strings
(3) vimでScreenCapture.stringsを編集します。
vim ScreenCapture.strings
(4) 該当箇所を編集します。下記のコードは編集済みです。
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>%@ %@</key> <string>%@-%@</string> <key>%@ %@ at %@</key> <string>%@ %@ at %@</string> <key>%@ %@(%@)</key> <string>%@ %@(%@)</string> <key>%@ (%@)</key> <string>%@ (%@)</string> <key>-</key> <string>-</string> <key>.</key> <string>.</string> <key>Cannot write file to intended destination.</key> <string>Cannot write file to intended destination.</string> <key>Failure to write image data.</key> <string>Failure to write image data.</string> <key>OK</key> <string>OK</string> <key>Screen Shot</key> <string>Screen Shot</string> <key>Unable to capture desktop image.</key> <string>Unable to capture desktop image.</string> <key>Unable to capture window image.</key> <string>Unable to capture window image.</string> <key>Unable to create type string.</key> <string>Unable to create type string.</string> <key>Unable to create url for path.</key> <string>Unable to create url for path.</string> <key>You dont have permission to save files in the location where screen shots are stored.</key> <string>You don’t have permission to save files in the location where screen shots are stored.</string> <key>dvderror</key> <string>Screen grabs are unavailable during DVD playback.</string> <key>dvderrormessage</key> <string>Please quit DVD Player first.</string> <key>yyyy-MM-dd</key> <string>yyyy-MM-dd</string> </dict> </plist>
(5) 編集が完了したら、ScreenCapture.stringsをバイナリ形式に変換します。
sudo plutil -convert binary1 ScreenCapture.strings
(6) 最後にSystemUIserverを再起動します。
killall SystemUIServer
以上で設定は完了です。
OSのアップデートをおこなうとプロパティファイルが上書きされるようなので、再度変更が必要らしい(未検証)。