On Sun, Oct 17, 2010 at 5:01 AM, Rob <robpilling_AT_gmail.com> wrote:
>> while true; do
>> exec wmii
>> xmessage 'Restart the Window Manager?' \
>> -buttons 'Yes:1,No:0' -center \
>> -default 'Yes' -timeout 30 \
>> && break
>> done
>>
> You're using exec, once that line is reached, bash replaces itself with wmii.
> Just use "wmii" instead, or even:
Correct.
> wmii || xmessage "Restart..."
> that way (assuming wmii returns 0 on successful exit) when you mean to
> exit, it's all fine.
I recommend showing the xmessage in all cases (not just for non-zero
exit status) because sometimes you might accidentally exit wmii when
you did not really intend to (thinking about something + your brain on
auto-pilot + your fingers acting with muscle memory).
Received on Sun Oct 17 2010 - 21:11:21 CEST
This archive was generated by hypermail 2.2.0 : Sun Oct 17 2010 - 21:24:01 CEST