<?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>Ctrl-C &#187; procrastination</title>
	<atom:link href="http://ctrl-c.us/blog/archives/tag/procrastination/feed" rel="self" type="application/rss+xml" />
	<link>http://ctrl-c.us/blog</link>
	<description>a friendly interruption</description>
	<lastBuildDate>Fri, 28 May 2010 11:49:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using notify-send to Slack Off Efficiently</title>
		<link>http://ctrl-c.us/blog/archives/746</link>
		<comments>http://ctrl-c.us/blog/archives/746#comments</comments>
		<pubDate>Thu, 17 Dec 2009 12:25:16 +0000</pubDate>
		<dc:creator>Caleb Spare</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[libnotify]]></category>
		<category><![CDATA[notify-send]]></category>
		<category><![CDATA[procrastination]]></category>

		<guid isPermaLink="false">http://ctrl-c.us/blog/?p=746</guid>
		<description><![CDATA[I&#8217;ve been working on a big project in MPI and the execution times on my code are annoyingly long (on the order of minutes). I like to keep my work in a separate workspace from my browser to minimize distractions, but then when I set my code running and head over to visit reddit or [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a big project in MPI and the execution times on my code are annoyingly long (on the order of minutes). I like to keep my work in a separate workspace from my browser to minimize distractions, but then when I set my code running and head over to visit <a href="http://reddit.com">reddit</a> or something I often don&#8217;t notice when my code finishes. Today it occurred to me that this would be a good use for libnotify. There is a command-line utility called <code>notify-send</code> (you should have it if you have a recent version of Ubuntu; not sure about other distros) which gives a simple interface to libnotify, so I whipped up a tiny script to call it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">EVAL_STRING</span>=<span style="color: #ff0000;">&quot;notify-send -u normal -t 5000 -i info <span style="color: #000099; font-weight: bold;">\&quot;</span>Task completed<span style="color: #000099; font-weight: bold;">\&quot;</span> <span style="color: #000099; font-weight: bold;">\&quot;</span>$@<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">eval</span> $<span style="color: #000000; font-weight: bold;">@</span>; <span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #007800;">$EVAL_STRING</span></pre></div></div>

<p>I put it in a folder which is in my path, and now I just do<br />
<pre>$ notify ./takes_forever</pre><br />
and I know as soon as it&#8217;s done. OK, <a href="http://xkcd.com/303/">back to work</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ctrl-c.us/blog/archives/746/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
