2013年11月20日水曜日

Minimal Debian - 16 画面キャプチャーツールのインストール

scrot という画面キャプチャーツールを入れます。コマンドライン用で軽量なツールです。

$ sudo apt-get install scrot

使い方

画面全体のスクリーンショットを撮る
$ scrot

カレントディレクトリに現在日時のファイル名で保存されます。
$ ls
2013-11-20-205747_1920x1200_scrot.png

カレントウィンドウを撮る
$ scrot -u

選択範囲を撮る
$ scrot -s

5秒後に撮る
$ scrot -d 5

メニューに以下のようなコマンドとして登録して使っています。

画面全体のスクリーンショットを撮る
scrot ~/Pictures/%Y%m%d_%H%M%S.png

カレントウインドウのスクリーンショットを撮る(3秒後)
scrot -u -d 3 ~/Pictures/%Y%m%d_%H%M%S.png

指定範囲のスクリーンショットを撮る
scrot -s ~/Pictures/%Y%m%d_%H%M%S.png

いずれも、「$HOME/Pictures/」に「年月日_時分秒.png」というファイルで保存されます。

ショートカットキーの設定

あと、キーボードショットカットにも登録します。
~/.config/openbox/rc.xml をエディタで開き以下を修正。

    <keybind key="A-Print">
      <action name="Execute">
        <command>scrot -u ~/Pictures/%Y%m%d_%H%M%S.png</command>
      </action>
    </keybind>
    <keybind key="Print">
      <action name="Execute">
        <command>scrot ~/Pictures/%Y%m%d_%H%M%S.png</command>
      </action>
    </keybind>

これで、「PrintScreen」キーで画面全体
「Alt+PrintScreen」キーでカレントウインドウのスクリーンショットが撮れます。

参考にしたサイト(ありがとうございました)
http://d.hatena.ne.jp/ino46/20100919/1284904800

0 件のコメント:

コメントを投稿