[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] better rpws
From: |
Rupert Levene |
Subject: |
Re: [RP] better rpws |
Date: |
Thu Jun 26 01:39:05 2003 |
User-agent: |
Mutt/1.5.3i |
On Thu, Jun 26, 2003 at 03:29:03PM +1000, twb wrote:
> winlist doesn't show windows from other groups. Make this an option?
It ain't perfect (no highlighting), but how's this script? You'll need
a fairly recent cvs version to get 'ratpoison -c groups' to dump the
groups list on the command line rather than in a window.
--------------------snip--------------------
#!/bin/sh
# we want to cope with spaces in group names
IFS='
'
#initialize our list
list=''
GROUPLIST=$(ratpoison -c groups)
SED_GET_NUM='s/^\([0-9]*\).*/\1/'
FIRSTGROUPNUM=$(echo "$GROUPLIST"|head -1|sed -e "$SED_GET_NUM")
LASTGROUP=$(echo "$GROUPLIST"|tail -1)
CURRENTGROUPNUM=$(echo "$GROUPLIST"|grep '^[0-9]*\*'|sed -e "$SED_GET_NUM")
ratpoison -c "gselect $FIRSTGROUPNUM"
for i in $GROUPLIST; do
list=$(printf '%s%s\n%s' "$list" "$i" "$(ratpoison -c windows|sed -e 's/^/
/')");
if [ "$i" != "$LASTGROUP" ]; then
list="${list}
"
fi
ratpoison -c gnext
done;
# echo "$list"
ratpoison -c "echo $list"
ratpoison -c "gselect $CURRENTGROUPNUM"
--------------------snip--------------------
I'd like to see the echo command support highlighting from the command
line. Highlighting multiple regions would be cool too. Something like
echo bar 0 1 2 3
would highlight 'b' and 'r'; or more conveniently,
echo +b+a+r+ +
echo |b|a|r| |
to do the same thing (i.e. take the last argument as a separator).
Rupert