写一个监视xev的脚本?在fvwm下。xev都输出不正常。读import源码?已经看晕了。xrandr?不知道是什么。gtk调用iconview的abi?剩下读xev源码了。
谁知道,赶紧说说。
通俗点描述需要。
执行一个东西。鼠标变+字,选择一个屏幕区域。结束。输出geometry。
执行一个东西。鼠标变+字,选择一个屏幕区域。结束。输出geometry。
代码: 全选
☎ cat srecord.bash
#!/bin/bash
xwininfo >tmp
w=`grep Width tmp`; w=${w#*:};
h=`grep Height tmp`; h=${h#*:};
x=`grep 'Absolute.*X' tmp`; x=${x#*:};
y=`grep 'Absolute.*Y' tmp`; y=${y#*:};
NOW=`date '+%Y-%m-%d-%H-%M-%S'`
[ $x -lt 1 ] && x=1;
[ $y -lt 1 ] && y=1;
s="recordmydesktop -x $x -y $y -width $w -height $h -o ${NOW}.ogg"
echo $s
read ok
echo execute now
eval $s