in the gothic chambers of the underworld on Mon, Dec 18, 2000 at 04:15:03AM 
-0600, Gryn muttered darkly:

>   Anyway, I was wondering if it would be "proper" (tm) behavior for blackbox,
> if when I tell it the root command is a program like webcollage (that is, a
> program that continually updates the root menu, and therefore doesn't exit on
> its own), and then I switch styles, or even window managers (gasp :) ), that
> it would then send a HUP or some other kill signal to that process, since it
> hadn't exited yet?  It seems to me a straight forward behavior, and maybe the
> only thing you would configure is if it did so, and which signal to send (if
> that).
> 
>   But before I went grepping through the source to try to add it, I wanted to
> make sure it was a kosher idea :) .  Otherwise, I'll just live without the
> feature.
> 
>   Anyway, thanks for the time, and more importantly, the great wm :) .
> 

why go through all the trouble of hacking the source when you can just
create a simple shell script for your root command?

----
#!/bin/sh
evil_apps="webcollage xscreensaver foo gun fusil"

for $app in $evil_apps; do
    [ -n "$(pidof $app)" ] && kill `pidof app`
done

bsetbg "$*"
exit 0

----

the above will go through the apps listed in the $evil_apps variable and
kill the ones that are running. then it will pass its args to bsetbg.

see, wasn't that painless!


cth.


-- 
4.0k -rw-rw-r--    1 zork     zork       17 Apr 4 17:38 .signature

Reply via email to