[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] cmd_print
From: |
twb |
Subject: |
[RP] cmd_print |
Date: |
Sun Nov 23 04:37:07 2003 |
I have added a colon-command I've wanted for a long time. I guess
people using :alias wont care.
!IMPORTANT! Unfortunately, I had to turn of result-gobbling in
cmd_colon, and cmd_print returns non-null even when interactive. I'm
not sure why it gobbles in the first place; everything except
cmd_print returns NULL anyway.
Using gdialog or it's fellows to provide a simple ``input buffer''
sucks.
Type `ratpoison -c colon\ print\ ` will allow you to pipe RP's
minibuffer directly to stdout. This is MUCH faster than e.g. gdialog
when the disk I/O bus if full. This is because the RP binary stays
buffered because I'm always using things like `ratpoison -c split`.
Here's one example, for the 'moosic' jukebox program:
OUTFILE=/tmp/moosic_$(whoami)_$(date -Iseconds);
A=`ratpoison -c colon\ print\ `
moosic list > $OUTFILE.;
OUTTWO="$OUTFILE.";
for i in $A;
do grep -i $i $OUTTWO > $OUTTWO.;
OUTTWO=$OUTTWO.;
done;
if (zenity --list --column=Title > $OUTFILE < $OUTTWO);
then TARGET=$(sed 's/.\([0-9]\+\).\+/\1/' $OUTFILE);
moosic move "${TARGET}:`moosic length`" 0;
moosic next;
fi;
rm -f ${OUTFILE}*
-trent
--
<JRichman>Easy only equals better for crack addicts and web developers.
2003-11-23_diff.diff
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |