An exit or a quit command?

185 views
Skip to first unread message

Steve

unread,
Sep 9, 2013, 7:31:29 AM9/9/13
to devil...@googlegroups.com
 Good morning,

I have several gui applications for which I would like to "toggle" the window's visibility with a hot key.  I use the key combination "Control+Space" to alternately bring the Mozilla Firefox window to the foreground or to hide it from view by minimizing the window and skipping the pager and task bar.  At boot time, I copy the Firefox user profile to a ram disk on a SSD-Drive.  The end result is one very fast browser that is just a single keystroke away at all times.

I have three email accounts on my machine and I use Mozilla Thunderbird with three distinct profiles to manage the email accounts.  I'm in the process of setting up a similar system so that I can have three instances of Thunderbird open at the same time, yet be able to hide them from view.  Unfortunately, each instance of Thunderbird has the same window title and application name so I have to keep track of the three pid's.  I have managed to cobble together a bash script that makes use of xprop, wmctrl, devilspie and the kill command.  It works, but it's clumsy.

With devilspie I am able to launch a new instance of devilspie, run a short script with a command or two, and then use a 'quit' command without affecting the initial instance of devilspie that gets loaded as a daemon at boot time.

I have been using both devilspie and devilspie2 side by side with great success.  Unfortunately, however, I haven't found a way to close new instances of devilspie2 using a lua script.  Could you please give me an example of a lua script that makes use of a quit or exit command?  I have found a number of example scripts and tutorials that make use of devilspie2, but I've yet to find a way to launch an instance of devilspie2, run a script, and then terminate that instance short of using the kill command.

My thanks in advance for your help, and my warmest regards,

Steven Sladewski
Guelph, Canada









 

han...@gmail.com

unread,
Jun 6, 2014, 5:44:17 AM6/6/14
to devil...@googlegroups.com, slad...@alumni.uoguelph.ca
I use pkill in a shell script for this.

ixti

unread,
Jun 6, 2014, 7:33:51 AM6/6/14
to devil...@googlegroups.com, slad...@alumni.uoguelph.ca, han...@gmail.com
> I use pkill in a shell script for this.

I would try `os.exit()` first :D
Reply all
Reply to author
Forward
0 new messages