<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WebFramp &#187; musings</title>
	<atom:link href="http://www.webframp.com/category/musings/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webframp.com</link>
	<description>passing thoughts on the web</description>
	<lastBuildDate>Thu, 17 Sep 2009 19:34:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Offlineimap + mutt + gmail + msmtp = crazy delicious email</title>
		<link>http://www.webframp.com/2009/06/17/offlineimap-mutt-gmail-msmtp-crazy-delicious-email/</link>
		<comments>http://www.webframp.com/2009/06/17/offlineimap-mutt-gmail-msmtp-crazy-delicious-email/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 06:43:18 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[musings]]></category>

		<guid isPermaLink="false">http://www.webframp.com/?p=136</guid>
		<description><![CDATA[I&#8217;ve finally settled on the best email setup I&#8217;ve had since the fetchmail+procmail+mutt setup I used several years ago. It&#8217;s not much different and still allows me to use my absolute favorite email client, mutt. &#8220;Offlineimap is a tool to simplify your email reading&#8221; says the homepage for this deceptively simple program. With offlineimap I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally settled on the best email setup I&#8217;ve had since the fetchmail+procmail+mutt setup I used several years ago. It&#8217;s not much different and still allows me to use my absolute favorite email client, <a href="http://www.mutt.org">mutt</a>. &#8220;<a href="http://software.complete.org/software/projects/show/offlineimap">Offlineimap</a> is a tool to simplify your email reading&#8221; says the homepage for this deceptively simple program. With offlineimap I now have a backup of all the messages in my gmail account, mutt performance is improved (it&#8217;s much better at Maildir than direct imap access), and have synchronized my mail reading on 3 different machines.</p>
<p>So here&#8217;s the basics.</p>
<p><strong>.offlineimaprc:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>general<span style="color: #66cc66;">&#93;</span>
metadata = ~/.offlineimap
accounts = GmailMain
ui = Noninteractive.Quiet
&nbsp;
<span style="color: #66cc66;">&#91;</span>mbnames<span style="color: #66cc66;">&#93;</span>
enabled = yes
filename = ~/.mutt/muttrc.mailboxes
header = &quot;mailboxes &quot;
peritem = =<span style="color: #33cc33;">%</span><span style="color: #66cc66;">&#40;</span>foldername<span style="color: #66cc66;">&#41;</span>s
sep = &quot; &quot;
footer = &quot;\n&quot;
&nbsp;
<span style="color: #66cc66;">&#91;</span>Account GmailMain<span style="color: #66cc66;">&#93;</span>
localrepository = GmailLocal
<span style="color: #808080; font-style: italic;">remoterepository = GmailRemote</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span>Repository GmailLocal<span style="color: #66cc66;">&#93;</span>
type = Maildir
localfolders = ~/.mail/GMAIL
&nbsp;
<span style="color: #66cc66;">&#91;</span>Repository GmailRemote<span style="color: #66cc66;">&#93;</span>
type = Gmail
<span style="color: #808080; font-style: italic;">remoteuser = yourname@gmail.com</span>
<span style="color: #808080; font-style: italic;">remotepassfile = ~/.mailpass</span></pre></div></div>

<p><strong>.msmtprc:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">account default
host smtp.gmail.com
port <span style="color: #cc66cc;">587</span>
from yourname<span style="color: #33cc33;">@</span>gmail.com
tls on
tls_starttls on
# you can google on how to find this
tls_trust_file /home/webframp/.mutt/certs/Thawte_Premium_Server_CA.pem
auth on
user yourname
password yourpassword
logfile ~/.msmtp.log</pre></div></div>

<p><strong>relevant bits of .muttrc:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">mbox_type</span>=Maildir                                   # mailbox type
<span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">hostname</span>=gmail.com                                  # This is my domain.
&nbsp;
# GMAIL+OFFLINEIMAP settings
<span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">imap_user</span>=sean.escriva<span style="color: #33cc33;">@</span>gmail.com
<span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">folder</span>=$HOME/.mail/GMAIL
<span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">spoolfile</span>=+/INBOX
<span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">postponed</span>=&quot;+<span style="color: #66cc66;">&#91;</span>GMAIL<span style="color: #66cc66;">&#93;</span>.Drafts&quot;
<span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">record</span>=&quot;+<span style="color: #66cc66;">&#91;</span>GMAIL<span style="color: #66cc66;">&#93;</span>.Sent Mail&quot;
&nbsp;
# Mailboxes via offlineimap
source $HOME/.mutt/muttrc.mailboxes
&nbsp;
<span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">sendmail</span>=&quot;/usr/bin/msmtp&quot;               # Sendmail alternative</pre></div></div>

<p>I find running offlineimap via my crontab provides a nice solution to that<br />
compulsive mail check impulse that can easily develop. Of course I also have a<br />
Maildir check in my dzen xmonad statusbar using the ppExtras setting of my<br />
pretty printer:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #339933; font-weight: bold;">...</span>
  <span style="color: #339933; font-weight: bold;">,</span> ppExtras <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span>logMail<span style="color: green;">&#93;</span>
  <span style="color: green;">&#125;</span>
<span style="color: #06c; font-weight: bold;">where</span>
 logMail <span style="color: #339933; font-weight: bold;">=</span> dzenColorL colorPink <span style="background-color: #3cb371;">&quot;&quot;</span> <span style="color: #339933; font-weight: bold;">.</span> wrapL mailIcon <span style="background-color: #3cb371;">&quot;&quot;</span><span style="color: #339933; font-weight: bold;">.</span> padL <span style="color: #339933; font-weight: bold;">$</span> maildirNew mailDir
 mailIcon <span style="color: #339933; font-weight: bold;">=</span> <span style="background-color: #3cb371;">&quot;^i(/home/webframp/.dzen/icons/dzen_bitmaps/envelope.xbm)&quot;</span>
 mailDir <span style="color: #339933; font-weight: bold;">=</span> <span style="background-color: #3cb371;">&quot;/home/webframp/.mail/GMAIL/INBOX&quot;</span></pre></div></div>

<p>Maybe you can glean something useful from my setup</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webframp.com/2009/06/17/offlineimap-mutt-gmail-msmtp-crazy-delicious-email/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why Haskell is a joy to learn</title>
		<link>http://www.webframp.com/2009/04/15/why-haskell-is-a-joy-to-learn/</link>
		<comments>http://www.webframp.com/2009/04/15/why-haskell-is-a-joy-to-learn/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 02:04:32 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[musings]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.webframp.com/?p=119</guid>
		<description><![CDATA[I recently discovered Project Euler, an excellent resource to use while learning a new language. Maybe a little late to the game, but fun nonetheless. The very first problem is rather simple: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently discovered <a href="http://projecteuler.net/">Project Euler</a>, an excellent resource to use while learning a new language. Maybe a little late to the game, but fun nonetheless.</p>
<p>The very first <a href="http://projecteuler.net/index.php?section=problems&#038;id=1">problem</a> is rather simple:</p>
<blockquote><p>If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.</p>
<p>Find the sum of all the multiples of 3 or 5 below 1000.</p></blockquote>
<p>And a potential solution is haskell is could be to define the following:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">isMultOf x n <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">mod</span> n x <span style="color: #339933; font-weight: bold;">==</span> <span style="color: red;">0</span>
&nbsp;
sumList xs <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">foldr</span> <span style="color: green;">&#40;</span><span style="color: #339933; font-weight: bold;">+</span><span style="color: green;">&#41;</span> <span style="color: red;">0</span> xs</pre></div></div>

<p>After which the answer could be obtained with a simple:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">sumList <span style="color: green;">&#91;</span>a <span style="color: #339933; font-weight: bold;">|</span> a <span style="color: #339933; font-weight: bold;">&lt;-</span> <span style="color: green;">&#91;</span>1<span style="color: #339933; font-weight: bold;">..</span>1000<span style="color: green;">&#93;</span><span style="color: #339933; font-weight: bold;">,</span> isMultOf <span style="color: red;">3</span> a <span style="color: #339933; font-weight: bold;">||</span> 
                             isMultOf <span style="color: red;">5</span> a<span style="color: #339933; font-weight: bold;">,</span> 
                             a <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: red;">1000</span><span style="color: green;">&#93;</span></pre></div></div>

<p>And we have a list comprehension. Beautiful, and immediately expressive of exactly what&#8217;s happening for such a simple problem. The amazing thing is that properly written haskell maintains this same clarity and expressivity in even large scale programs. Sometimes it&#8217;s the little things in a language that makes you really appreciate it.</p>
<p>Hopefully wordpress hasn&#8217;t screwed up the formatting for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webframp.com/2009/04/15/why-haskell-is-a-joy-to-learn/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>The Non-Intrusive User Interface</title>
		<link>http://www.webframp.com/2008/11/28/the-non-intrusive-user-interface/</link>
		<comments>http://www.webframp.com/2008/11/28/the-non-intrusive-user-interface/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 23:55:51 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[musings]]></category>
		<category><![CDATA[xmonad]]></category>
		<category><![CDATA[dzen]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.webframp.com/?p=59</guid>
		<description><![CDATA[Technology as a whole should enable us. It should ease our daily tasks, offloading some of the burden, whether that be mental processing or physical expenditure. This should be especially true of computers our daily interactions bring us in contact with and more still when the bulk of our time is spent working with them. [...]]]></description>
			<content:encoded><![CDATA[<p>Technology as a whole should enable us. It should ease our daily tasks, offloading some of the burden, whether that be mental processing or physical expenditure. This should be especially true of computers our daily interactions bring us in contact with and more still when the bulk of our time is spent working with them. Personal computing should allow us to focus on a given task in a way that encourages us to accomplish more than we otherwise could. Every means of interaction within the system should support the task at hand with as little interference as possible.</p>
<p>Sadly this is not the state of computing for most users. The most popular <a title="Interface Metaphors" href="https://secure.wikimedia.org/wikipedia/en/wiki/Interface_metaphor">metaphors</a> in computing today &#8211; the desktop, the start menu, folders &#8211; and commonly learned ways of interacting with them &#8211; point and click with the mouse &#8211; actually discourage productivity and break concentration/focus from a task. The implementations of these ideas further this interruption. True most users now have been trained to reach for the mouse and their hand eye coordination is good enough to accomplish any given step within a reasonable time frame.</p>
<p>How though does the switch-tasking our brain does to accomplish these steps affect the flow of thought for the current project? Clearly the less divergent thoughts and less steps required for any single step, the less the thought process is diverted from the main task. Further while few people struggle to make the required movements with a mouse, what affect does the repetitive nature of the movement have on long term health and usage? No doubt anyone who uses a mouse on a daily basis for several hours has personally felt the strain on their wrist that naturally comes with such usage.</p>
<p>The modern computing user interface has become cluttered and distracting, albeit a composited, semi-transparent glossy distraction. The initial appeal of such common interface elements hides the distraction, disguises the intrusive elements. It&#8217;s as if the computer were telling you, &#8220;never mind this modal dialog that just interrupted your thought process, it&#8217;s so glossy it must be helpful&#8221;.</p>
<p>Consider the average means of launching a program. Is it really ideal to require the user to graphically navigate to some onscreen coordinate that receives instructions before thought is transferred to action? Doubtful. How much screen real estate is essentially wasted for interface elements that support this idea? And how much time is spent arranging or re-arranging the frequently less than ideal placement of windows within this paradigm? Most daily computer users quickly outgrow the nagging tedium of these interfaces, but have no option to adjust the defaults.</p>
<p>I personally prefer an interface that is minimal and stays out of the way. An interface that handles much of what we have come to think of as routine automatically. And one that is fully configurable and flexible enough to support interaction in the manner that works for best me. The <a title="Tiling Window Managers" href="https://secure.wikimedia.org/wikipedia/en/wiki/Tiling_window_manager">tiling window managers</a> available on Linux and specifically <a title="Xmonad" href="http://www.xmonad.org">Xmonad</a> support this beautifully.</p>
<p>With Xmonad window management is automatic. I do not have to think about window placement as every window is automatically arranged to take the best advantage of screen real estate based on simple rules that I have configured. I can call applications with a single keystroke and they appear exactly where and how I want them. I can send them away or bring them back to the current screen with little more than a gesture, not once having to remove my hands from their comfortable perch above the keyboard. Many applications do not play nicely with this idea though and try to force certain window behavior. For these few troublesome programs it a simple thing to always &#8220;float&#8221; them, so that they behave in much the same as with traditional window managers. All of it is easily configurable in <a title="Haskell" href="http://www.haskell.org">Haskell</a>, an advanced <a title="Functional programming" href="http://haskell.org/haskellwiki/Functional_programming">purely functional programming</a> language that is truly a joy to work with. Because of it concise syntax and clarity, I have been able to easily configure Xmonad to behave as I like, and it&#8217;s completely stable.</p>
<p>What is more, the means in which information is communicated is extremely configurable. I chose a minimal status bar using dzen, based on example <a title="dzen and Xmonad" href="http://dzen.geekmode.org/dwiki/doku.php?id=dzen:dzen-and-xmonad">scripts on the dzen wiki.</a> Information when, where, and how I want it.</p>
<p>I encourage everyone that is using Linux to try it. After just a short period of time, I&#8217;m sure you will agree that you are able to work in manner that is both non-intrusive and more productive.</p>
<ul>
<li><a title="My Xmonad configuration" href="http://haskell.org/haskellwiki/Xmonad/Config_archive/webframp%27s_xmonad.hs">My Xmonad configuration</a></li>
<li>A screenshot of the setup:</li>
<li><a href="http://haskell.org/sitewiki/images/1/14/Xmonad-desktop-webframp-scaled.jpg"><img class="alignnone" title="Xmonad Screenshot" src="http://haskell.org/sitewiki/images/1/14/Xmonad-desktop-webframp-scaled.jpg" alt="" width="455" height="170" /></a></li>
<li>
<p><div id="attachment_55" class="wp-caption alignnone" style="width: 110px"><a href="http://www.webframp.com/wp-content/uploads/2008/11/arch-xmonad-small.png"><img class="size-medium wp-image-55" title="arch-xmonad-small" src="http://www.webframp.com/wp-content/uploads/2008/11/arch-xmonad-small.png" alt="Arch+Xmonad = Crazy Delicious" width="100" height="100" /></a><p class="wp-caption-text">Arch+Xmonad = Crazy Delicious</p></div></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.webframp.com/2008/11/28/the-non-intrusive-user-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Scrubs the cache for Chrome</title>
		<link>http://www.webframp.com/2008/09/02/google-scrubs-the-cache-for-chrome/</link>
		<comments>http://www.webframp.com/2008/09/02/google-scrubs-the-cache-for-chrome/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 18:46:24 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[musings]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.webframp.com/?p=47</guid>
		<description><![CDATA[According to this article at Computerworld google has scrubbed results for the download link for their new Chrome browser. If you get results like these: It&#8217;s likely it won&#8217;t work. No doubt this won&#8217;t be an issue once the Chrome Announcement is over. Live video of Chrome Annoucement is available here]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&#038;articleId=9114001&#038;intsrc=news_ts_head">this article at Computerworld</a> google has scrubbed results for the download link for their new Chrome browser. If you get results like these:</p>
<p><a href="http://www.webframp.com/wp-content/uploads/2008/09/googlescrubs.jpg"><img src="http://www.webframp.com/wp-content/uploads/2008/09/googlescrubs-299x54.jpg" alt="" title="Google Scrubs resutls" width="299" height="54" class="alignnone size-medium wp-image-48" /></a></p>
<p>It&#8217;s likely it won&#8217;t work.</p>
<p>No doubt this won&#8217;t be an issue once the Chrome Announcement is over.</p>
<p>Live video of <a href="http://news.cnet.com/8301-17939_109-10030035-2.html?tag=txt">Chrome Annoucement is available here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webframp.com/2008/09/02/google-scrubs-the-cache-for-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switch+dzen</title>
		<link>http://www.webframp.com/2008/08/17/switchdzen/</link>
		<comments>http://www.webframp.com/2008/08/17/switchdzen/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 08:23:15 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[musings]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[dzen]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.webframp.com/?p=41</guid>
		<description><![CDATA[Well Ubunut Intrepid may turn out to be great, but the recent ubuntu upgrade on my part proved to me how tired I was of dealing with apt and it&#8217;s pkg management system. How many debian users actually know what it&#8217;s really doing? So I switched. To Arch. Lately it seems like every useful tip [...]]]></description>
			<content:encoded><![CDATA[<p>Well Ubunut Intrepid may turn out to be great, but the recent ubuntu upgrade on my part proved to me how tired I was of dealing with apt and it&#8217;s pkg management system. How many debian users actually know what it&#8217;s really doing?</p>
<p>So I switched. To Arch.</p>
<p>
Lately it seems like every useful tip I&#8217;ve gleaned has been from either the gentoo or arch wiki, so I had narrowed it down to one of the two. Both are appealing for their BSD style init systems and simple script based pacakge systems. Gentoo is full source though which, while not really a negative for most modern systems, was something I didn&#8217;t want to be restricted to. Arch allows a flexible binary or source build system, although the actual repo&#8217;s are binary. I love the rolling kernel too, no more waiting 6 months to get the latest, risking a broken system by upgrading in between.
</p>
<p>
In the process of switching I have fine-tuned things to the extreme. One of the tweaks is the battery status bar I use. It&#8217;s just a simple shell script that outputs formatted text to dzen2. It always bugged me that the script didn&#8217;t notice the charging state. After a simple little change, it does.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># original script by lyon8 &amp;lt;lyon8@gmx.net&amp;gt;</span>
<span style="color: #666666; font-style: italic;"># modifications from original by &amp;lt;sean.escriva@gmail.com&amp;gt;</span>
<span style="color: #666666; font-style: italic;"># show your laptop battery state in dzen</span>
&nbsp;
<span style="color: #007800;">BG</span>=<span style="color: #ff0000;">'#1c2636'</span>  <span style="color: #666666; font-style: italic;"># dzen backgrounad</span>
<span style="color: #007800;">FG</span>=<span style="color: #ff0000;">'#99ffff'</span>  <span style="color: #666666; font-style: italic;"># dzen foreground</span>
<span style="color: #007800;">W</span>=<span style="color: #000000;">150</span>         <span style="color: #666666; font-style: italic;"># width of the dzen bar</span>
<span style="color: #007800;">GW</span>=<span style="color: #000000;">50</span>         <span style="color: #666666; font-style: italic;"># width of the gauge</span>
<span style="color: #007800;">GFG</span>=<span style="color: #ff0000;">'#33ccff'</span>  <span style="color: #666666; font-style: italic;"># color of the gauge</span>
<span style="color: #007800;">GH</span>=<span style="color: #000000;">7</span>          <span style="color: #666666; font-style: italic;"># height of the gauge</span>
<span style="color: #007800;">GBG</span>=<span style="color: #ff0000;">'#333'</span>    <span style="color: #666666; font-style: italic;"># color of gauge background</span>
<span style="color: #007800;">X</span>=<span style="color: #000000;">1770</span>        <span style="color: #666666; font-style: italic;"># x position</span>
<span style="color: #007800;">Y</span>=<span style="color: #000000;">1200</span>        <span style="color: #666666; font-style: italic;"># y position</span>
<span style="color: #007800;">FN</span>=<span style="color: #ff0000;">'snap'</span>     <span style="color: #666666; font-style: italic;"># font</span>
&nbsp;
<span style="color: #007800;">STATEFILE</span>=<span style="color: #ff0000;">'/proc/acpi/battery/BAT0/state'</span> <span style="color: #666666; font-style: italic;"># battery's state file</span>
<span style="color: #007800;">INFOFILE</span>=<span style="color: #ff0000;">'/proc/acpi/battery/BAT0/info'</span>   <span style="color: #666666; font-style: italic;"># battery's info file</span>
&nbsp;
<span style="color: #007800;">LOWBAT</span>=<span style="color: #000000;">25</span>        <span style="color: #666666; font-style: italic;"># percentage of battery life marked as low</span>
<span style="color: #007800;">LOWCOL</span>=<span style="color: #ff0000;">'#ff4747'</span> <span style="color: #666666; font-style: italic;"># color when battery is low</span>
<span style="color: #007800;">CHGCOL</span>=<span style="color: #ff0000;">'#60da11'</span> <span style="color: #666666; font-style: italic;"># color when battery is charging</span>
<span style="color: #007800;">TIME_INT</span>=<span style="color: #000000;">1</span>       <span style="color: #666666; font-style: italic;"># time intervall in seconds</span>
&nbsp;
<span style="color: #007800;">PREBAR</span>=<span style="color: #ff0000;">'^i(/home/webframp/.dzen/icons/dzen_bitmaps/battery.xbm) '</span> <span style="color: #666666; font-style: italic;"># caption (also icons are possible)</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">true</span>; <span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #666666; font-style: italic;"># look up battery's data</span>
<span style="color: #007800;">BAT_FULL</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$INFOFILE</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> design<span style="color: #000000; font-weight: bold;">|</span>line<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">11</span><span style="color: #000000; font-weight: bold;">`</span>;
<span style="color: #007800;">STATUS</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$STATEFILE</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> charging<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">12</span><span style="color: #000000; font-weight: bold;">`</span>;
<span style="color: #007800;">RCAP</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$STATEFILE</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> remaining<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">8</span><span style="color: #000000; font-weight: bold;">`</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># calculate remaining power</span>
<span style="color: #007800;">RPERCT</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">expr</span> <span style="color: #007800;">$RCAP</span> \<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">`</span>;
<span style="color: #007800;">RPERC</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">expr</span> <span style="color: #007800;">$RPERCT</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #007800;">$BAT_FULL</span><span style="color: #000000; font-weight: bold;">`</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># draw the bar and pipe everything into dzen</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$RPERC</span> <span style="color: #660033;">-le</span> <span style="color: #007800;">$LOWBAT</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #007800;">GFG</span>=<span style="color: #007800;">$LOWCOL</span>;
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$STATUS</span> = <span style="color: #ff0000;">'charging'</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #007800;">GFG</span>=<span style="color: #007800;">$CHGCOL</span>;
<span style="color: #000000; font-weight: bold;">else</span>
<span style="color: #007800;">GFG</span>=<span style="color: #ff0000;">'#33ccff'</span>;
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #666666; font-style: italic;">#echo -n $PREBAR #uncomment for an icon</span>
<span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$RPERC</span> <span style="color: #000000; font-weight: bold;">|</span> gdbar <span style="color: #660033;">-h</span> <span style="color: #007800;">$GH</span> <span style="color: #660033;">-w</span> <span style="color: #007800;">$GW</span> <span style="color: #660033;">-fg</span> <span style="color: #007800;">$GFG</span> <span style="color: #660033;">-bg</span> <span style="color: #007800;">$GBG</span>
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #007800;">$TIME_INT</span>;
<span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">|</span> dzen2 <span style="color: #660033;">-ta</span> c <span style="color: #660033;">-tw</span> <span style="color: #007800;">$W</span> <span style="color: #660033;">-y</span> <span style="color: #007800;">$Y</span> <span style="color: #660033;">-x</span> <span style="color: #007800;">$X</span> <span style="color: #660033;">-fg</span> <span style="color: #007800;">$FG</span> <span style="color: #660033;">-bg</span> <span style="color: #007800;">$BG</span> <span style="color: #660033;">-fn</span> <span style="color: #007800;">$FN</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.webframp.com/2008/08/17/switchdzen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get your &lt;html&gt; out of my email</title>
		<link>http://www.webframp.com/2008/06/17/get-your-html-out-of-my-email/</link>
		<comments>http://www.webframp.com/2008/06/17/get-your-html-out-of-my-email/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 16:57:31 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[musings]]></category>
		<category><![CDATA[ascii]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://www.webframp.com/?p=34</guid>
		<description><![CDATA[In case it wasn&#8217;t already delightfully obvious, I prefer plain text. Html has a place. It can be wonderfully crafted into well laid out and cleverly designed websites thanks to web standards. The web abounds with examples of this. It does not however increase the efficiency or clarity of our business communication. E-mail is not [...]]]></description>
			<content:encoded><![CDATA[<p>In case it wasn&#8217;t already delightfully obvious, I prefer plain text. Html has a place. It can be wonderfully crafted into well laid out and cleverly designed websites thanks to web standards. The web abounds with examples of this. It does not however increase the efficiency or clarity of our business communication. E-mail is not the same as a web page. Your poor grammar is unaided by the bold font and bullets. Your signature would mean just as much if it was plain text. And no one really likes multicolored, animated smilies anyway. I understand that many, many people do not see this, they simply can not understand the superiour value of plain text email as a communication medium.</p>
<p>I honestly did not understand the full scope of this until recently returning to a corporate environment after several years of independent consulting. The clear dependence on html formatted emails, what some refer to as &#8220;rich text&#8221;, is entirely wasteful of internet bandwidth. As an example, using emails I have actually received. Given the same message located on my imap server, one saved using evolution with full html formatting intact; the other saving a plain text copy thanks to mutt (my MUA of choice):</p>
<pre>$ du -h mail.msg.txt
4.0K    mail.msg.txt</pre>
<pre>$du -h mail.msg.html
24K     mail.msg.html</pre>
<p>For this example, using real world sample emails, the html email is SIX TIMES larger than the plain text version. Assuming a large amount of correspondence for any given day, about 100 individual messages, the difference between 400k and 2400k starts to be noticeable, html email generating 2MB a day more of traffic. Now in all honesty, with the bandwidth available today that amount is negligible, but there are many other valid arguments against html email worth considering. Plain text email is immune to viruses, common spammer tricks like html tables and hidden text are negated, security risks from inline images and other html elements are removed, accessbility for is increased for people using screen readers and anyone who can not use a graphical interface.</p>
<p>Thankfully I&#8217;m not the only person who feels this way. This issue has been around for several years and deserves much more attention than it gets. The folks at the <a title="Ascii Ribbon Campaign" href="http://asciiribbon.org/">Ascii Ribbon Campaign</a> have a nice one page overview as well more links and instructions for configuring your email client to send plain text emails.</p>
<p>My favorite summation of all the reasons (taken from <a title="georgedillon.com" href="http://www.georgedillon.com/index.shtml">George Dillon</a>): <strong><span class="h4">HTML email can be dangerous, is not always readable, wastes bandwidth and is simply not necessary.</span></strong></p>
<p>Not convinced? (and why would you be?). Take a look at some of the following links:</p>
<ul>
<li><a title="Email is not a platform for design" href="http://www.zeldman.com/2007/06/08/e-mail-is-not-a-platform-for-design/">Email is not a platform for design</a> &#8211; <a title="Jeffrey Zeldman" href="http://www.zeldman.com/">Jeffrey Zeldman</a></li>
<li><a title="When is email like a bad website?" href="http://www.zeldman.com/2007/06/14/when-is-e-mail-like-a-bad-website/">When is e-mail like a bad website?</a> &#8211; also <a title="Jeffrey Zeldman" href="http://www.zeldman.com/">Jeffrey Zeldman</a></li>
<li><a title="HTML E-mail is STILL evil" href="http://www.georgedillon.com/web/html_email_is_evil_still.shtml">HTML E-mail is STILL evil</a> &#8211; <a title="georgedillon.com" href="http://www.georgedillon.com/index.shtml">George Dillon</a></li>
<li><a title="Force mail.app to display plain text by default" href="http://www.macosxhints.com/article.php?story=20030711201917175">Force mail.app to display plain text by default</a> &#8211; <a title="macosxhints.com" href="http://www.macosxhints.com/">maxosxhints.com</a></li>
</ul>
<p>Thanks for reading.</p>
<pre>                       _
ASCII ribbon campaign ( )
 against HTML e-mail   X
                      / \</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webframp.com/2008/06/17/get-your-html-out-of-my-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>life in transition</title>
		<link>http://www.webframp.com/2008/04/16/life-in-transition/</link>
		<comments>http://www.webframp.com/2008/04/16/life-in-transition/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 07:11:17 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[musings]]></category>
		<category><![CDATA[job change]]></category>

		<guid isPermaLink="false">http://www.webframp.com/2008/04/16/life-in-transition/</guid>
		<description><![CDATA[I really wish I had more time to write about all that&#8217;s going on. I&#8217;m moving to a new position at a legal services company to support their application. Hopefully I&#8217;ll have time there to re-code a web app I&#8217;m toying with. Can you say &#8220;startup.create(idea)&#8221;? Also wishing I was more connected with the portland [...]]]></description>
			<content:encoded><![CDATA[<p>I really wish I had more time to write about all that&#8217;s going on. I&#8217;m moving to a new position at a legal services company to support their application. Hopefully I&#8217;ll have time there to re-code a web app I&#8217;m toying with. Can you say &#8220;startup.create(idea)&#8221;?</p>
<p>Also wishing I was more connected with the portland tech community, there&#8217;s all these great people around here and I have no idea who they are.</p>
<p>that&#8217;s all there is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webframp.com/2008/04/16/life-in-transition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.5 released, commencing testing.</title>
		<link>http://www.webframp.com/2008/03/29/wordpress-25-released-commencing-testing/</link>
		<comments>http://www.webframp.com/2008/03/29/wordpress-25-released-commencing-testing/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 17:27:24 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[musings]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.webframp.com/2008/03/29/wordpress-25-released-commencing-testing/</guid>
		<description><![CDATA[I guess this news is several hours old by now, but WordPress 2.5 has been released, go get it. This is a huge update for WordPress and I&#8217;m definitely going to do some testing before I upgrade the main site. I&#8217;m curious to see how my current plugins will break. If you listen carefully you [...]]]></description>
			<content:encoded><![CDATA[<p>I guess this news is several hours old by now, but WordPress 2.5 has been <a targer="_blank" href="http://wordpress.org/development/2008/03/wordpress-25-brecker/">released</a>, go <a target="_blank" name="WP 2.5 download" href="http://wordpress.org/download/">get it</a>. This is a huge update for WordPress and I&#8217;m definitely going to do some testing before I upgrade the main site. I&#8217;m curious to see how my current plugins will break. If you listen carefully you can hear the sound of personal blogs breaking all over the world, and their respective owners sobbing.</p>
<p>*update: WordPress 2.5 is really, <a name="Webframp 2.5" href="http://www.webframp.com/wp2.5">really nice</a>. I haven&#8217;t been able to explore all the features yet obviously, but they have improved everything for an overall better experience. The new dashboard is excellent. The default editor feels incredibly improved, with much better support for inserting various media into posts. the downside is that none of my existing plugins work, as expected. I&#8217;m sure that will be fixed rather quickly as I don&#8217;t use anything uncommon. For now I&#8217;ll keep the testing installation around until they get updated. Don&#8217;t bother looking there, you won&#8217;t find anything interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webframp.com/2008/03/29/wordpress-25-released-commencing-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Much Longer Will Myspace Matter?</title>
		<link>http://www.webframp.com/2008/03/25/how-much-longer-will-myspace-matter/</link>
		<comments>http://www.webframp.com/2008/03/25/how-much-longer-will-myspace-matter/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 10:24:10 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[musings]]></category>

		<guid isPermaLink="false">http://www.webframp.com/2008/03/25/how-much-longer-will-myspace-matter/</guid>
		<description><![CDATA[&#160;&#160; I hate Myspace. I know that&#8217;s far from unique as there are many people who hate Myspace. I may be one of the few connected people who refuses to use it. I loathe it&#8217;s presentation and the so called community that has been created on it and I&#8217;m often disappointed when the only way [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp; I hate Myspace. I know that&#8217;s far from unique as there are many people who hate Myspace. I may be one of the few connected people who refuses to use it. I loathe it&#8217;s presentation and the so called community that has been created on it and I&#8217;m often disappointed when the only way to find a new band is on their Myspace page. All of this of course no doubt colors my attitude toward it and are, partly, reasons I refuse to use it. I write much of this as an outsider even, since I have avoided an account on either of the two most prolific social networking sites. Is that to my detriment? Or do I benefit in some&nbsp;way? I couldn&#8217;t say.</p>
<p>&nbsp;&nbsp; Don&#8217;t get me wrong, I&#8217;m not against social networks, or even their&nbsp;transference&nbsp;to the web and various sites that with them. In fact I see the amazingly huge growth in web 2.0 social apps, and related companies even, as a natural evolution of the internet and even computing. For years there have been technologies that allowed an ever increasing level of community and group identity and I hope that people will continue to innovate and introduce new and exciting applications to support this idea. I still remember learning about the &quot;wall&quot; command on my first ever public access unix account and thinking just how great it was to be able to be in touch, however slight, with others on the very same system. Others may not have felt the same when it was misused but for the most part that initial odd feeling of&nbsp;camaraderie&nbsp;was shared by fellow users, at least the ones I met personally. Laughable? Maybe. Subsequent personal discoveries such as email, usenet and irc heightened my excitement for the possibilities of connecting with a new group of friends and contacts. These like minded ones, I imagined, would be a new support group. They could support the interests I had and hopefully teach me much more about these very same interests. In the end they did so to varying degrees.</p>
<p>&nbsp;&nbsp; Now survey the modern landscape of interconnected people, applications and api&#8217;s. It&#8217;s left a single machine. It&#8217;s not defined by it&#8217;s access protocol. Myspace and Facebook have changed what it means to be in touch,&nbsp;redefined&nbsp;even who is worth adding as a &quot;friend&quot;. Weblogs have given more individuals the ability to voice their ideas to whoever wants to listen and syndication methods have made it easier to follow the ramblings of more and more individuals, myself included. Incredible collaboration has taken place on sites like&nbsp;<a href="http://www.wikipedia.org">Wikipedia</a>, which itself has developed a huge community and has active discussion surrounding much of the changes taking place. I personally spend entirely too much time wasted on&nbsp;<a href="http://twitter.com">Twitter</a>, one of a new group of supposed micro-blogging services to start up in the last few years. There are of course the numerous social news sites, like&nbsp;<a href="http://digg.com">digg</a>,&nbsp;<a href="http://reddit.com">reddit</a>&nbsp;and others, as well as social bookmarking at&nbsp;<a href="http://del.icio.us">del.icio.us</a>. Then there&#8217;s the numerous photo sharing sites with their own communities and it can go on and on, ad&nbsp;nauseam.</p>
<p>&nbsp;&nbsp; Ten years ago I would not have imagined that 90% of the pages I visit on a daily basis would allow the type of comment/response feedback that has become the norm, and that it would be commonplace to get a response quickly. Nor could I see that there would exist the wealth of interesting communities that have grown around such interesting social apps started in this web 2.0 era. Does any of this mean Myspace or Facebook will slowly fade in usage, replaced by an application better suited to enabling the most basic of human needs communication? Only further time will tell, but if there is a point to this rambling it is this:</p>
<p>&nbsp;&nbsp; As time moves forward and people become accustomed to the pieces of community afforded them by the current standard applications, they naturally desire more. They want a more meaningful community that is useful to them and wherein they can feel useful. It has to function naturally and be so unobtrusive in it&#8217;s overall design that it blurs the distinction between what is a &quot;real&quot; conversation, in person, and what takes place over these new evolving channels. Imagine going back to a single machine, sending a broadcast message to every logged on user who chose to allow it or could accept it. How restrictive and limiting is it compared to todays options. Now picture yourself looking back ten years from now with that same feeling, only now it&#8217;s Myspace that is restricted and limited.</p>
<p><code> Broadcast Message from sean@webframp.com <br />
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;(/dev/ttys000) at 3:23 PDT... </code></p>
<p><code>                                                                                                                          I look forward to your comments</code><code><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webframp.com/2008/03/25/how-much-longer-will-myspace-matter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
