Change 'cpu_mem_usage' to use new global var naming, add fallback of /tmp.
Add 'bin/recoll-query', a wrapper around the 'recoll' search.

Inspiration taken from `recollq' -- the command line program that is
installed if the QT GUI is not wanted.
This script takes all the options that could be passed to `recoll[q]'
(as they can be directly passed to `recoll' as well) and always searches
from the current (or specified) directory. Because this makes sense from
the command line. Consequently it emulates the 'ANY' 'ALL' and
'filename' modes presented by the GUI itself in query language, and
makes phrase quoting more concise (if slightly less consistent).
Update 'sbin/wifi' script and associated 'lib/*.sh' scripts.

sbin/wifi
    remove all bashisms
    fix the start and stop logic
    clean up the 'rf_control' and 'rf_list' usage
    clean up option checking
    TODO:
	add propper wifi module detection (use 'lspci'?)
lib/send_message.sh
    fix the 'sudo notify-send' line (extra call to 'command' out of
    shell caused break)
    add a 'die' function wrapping send_message which utilises a dummy
    'cleanup' function.
lib/prog.sh
    add 'first_sys_cmd' wrapper which sets PATH to ENV_SUPATH from
    '/etc/login.defs' to get standard system programs.
Change get_iplayer.series to get_iplayer.pvr (add parallelism).

Update check_net to get rid of output, and send 'QUIT' to running
program, not 'INT'.
Enable parallelism in get_iplayer.pvr by removing the pvr_lock file and
performing the locking using script dependant cat_lock.
WARNING:
    Can run several instances, but messes up locking for any
    'get_iplayer --pvr' instances run.
    Need to properly test the locking.
Fix 'recoll-query' and add a 'rq' symlink.

Fix the 'exec recoll' line to not include the query type ($qtype) as it
is emulated by the script.
To complement the 'rq' symlink, add detection so that if the script is
called as 'rq' it only outputs the matching file paths. Done with the
basic (-b) option piped to 'cut -c8-', removing the first 7 characters
of the uri (file://) to give the local path.
Fix 'sbin/run_cron', and move functions to 'lib/output.sh'.

Line was 'echo ${f}' for testing, changed to '"${f}" >"${log}" 2>&1' to
run the file, as well as directing output to the (configurable) ${log}
variable.
'die' 'warn' and 'info' functions moved to 'lib/output.sh', with a
dummy 'cleanup' function for 'die'. 'die' and 'cleanup' from
'lib/send_message.sh' changed for compatibility.
TODO: make 'lib/send_message.sh' completely compatible (with info, warn,
etc.)?
Fix recoll-query path processing

recoll cannot deal with relative paths, and can be configured to ignore
symlinks, so need the absolute path - done using 'readlink -f'.
Clean up of wrapper scripts, improve/fix 'mount.sh'

Minor clean ups.
'mount.sh':
    fix umount.media to also work with new /run/media/$USER format
    add mount.media which can use block devices or using label (from
    /dev/disk/by-label/)
Add preliminary 'lib/status.sh' to ease the combining of return and exit
statuses when scripting several commands together.
Add script to switch Escape and Caps_Lock scan codes.
Fix 'sbin/lcd' 'toggle' case

It had a random 'exit' in there :-/
Minor lib/*.sh include changes, add notify.sh, rewrite batt.

Change the include logic for library scripts to be slightly simpler for
the ctual source lines. Add a variable check to prevent lib being
sourced more than once.
Add 'lib/notify.sh' as a rewrite of 'lib/send_message.sh', keeping the
interface similar to 'lib/output.sh' with 'info' and 'error' functions,
etc. It uses 'notify-send' if XAUTHORITY, and 'echo's if connected to a
terminal or logging (LOG set). Add a compat layer for send_message
(including symlinking to notify.sh). Change 'sbin/wifi', etc. to use now
interface.
Rewrite 'bin/batt' so it should work with multiple batteries, only
source libraries when needed, and add in a '-n' option for
'notify-send'ing (for use with keyboard shortcuts).
BUGS:
    'colour.sh' seems to be broken
Make emerge.update more generic, and oneshot
Make first_cmd work with arguments, update xmtlock accordingly

first_cmd from prog.sh can now take a command with simple arguments, as
"cmd -arg --long-arg", reducing the need for following case statements.
Check mpd status after start.

Will give a more sensible error message, and also blocks enough for the
socket to come up, preventing subsequent mpc connection errors.
Add XfPM wrapper to work around locale based Seg Fault.
Update xmtlock and emerge.sh

Add 'slimlock' to list of X lock utilities.
Make emerge.sh slightly more generic and robust.
    Only source needed lib/*.sh scripts.
    Use first_cmd to get utilities, for easy 'false' fallback.
    Add support for esearch as well as eix, hardcoding neither.