<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
I can provide further detail on this issue.<br>
<br>
I have the following in a script called /path/to/newgmails.sh<br>
<br>
#!/bin/sh<br>
<br>
gmails=`curl -q --insecure <a class="moz-txt-link-freetext" href="http://blog.tmorris.net/test">http://blog.tmorris.net/test</a> | wc -l`<br>
echo $gmails<br>
<br>
In ~/.xmobarrc I have the following<br>
<br>
Run Com "/path/to/newgmails.sh" [] "gmail" 100<br>
<br>
and in the template<br>
<br>
template = "%StdinReader% }{ %gmail%
<fc=yellow>%date%</fc>"<br>
<br>
If I change the URL in the script to use https at some other URL,
then<br>
xmobar updates. As soon as I press mod-q to restart xmonad, then<br>
xmobar does not reappear at all. When I shift window focus, then
the<br>
place where xmobar should appear is taken up by transparency (I
see<br>
the GNOME background). When I change the script back to use http
(and<br>
not https), then mod-q, xmobar reappears as normal.<br>
<br>
This has me completely baffled.<br>
<br>
On 12/02/11 22:28, Tony Morris wrote:<br>
<span style="white-space: pre;">> <br>
> Yes, it is newline-terminated. The output of hexdump is
0a30.<br>
> <br>
> I have it narrowed down to using a https connection instead
of<br>
> http. I can produce it with either curl or wget. xmobar is
not<br>
> logging anything.<br>
> <br>
> Grasping at straws... any more ideas?<br>
> <br>
> <br>
> On 12/02/11 04:09, Norbert Zeh wrote:<br>
>> Is the output you see from the script
newline-terminated? If it <br>
>> isn't, xmobar may not process this input because, at
least for<br>
>> the stdin reader (and I assume the mail reader does the
same),<br>
>> it processes things one line at a time. Then again, I
don't see<br>
>> why the whole bar should hang if it isn't
newline-terminated. <br>
>> Normally, it should just display "Updating..." or
something like <br>
>> that if it's waiting for input from the command it
runs.<br>
> <br>
>> - Norbert<br>
> <br>
>> Tony Morris [2011.02.11 2236 +1000]:<br>
>>> <br>
>> Hello, I am trying to run a script to check gmail as
described<br>
>> here (with some errors) <br>
>>
<a class="moz-txt-link-freetext" href="https://wiki.archlinux.org/index.php/Xmobar#Gmail_integration">https://wiki.archlinux.org/index.php/Xmobar#Gmail_integration</a><br>
> <br>
>> When I set the template to %mail% and restart xmobar,
the bar <br>
>> refuses to display. If I set the script to a
non-existent file,<br>
>> I see xmobar with a message "Could not execute
command", so I<br>
>> know it's all configured fine, but for the script that
checks<br>
>> gmail. If I run that script manually, I see a single
integer<br>
>> value on standard output.<br>
> <br>
>> I can't seem to find any place that xmobar is logging
to help <br>
>> identify what is causing the error (xmobar refusing to
display<br>
>> when asked to Run Com my script.<br>
> <br>
>> Thanks for any pointers.<br>
> <br>
>>> <br>
>>> <br>
> _______________________________________________ xmonad
mailing<br>
> list <a class="moz-txt-link-abbreviated" href="mailto:xmonad@haskell.org">xmonad@haskell.org</a> <br>
> <a class="moz-txt-link-freetext" href="http://www.haskell.org/mailman/listinfo/xmonad">http://www.haskell.org/mailman/listinfo/xmonad</a><br>
> <br>
>> _______________________________________________ xmonad
mailing <br>
>> list <a class="moz-txt-link-abbreviated" href="mailto:xmonad@haskell.org">xmonad@haskell.org</a> <br>
>> <a class="moz-txt-link-freetext" href="http://www.haskell.org/mailman/listinfo/xmonad">http://www.haskell.org/mailman/listinfo/xmonad</a><br>
> <br>
> </span><br>
<br>
- -- <br>
Tony Morris<br>
<a class="moz-txt-link-freetext" href="http://tmorris.net/">http://tmorris.net/</a><br>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a class="moz-txt-link-freetext" href="http://enigmail.mozdev.org/">http://enigmail.mozdev.org/</a><br>
<br>
iEYEARECAAYFAk1XSSsACgkQmnpgrYe6r61cGwCdFj9kpnAkzfSNyHd0j+hdpijw<br>
52oAoKuv4RwTx9Da/X/+cRZV2ygxLng3<br>
=A0zh<br>
-----END PGP SIGNATURE-----<br>
<br>
</body>
</html>