Re: [dev] [wmii] Prevent losing of windows on crash/hang

From: Rob <robpilling_AT_gmail.com>
Date: Sun, 17 Oct 2010 13:01:35 +0100

> while true; do
>        exec wmii
>        xmessage 'Restart the Window Manager?' \
>                 -buttons 'Yes:1,No:0' -center \
>                 -default 'Yes' -timeout 30    \
>        && break
> done
>
>
> Unfortunately, that script does not prompt me if I want to restart wmii
> if if closes/crashes. The result is that all my windows (and my work) is
> gone.

You're using exec, once that line is reached, bash replaces itself with wmii.
Just use "wmii" instead, or even:

wmii || xmessage "Restart..."
that way (assuming wmii returns 0 on successful exit) when you mean to
exit, it's all fine.
Received on Sun Oct 17 2010 - 14:01:35 CEST

This archive was generated by hypermail 2.2.0 : Sun Oct 17 2010 - 14:12:02 CEST