ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] window list


From: Rupert Levene
Subject: Re: [RP] window list
Date: Sun Aug 10 19:10:02 2003
User-agent: Mutt/1.4i

On Sun, Aug 10, 2003 at 04:31:44PM -0800, Bob Crochelt wrote:
> I'm currently running 1.3.0 beta2.  Now, the window list just shows
> the windows in the current workspace.  Is there a way to make it
> show all the windows?

Here's a script i posted a few weeks ago. Hope you find it useful.

Rupert

--------------------snip--------------------
#!/bin/bash

# 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;

ratpoison -c "echo $list"
ratpoison -c "gselect $CURRENTGROUPNUM"
--------------------snip--------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]