понеделник, 6 юли 2020 г.

Working autoclicker for Gentoo or Sabayon

It took some time to find a working autoclicker for Sabayon. I tried the most popular ones, but oddly enough they didn't work. For example, xdotool doesn't start at all, giving some very weird error  (i.e. "xdotool: symbol lookup error: /lib64/libpthread.so.0: undefined symbol: __write_nocancel, version GLIBC_PRIVATE").
What worked for me is xAutoclick (https://sourceforge.net/projects/xautoclick/). You have to do
$./configure
$./make
$sudo make install
And then I started gAutoClick. It gives you a very small window where you can specify how many clicks per what period (in milliseconds, you can see the help here http://xautoclick.sourceforge.net/documentation.html) and with what delay to start. And then the autoclick will follow your mouse. Which is pretty cool.

сряда, 27 май 2020 г.

Monitor cp progress

I often use cp to make backups (ok, I know sync is better, I just forget it. all the time).
So here's how you can monitor the cp progress (thanks to this amazing thread)
$watch lsof -p `pgrep -x cp`

I'm totally adding this to my scripts. You need sudo though.
Also useful 
$sudo  ls -l /proc/PID/fd
or
$watch -n1 lsof -p$(pgrep -x cp)
The rsync command:
$rsync -avP FROM TO