Unknown reporter writes
Hallo,
Is there a option to index only if (the notebook/laptop) is plugged into the power supply and is not running on battery. Everyone tries to reduce power consumption when running on battery but recoll starts indexing after login and consumes my full cpu making my performance optimizations useless =).
Thanks in Advance, HoWil
medoc writes
Hi,
I’ve never looked precisely into interfaces to gather the current power status of the machine, because it has been my understanding that they are non-portable and ever changing.
The indexer keeps its PID in a file named index.pid inside the config directory (typically ~/.recoll/index.pid except if using -c or $RECOLL_CONFIG).
If your desktop has an interface to retrieve power status, it probably has hooks to "do things" when the status changes. I think that the best approach will be to add scripts to kill or restart indexing when appropriate. recollindex is supposed to properly shut down when it gets a SIGTERM (just kill it).
medoc writes
Actually, I forgot that there is a contributed shell-script in the source tree to do just what you want. Maybe it still works: https://bitbucket.org/medoc/recoll/src/05b197d82969454ea5f60946c410eb758a1072c9/src/desktop/recoll_index_on_ac.sh?at=default
Konfekt writes
Thanks, as many appreciate this functionality, this helpful and fully functional script should be more publicized.
medoc writes
I added it to the Faqs and Howtos section in the BitBucket Wiki