在linux中可以使用shutter 來摹擬 像 mac 一樣的截圖功能。
先安裝shutter
ubuntu 下
sudo add-apt-repository ppa:shutter/ppa
sudo apt-get update
sudo apt-get install shutter
這樣就安裝完畢了
接下來在偏好設定中更改檔案名稱
screenshot_%Y.%m.%d.%NNN
再來就是設定hotkey
我使用的是 LXDE
vim ~/.config/openbox/lxde-rc.xml
在 keyboard 的 block 內加上 熱鍵的設定
我使用的是windows鍵 加上 4 來做選取範圍的截圖
<!-- Keybindings for running applications -->
<keybind key="W-4">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>screenshot</name>
</startupnotify>
<command>shutter -s</command>
</action>
</keybind>
關於可以選用的參數
Capture Mode Options:
-s, --select=[X,Y,WIDTH,HEIGHT]
Capture an area of the screen. Providing X,Y,WIDTH,HEIGHT is
optional.
-f, --full
Capture the entire screen.
-w, --window=[NAME_PATTERN]
Select a window to capture. Providing a NAME_PATTERN (Perl-style
regex) ist optional.
-a, --active
Capture the current active window.
--section
Capture a section. You will be able to select any child window
by moving the mouse over it.
-m, --menu
Capture a menu.
-t, --tooltip
Capture a tooltip.
最後再
Capture Mode Options:
-s, --select=[X,Y,WIDTH,HEIGHT]
Capture an area of the screen. Providing X,Y,WIDTH,HEIGHT is
optional.
-f, --full
Capture the entire screen.
-w, --window=[NAME_PATTERN]
Select a window to capture. Providing a NAME_PATTERN (Perl-style
regex) ist optional.
-a, --active
Capture the current active window.
--section
Capture a section. You will be able to select any child window
by moving the mouse over it.
-m, --menu
Capture a menu.
-t, --tooltip
Capture a tooltip.
最後再
$ openbox --reconfigure
讓 ~/.config/openbox/lxde-rc.xml openbox 的設定 reload 生效。
其他桌面環境可以參考下面的第2篇
How to install Shutter on Ubuntu | Shutter - Feature-rich Screenshot Tool
http://shutter-project.org/faq-help/ppa-installation-guide/
Shutter as default | Shutter - Feature-rich Screenshot Tool
http://shutter-project.org/faq-help/set-shutter-as-the-default-screenshot-tool/
沒有留言:
張貼留言