Re: FVWM: maximum # of windows

From: Czarina Caro L. Tablante 1995-24644 <ctablant_at_eee.upd.edu.ph>
Date: Tue, 12 Sep 2000 13:35:14 -0800 (GMT)

WOW! thanks! it worked! i wouldnt have written this kind of code (i'm too
new into this). i didnt even know till now that some of those commands u
used existed. i made some slight modifications, and i'll be doing a little
tinkering with it too, since i want to output a small window to inform the
user that his new window is about to be killed. if i get that done,
i'll paste it here. again, thanks so much :)


C

On Mon, 11 Sep 2000, Mikhael Goikhman wrote:

> I gave up to explain and decided to do your homework. :)
> Here is a solution for fvwm version 2.2.3 and up. It works surprizingly
> well for me, but as I already said, for the betas I would implement more
> correct, faster and less hardcoded solution.
>
> Create this $HOME/bin/verify_netscape_windows script:
>
> #!/bin/sh
> : ${DISPLAY=:0}
> NUM_LIMIT=6
> num_total=`xwininfo -tree -root | grep Netscape | wc -l`
> if [ "$num_total" -gt $NUM_LIMIT ]; then
> num_tokill=$[$num_total - $NUM_LIMIT]
> for wid in `xwininfo -tree -root | grep Netscape | \
> sed 's/ */ /g' | cut -d" " -f2 | head -$num_tokill`; do
> FvwmCommand "WindowId $wid Delete"
> done
> fi
>
> And add this line to your fvwm2rc (without 2 leading spaces):
>
> AddToFunc StartFunction I FvwmCommandS
>
> There are 3 choices now (after restarting fvwm):
> 1) run the script verify_netscape_windows manually
> 2) run the script verify_netscape_windows from a cron job
> 3) run the script verify_netscape_windows automatically when fvwm places
> a new window. For this to work, add the following lines to your fvwm2rc:
>
> *FvwmEventCmd Exec
> *FvwmEvent add_window verify_netscape_windows
> AddToFunc StartFunction I FvwmEvent
>
> Tested for fvwm 2.2.4 & 2.3.21, Netscape 3 & 4.
>
> Regards,
> Mikhael.
> --
> Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
> To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
> message to majordomo_at_fvwm.org.
> To report problems, send mail to fvwm-owner_at_fvwm.org.
>
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue Sep 12 2000 - 02:03:35 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:51 BST