THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#738 - awesome should close all applications before exiting
User who did this - Adam (g4c9z)
----------
Really? You'd put it in if I implemented it and shared it?
In that case, let me elaborate on what I've got working. I personally don't exit from my
window manager by selecting "Quit" from the menu, but by pressing my power
button to exit and shutdown. I've written 2 scripts which happen when the power button
is pressed (or happened, when I was using awesome). One closes all windows, which is the
code I shared above. The next asks whether all windows are closed, which is called
repeatedly until it returns true. This code is essentially the same loop, which returns
false if it gets in the loop and true if it doesn't:
#!/bin/bash
rm /tmp/windowOpen
awesome-client << EOF
for i, c in pairs(client.get()) do awful.util.spawn("touch /tmp/windowOpen") end
EOF
I then check whether /tmp/windowOpen exists. This works for me, but obviously
it's an ugly hack and you don't want to put code like that in awesome. As I
mentioned, I'm sure there's a proper way to do it all within lua code, using
threads or coroutines or something. I thought someone who was involved in
writing awesome could implement a proper solution in a few minutes using this
as a starting point, but for me it would take a few hours for little to no gain.
"Those apps aren't killed, they just lose their connection to the X server, so they
could save a backup."
That's interesting - I didn't know that. Why then do so many apps do different stuff when you
click to close the window compared to when they lose connection to the X server? Even vim deletes
its .swp file when you close it, but not when it loses connection to the X server (even if the file
being edited has been saved). If there were a way to make all the apps behave as if you had
clicked the "close" button, by installing a program separate from awesome, then I would
agree that that's the program users should install. I just thought there's no way for another
program to "click the close button" when there aren't even any more windows because the
window manager exited.
----------
More information can be found at the following URL:
http://awesome.naquadah.org/bugs/index.php?do=details&task_id=738#comment1821
You are receiving this message because you have requested it from the Flyspray
bugtracking system. If you did not expect this message or don't want to
receive mails in future, you can change your notification settings at the URL
shown above.
--
To unsubscribe, send mail to [email protected].