On Mon, 6 Jul 2009, Olav Kvittem wrote:
> Hi,
>
> I have too many windows and
> I would like to search the windowlist to find and select a window ?
> In my dreams I would hit a key and type a few characters and I will
> see a short windowlist from which I can choose..
> Are there any modules around that can do whole or part of that ?
I use the following shell script:
~/bin/fvwm_focus:
------------------------------------------------------------------------------------
#!/bin/bash
# finds a window title(s) to focus. With no args, it repeats the previous
# search
if [ -n "$*" ] ; then
search=\*"$*"\*
echo "$search" > $HOME/.nextfocus
else
search=`cat $HOME/.nextfocus`
fi
echo "`date`: $search" >> /tmp/fvwm_focus.log
#FvwmCommand "Next (\"$search\") Function \"flipFlopFocus\""
FvwmCommand "WindowList (\"$search\") c c NoGeometry, CurrentAtEnd,
IconifiedAtEnd"
------------------------------------------------------------------------------------
And the following keybinding to repeat the same search as last time.
Key Tab A CMS Exec exec fvwm_focus
I have half a zillion xterms open, and when any long running (>10 seconds)
job finishes, my shell does two things: beeps in a distinctive way, and
renames the title of the xterm to include the time it finished. When one
of half a zillion jobs I am currently running finishes, I hear a certain
pattern of beeps, but only Ghod knows which xterm on which page on which
desktop it came from. So I look at the current time, and run "focus_fvwm
23:03" to find any xterms that finished in the last minute. Silly eh? I
could just run less xterms!
I also output the pts number to the xterm windows title, and have been
known to search for a guilty window that was holding on and not letting a
stale mountpoint unmount -- use fuser/lsof to search for the guitly
process, use ps to find out which pts it it using, then use "focus_fvwm
pts/67" to find the xterm.
--
TimC
Animals who are not penguins can only wish they were.