抓屏后自动弹出 gpicview 打开,要保存只要另存为即可,再选择合适的格式,不存则直接关闭便是。
代码: 全选
# 截屏脚本
vi /usr/local/bin/getscreenshot #{
#!/bin/sh
IMG_FILE=`mktemp "/tmp/screenshot-${USER}-XXXX.bmp"`
[ -f "$IMG_FILE" ] || exit 1
scrot $@ "$IMG_FILE"
[ -s "$IMG_FILE" ] && gpicview "$IMG_FILE"
rm -f "$IMG_FILE"
#}
chmod +x /usr/local/bin/getscreenshot
# 热键设置
vi .config/openbox/rc.xml #{
<!-- 截图 -->
<keybind key="Print">
<action name="Execute">
<command>getscreenshot -s</command>
</action>
</keybind>
<keybind key="A-Print">
<action name="Execute">
<command>getscreenshot -ub</command>
</action>
</keybind>
<keybind key="C-Print">
<action name="Execute">
<command>getscreenshot -u</command>
</action>
</keybind>
<keybind key="W-Print">
<action name="Execute">
<command>getscreenshot</command>
</action>
</keybind>
#}