- 1. 概要
- 2. インストール
- 3. クリップボードマネージャ
- 4. 設定
1. 概要
画面キャプチャプログラムがあるのかないのかは、よう知りません。
以下を設定したい。
・Print 全画面をキャプチャしてクリップボードへコピー
・Ctrl+Print アクティブウィンドウをキャプチャしてクリップボードへコピー
「xfce4-screenshooter」を使います。
2. インストール
「root」ユーザで。
「ArcoLinux」
yes | pacman -S xfce4-screenshooter xfce4-clipman-plugin
「FreeBSD」
pkg install -y xfce4-screenshooter-plugin xfce4-clipman-plugin
3. クリップボードマネージャ
クリップボードマネージャとして、「xfce4-clipman」をログイン時に自動起動します。
「ArcoLinux」
いずれ、別途記述するつもりですが、「ArcoLinux」では、「autostart.sh」というシェルスクリプトを起動する機能があります。
sh
cat << EOF >>
run "xfce4-clipman"
EOF
exit
「FreeBSD」、「sddm」を使用している場合。
「root」ユーザで
sh
cat << EOF >> /usr/share/skel/dot.xsession
xfce4-clipman &
EOF
exit
ログインユーザで
cp /usr/share/skel/dot.xsession ~/.xsession
4. 設定
キーボードショートカットを設定します。
「FreeBSD」の「config.h」を例にとれば
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
の後ろあたりに、2行追加します。
static const char *full[] = { "xfce4-screenshooter", "-c", "-f", NULL };
static const char *active[] = { "xfce4-screenshooter", "-c", "-w", NULL };
キー定義
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
の後ろあたりに、2行追加します。
{ 0, XK_Print, spawn, {.v = full } },
{ ControlMask, XK_Print, spawn, {.v = active } },
これで、コンパイル・リンクして、「dwm」を置き換えれば、Print、Ctrl+Print で、画面キャプチャがとれるようになります。
|