Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: flua scripts in wmswallow< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 26 2006,03:47 QUOTE

I've noticed when you swallow a flua script with wmswallow (which is a neat trick, by the way) the script continues to run if wmswallow is killed....but it is no longer visible.  I'm sure there are not many situations where this would occur, but i was wondering if there are ways to kill the script automatically if its container dies.

Another thing...there does not seem to be a way to swallow a flua script from within that script (so there could be a single command to load the script and then swallow it).  I assume if you wanted to do this, there would need to be a second script to launch both and then quit?


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
John Offline





Group: Super Administrators
Posts: 697
Joined: Sep. 2003
Posted: Jan. 31 2006,07:28 QUOTE

You could kill the application after wmswallow by doing a wrapper script.  Here is a simple example in Lua:
execute('app & sleep 1')
execute('wmswallow windowname')
execute('killall -9 app')

If you wrote the rapper in Bash you could capture the PID and just kill that instance of the application.  It may make more sense to write a short wrapper script in bash because of that.

#!/bin/bash
app &
PID=$!
sleep 1
wmswallow appname
kill -9 $PID


As to your other point, no I don't think there is a way because I don't think Lua could fork.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 31 2006,15:35 QUOTE

so....the bash script stays open while wmswallow is running.  If wmswallow is killed, crashes, or otherwise ceases to exist, the bash script then continues and kills the flua script.

Is that correct?


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
John Offline





Group: Super Administrators
Posts: 697
Joined: Sep. 2003
Posted: Feb. 01 2006,22:19 QUOTE

yeah
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Feb. 02 2006,03:06 QUOTE

Thank you.

swallowing flua scripts into the slit is a cool idea.  I'm not sure what I'll use it for, but i'm sure it'll come in handy for something.  Hmmm....i wonder if flua will overlap the wmswallow frame....


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
4 replies since Jan. 26 2006,03:47 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: flua scripts in wmswallow

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code