<?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>Xster.net &#187; command line</title>
	<atom:link href="http://tech.xster.net/tag/command-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.xster.net</link>
	<description>Never relearn twice</description>
	<lastBuildDate>Fri, 20 Jan 2012 21:11:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mac Doesn&#8217;t Go to Sleep</title>
		<link>http://tech.xster.net/tips/mac-doesnt-go-to-sleep/</link>
		<comments>http://tech.xster.net/tips/mac-doesnt-go-to-sleep/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 02:43:22 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[power management]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=388</guid>
		<description><![CDATA[When you make the Mac go to sleep but it just stays on with the screen black, you can use the pmset -g to display you current power management settings and see the entry for sleep that will tell you the problem causing process PID]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>When you make the Mac go to sleep but it just stays on with the screen black, you can use the</p>
<pre lang="&quot;bash">pmset -g</pre>
<p>to display you current power management settings and see the entry for sleep that will tell you the problem causing process PID</p>
<div class="shr-publisher-388"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fmac-doesnt-go-to-sleep%2F' data-shr_title='Mac+Doesn%27t+Go+to+Sleep'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fmac-doesnt-go-to-sleep%2F' data-shr_title='Mac+Doesn%27t+Go+to+Sleep'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/mac-doesnt-go-to-sleep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quake Style Drop Down Terminal for Mac</title>
		<link>http://tech.xster.net/tips/the-perfect-visor-reborn/</link>
		<comments>http://tech.xster.net/tips/the-perfect-visor-reborn/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 22:52:28 +0000</pubDate>
		<dc:creator>xiao</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[blacktree]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[perfect]]></category>
		<category><![CDATA[prompt]]></category>
		<category><![CDATA[quake]]></category>
		<category><![CDATA[SIMBL]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[TotalTerminal]]></category>
		<category><![CDATA[visor]]></category>

		<guid isPermaLink="false">http://tech.xster.net/?p=10</guid>
		<description><![CDATA[Update: Visor Terminal is now TotalTerminal. It&#8217;s a lot easier to configure so you can just download TotalTerminal and perform the steps below starting at 6. The Visor Terminal, one of my most used hack-features. This guide helps you put your Mac Terminal to the zenith of usability and convenience. The drop-down Quake-style terminal window [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p style="text-align: left;"><em><strong>Update: </strong>Visor Terminal is now <a href="http://totalterminal.binaryage.com/">TotalTerminal</a>. It&#8217;s a lot easier to configure so you can just download TotalTerminal and perform the steps below starting at 6.</em></p>
<p style="text-align: left;">The <a href="http://visor.binaryage.com/" target="_blank">Visor Terminal</a>, one of my most used hack-features. This guide helps you put your Mac Terminal to the zenith of usability and convenience.</p>
<div id="attachment_11" class="wp-caption alignleft" style="width: 650px"><img class="size-full wp-image-11" title="visor" src="http://tech.xster.net/wp-content/uploads/2009/03/visor.jpg" alt="Visor Terminal" width="640" height="261" /><p class="wp-caption-text">Visor Terminal</p></div>
<p>The drop-down Quake-style terminal window is extremely convenient to run commands without disrupting the current workflow. Unfortunately the default install is very messy. It needs an open terminal program running in the background which can&#8217;t be closed and takes up valuable Dock space.<span id="more-10"></span></p>
<p>Then comes a blog from <a href="http://blog.wombert.de/" target="_blank">David Zülke</a> who solved the problem with a <a href="http://blog.wombert.de/2006/11/04/the-perfect-visor/" target="_blank">hack</a> which essentially creates a second terminal program, links the visor extension to it and makes that second terminal always invisible and not appearing in the Dock by playing with the Info.plist file. The world was beautiful until I bought a new Macbook and tried to reinstall Visor but only to find out that his instructions are no longer hosted. So here are the instructions again for those who want a Perfect Visor. This is for version 1.5 &#8211; 2.2 which runs on Leopard &#8211; Snow Leopard.</p>
<ol>
<li>Install <a href="http://www.culater.net/software/SIMBL/SIMBL.php" target="_blank">SIMBL </a></li>
<li>This is not necessary but it&#8217;s a lot easier if you have <a href="http://developer.apple.com/TOOLS/xcode/" target="_blank">XCode</a> to use its .plist editor tool.</li>
<li>Right-click the extracted “Visor” file, select “Show Package Contents” and double-click “Info.plist” in the “Contents” folder[1]. Go to <code>Root</code>, <code>SIMBLTargetApplications</code>, <code>0</code> and change <code>BundleIdentifier</code> to “com.apple.VisorTerminal”. Save and close. You can now install the bundle according to the Visor install instructions (i.e. move it to ~/Library/Application Support/SIMBL/Plugins or the “global” equivalent in /Library).</li>
<li>Go to your Applications/Utilities folder and duplicate Terminal. Rename the copy to “VisorTerminal”, then right-click it and choose “Show Package Contents”, and double-click “Info.plist” in the “Contents” folder. Go to <code>Root</code> and change <code>CFBundleIdentifier</code> to “com.apple.VisorTerminal”. Save and close.</li>
<li>Start VisorTerminal. Go to Terminal menu and click Visor Preferences. Customize it to your suiting.</li>
<li>Make it run on start up. You can right click the VisorTerminal on Dock and choose &#8220;Open at Login&#8221;</li>
<li>Make it invisible. Right-click the VisorTerminal, choose “Show Package contents” and double-click Info.plist in the Contents folder. Add a new Sibling inside the root element called <code>LSUIElement</code>, it must be of type “Number” and have the value “1″ (without the quotes, of course). Save and quit.</li>
<li>Done and done! Now the Visor will start on startup and won&#8217;t show up anywhere until you press the hotkey.  If you don&#8217;t like your previous preferences, you can&#8217;t right click or use menu anymore but pressing cmd-, will bring up the preferences window for the terminal</li>
</ol>
<p>Currently, there&#8217;s a bug with SIMBL 0.97 that causes the application to stop using SIMBL when LSUIElement is set to 1. To solve this issue, use AppleScript with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;VisorTerminal&quot;</span>
	inject SIMBL <span style="color: #0066ff;">into</span> Snow Leopard
	<span style="color: #0066ff;">activate</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></pre></div></div>

<p>Then save the script as a .app in a desired location. Make this run at startup instead of VisorTerminal.</p>
<p>The next steps are optional but your default Darwin terminal prompt  looks like shit. Here&#8217;s how to customize it.</p>
<ol>
<li>Press your hotkey or open Terminal</li>
<li>Go to your home directory

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~</pre></div></div>

<p>You are there by default</li>
<li>Change your profile file

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mate .bash_profile</pre></div></div>

<p>TextMate is my favorite editor. If you don&#8217;t use it, use <code>nano</code> instead of <code>mate</code></li>
<li>Type

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> PS1 = <span style="color: #ff0000;">&quot; &quot;</span></pre></div></div>

<p>And customize your prompt with the following keywords between the quotes</p>
<ul>
<li>\d &#8211; Current date</li>
<li>\t &#8211; Current time</li>
<li>\h &#8211; Host name</li>
<li>\# &#8211; Command number</li>
<li>\u &#8211; User name</li>
<li>\W &#8211; Current working directory (ie: Desktop/)</li>
<li>\w &#8211; Current working directory, full path (ie: /Users/Admin/Desktop)</li>
</ul>
<p>ie.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">&quot;\u@\h\w: &quot;</span></pre></div></div>

</li>
<li>Save and restart your terminal</li>
</ol>
<div class="shr-publisher-10"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fthe-perfect-visor-reborn%2F' data-shr_title='Quake+Style+Drop+Down+Terminal+for+Mac'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Ftech.xster.net%2Ftips%2Fthe-perfect-visor-reborn%2F' data-shr_title='Quake+Style+Drop+Down+Terminal+for+Mac'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://tech.xster.net/tips/the-perfect-visor-reborn/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

