LoginSignup
2
3

More than 5 years have passed since last update.

Mac のスクリーンショットを特定のディレクトリーに保存する

Posted at

macOS のスクリーンショットは次のショートカットで撮れるが、保存先のデフォルトがデスクトップになっていてすぐにデスクトップが汚れてしまう。

  • Shift + Command + 3
  • Shift + Command + 4

これをなんとかするために特定ディレクトリーに保存先を変更する。

手動でやる場合、 defaults write コマンドで com.apple.screencapture という plist に location というキーで保存先を書き込めばいい。その後設定反映のために SystemUIServer を再起動。

defaults write com.apple.screencapture location ~/Desktop/ss
killall SystemUIServer

というあたりをいちいち書いていくのが面倒なので sh script を書いた。

使い方は次のように。

# 保存先変更
./ss2.sh ~/Desktop/ss

# 保存先をデスクトップに戻す
~/ss2.sh
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3