Print / Control + Print / Mod4 + Print 都不好用,大部分时候都失效,唯有 Alt + Print 未发现过失效,被迫改为 Mod4+Fx 了。
代码: 全选
# 截屏脚本
vi /usr/local/bin/getscreenshot #{
#!/bin/sh
IMG_FILE=`mktemp "/tmp/screenshot-${USER}-XXXX.bmp"`
[ -f "$IMG_FILE" ] || exit 1
case "$1" in
-h|--help)
echo "Please see 'scrot --help' or 'man scrot'!"
exit 0
;;
"")
scrot "$IMG_FILE" && gpicview "$IMG_FILE"
;;
*)
scrot "$1" "$IMG_FILE" && gpicview "$IMG_FILE"
;;
esac
rm -f "$IMG_FILE"
#}
chmod +x /usr/local/bin/getscreenshot
vi ~/.xbindkeysrc #{
# 延迟一秒防抖动
"sleep 1 && getscreenshot -s &"
Mod4+F12
"getscreenshot -ub &"
Mod4+F11
"getscreenshot -u &"
Mod4+F10
"getscreenshot &"
Mod4+F9
#}