On Sun, Oct 17, 2010 at 5:01 AM, Rob <robpill...@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).