<?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>Random Geekage &#187; acpi</title>
	<atom:link href="http://kevinisageek.org/tag/acpi/feed/" rel="self" type="application/rss+xml" />
	<link>http://kevinisageek.org</link>
	<description>Randomness, geekery and whatever else I feel like</description>
	<lastBuildDate>Thu, 20 May 2010 10:29:06 +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>Battery level in Bash prompt</title>
		<link>http://kevinisageek.org/2008/10/17/battery-level-in-bash-prompt/</link>
		<comments>http://kevinisageek.org/2008/10/17/battery-level-in-bash-prompt/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 14:33:16 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[acpi]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[prompt]]></category>

		<guid isPermaLink="false">http://kevinisageek.org/weblog/?p=266</guid>
		<description><![CDATA[If you are like me and want to run mainly in command line while using a laptop, you might have trouble finding out how much charge is left in your laptop battery. GUIs always have some sort of widget that reports battery info but the command line is sorely lacking. It would suck to be [...]]]></description>
			<content:encoded><![CDATA[<p>If you are like me and want to run mainly in command line while using a laptop, you might have trouble finding out how much charge is left in your laptop battery. GUIs always have some sort of widget that reports battery info but the command line is sorely lacking. It would suck to be typing away then your screen going dead in the middle of something important.</p>
<p>I have been looking for a simple solution for a while and came up with one. The idea is to print the output of the acpi command in your bash prompt. It is a pretty simple thing to do.</p>
<p>[ `acpi` ] is the fragment of text you need to put into the PS1 variable in your .bashrc file. My prompt looks like PS1=&#8217;[ `acpi` ]\n${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ &#8216;</p>
<p>Looks complicated but the bulk of it is colour making the prompt look better. My prompt looks as such:</p>
<p><img src="http://kevinisageek.org/weblog/wp-content/uploads/2008/10/battery.png" alt="" /></p>
<p>Hope this helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevinisageek.org/2008/10/17/battery-level-in-bash-prompt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
