<?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>incrementalism.net &#187; Mac</title>
	<atom:link href="http://incrementalism.net/tag/mac/feed" rel="self" type="application/rss+xml" />
	<link>http://incrementalism.net</link>
	<description></description>
	<lastBuildDate>Tue, 30 Aug 2011 04:44:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<cloud domain='incrementalism.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Making a Symbolic Link or a New Text File from the Finder</title>
		<link>http://incrementalism.net/tech/making-a-symbolic-link-or-a-new-text-file-from-the-finder</link>
		<comments>http://incrementalism.net/tech/making-a-symbolic-link-or-a-new-text-file-from-the-finder#comments</comments>
		<pubDate>Sat, 09 Apr 2011 15:18:00 +0000</pubDate>
		<dc:creator>Tim Moore</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Finder]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[services]]></category>

		<guid isPermaLink="false">http://incrementalism.net/?p=219</guid>
		<description><![CDATA[I was reading through some instructions on the Dropbox wiki for syncing things outside of the Dropbox folder and ran across a useful system service for Snow Leopard. Nick Zitzmann&#8217;s Symbolic Linker provides a way to create symbolic links from within the Finder. There have been a few times where I found myself wanting to [...]]]></description>
			<content:encoded><![CDATA[<p>I was reading through <a href="http://wiki.dropbox.com/TipsAndTricks/SyncOtherFolders#MacOSX">some instructions on the Dropbox wiki</a> for syncing things outside of the Dropbox folder and ran across a useful system service for Snow Leopard.</p>
<p>Nick Zitzmann&#8217;s <a href="http://seiryu.home.comcast.net/~seiryu/symboliclinker.html">Symbolic Linker</a> provides a way to create symbolic links from within the Finder. There have been a few times where I found myself wanting to create a symbolic link from outside the Terminal, so I gave it a try. It puts an item in the &#8220;Services&#8221; sub-menu that appears in the Finder&#8217;s application menu, and it also shows up in contextual menus and the &#8220;Action&#8221; button in the Finder toolbar (the one with the gear icon).</p>
<p><span id="more-219"></span></p>
<p>The icon in the Services menu is a bit plain, though.</p>
<p><a href="http://static.incrementalism.net/wp-content/uploads/2011/04/make-symlink-noicon.png"><img src="http://static.incrementalism.net/wp-content/uploads/2011/04/make-symlink-noicon.png" alt="The original &quot;Make Symbolic Link&quot; service uses a generic application icon" title="&quot;Make Symbolic Link&quot; Without a Custom Icon" width="480" height="236" class="size-full wp-image-224" /></a></p>
<p>Luckily, it&#8217;s <a href="http://github.com/nickzman/symboliclinker">open source</a>, so I was able to <a href="https://github.com/TimMoore/symboliclinker">fork it</a> and add a <a href="https://github.com/TimMoore/symboliclinker/raw/51e27f4f350580ed7bd42df2af1defdccb27f36b/Symbolic%20Linker%20Service%20Icon.png">simple icon</a> modelled after the arrow overlay that the Finder stamps onto aliases and symlinks.</p>
<p><a href="http://static.incrementalism.net/wp-content/uploads/2011/04/make-symlink-icon.png"><img src="http://static.incrementalism.net/wp-content/uploads/2011/04/make-symlink-icon.png" alt="This &quot;Make Symbolic Link&quot; service uses an icon" title="&quot;Make Symbolic Link&quot; With a Custom Icon" width="480" height="236" class="size-full wp-image-225" /></a></p>
<p>It won&#8217;t win any design awards, but it does the trick.</p>
<p>I opened a <a href="https://github.com/nickzman/symboliclinker/pull/1">pull request</a>, so hopefully he&#8217;ll take the change and release a new version, but the project hasn&#8217;t been active in a while, so if you&#8217;d like to grab this in the meantime, you can <a href="https://github.com/downloads/TimMoore/symboliclinker/SymbolicLinker2.0v2+icon.dmg">download my patched version</a>.</p>
<p><strong>Update, 10 April 2011:</strong> Nick has <a href="https://github.com/nickzman/symboliclinker/pull/1#issuecomment-978016">accepted the patch</a>. That was quick! Thanks, NIck.</p>
<p>While on the topic of useful services that are trivial to do in the Terminal but a little annoying when you&#8217;ve already got a Finder window open, sometimes I find myself wanting to create an empty text file in a folder that I&#8217;ve got open in the Finder. Opening a text editor, then saving the file and having to navigate back to the folder is a little tedious. I went looking for a Finder service that could do this for me, and found <a href="http://hints.macworld.com/article.php?story=20100509134904820">an article from Mac OS X Hints</a> that explains how to create one.</p>
<p>Why they didn&#8217;t just provide a file to download is beyond me, but if you want to save yourself the effort of going through the instructions, you can <a href="http://static.incrementalism.net/software/New%20Text%20File%20Service.dmg">download the one I made</a>, also with a custom icon.</p>
<p><strong>Update, 10 April 2011:</strong> <a href="https://twitter.com/#!/ellenbeldner/status/56869922625687552">via Ellen Beldner on Twitter</a>, today I coincidentally discovered <a href="http://code.google.com/p/cdto/">cdto</a>, which lets you add a toolbar button to the Finder to open the current window in a terminal. So for all of those other things that are more convenient to do with a quick command line, there you go.</p>
]]></content:encoded>
			<wfw:commentRss>http://incrementalism.net/tech/making-a-symbolic-link-or-a-new-text-file-from-the-finder/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centering Windows in Mac OS X with AppleScript</title>
		<link>http://incrementalism.net/tech/centering-windows-in-mac-os-x-with-applescript</link>
		<comments>http://incrementalism.net/tech/centering-windows-in-mac-os-x-with-applescript#comments</comments>
		<pubDate>Mon, 20 Jul 2009 01:17:42 +0000</pubDate>
		<dc:creator>Tim Moore</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[obsession]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://incrementalism.net/?p=124</guid>
		<description><![CDATA[I can be a little OCD with the windows on my screen. I tend to line them up at the edges or try to center them in the display. Maybe it&#8217;s a bad habit, but it&#8217;s one I&#8217;m probably not going to shake any time soon, so the least I can do is try to [...]]]></description>
			<content:encoded><![CDATA[<p>I can be a little OCD with the windows on my screen.  I tend to line them up at the edges or try to center them in the display. Maybe it&#8217;s a bad habit, but it&#8217;s one I&#8217;m probably not going to shake any time soon, so the least I can do is try to avoid wasting too much time on it.</p>
<p><span id="more-124"></span></p>
<p>I found <a href="http://github.com/wycats/osx-window-sizing/blob/80973de9772cffce57621fc27a74b693701c35fa/center.applescript">an AppleScript on GitHub</a> for centering the frontmost window. It didn&#8217;t do quite what I wanted, so here&#8217;s my slightly-modified version, which will center the window in your screen horizontally without changing the vertical position or size.</p>
<pre class="brush: applescript; class-name: applescript; title: ; notranslate">
tell application &quot;Finder&quot;
	set screenSize to bounds of window of desktop
	set screenWidth to item 3 of screenSize
end tell

tell application &quot;System Events&quot;
	set myFrontMost to name of first item of ¬
		(processes whose frontmost is true)
end tell

try
	tell application myFrontMost
		set windowSize to bounds of window 1
		set windowXl to item 1 of windowSize
		set windowYt to item 2 of windowSize
		set windowXr to item 3 of windowSize
		set windowYb to item 4 of windowSize

		set windowWidth to windowXr - windowXl

		set bounds of window 1 to {¬
			(screenWidth - windowWidth) / 2.0, ¬
			windowYt, ¬
			(screenWidth + windowWidth) / 2.0, ¬
			windowYb}
	end tell
end try
</pre>
<p>Paste this into Script Editor or <a href='http://static.incrementalism.net/wp-content/uploads/2009/07/Center-Window.scpt'>download the script file</a>. Put the file in ~/Library/Scripts. Make sure you&#8217;ve got the Script menu turned on in the AppleScript Utility application. It will show up in there, and should work in most Mac applications.</p>
<p>I have found a couple of limitations. It doesn&#8217;t seem to work at all with Firefox, which doesn&#8217;t have very complete AppleScript support. It&#8217;s likely that there are other applications out there with missing or incomplete AppleScript support that this won&#8217;t work for either. The second problem is that there&#8217;s <a href="http://openradar.appspot.com/5765608">a bug in the Terminal application</a> that moves the window upwards, even though the script is written in a way that&#8217;s supposed to preserve the vertical position. It would be possible to work around this, but I decided that it didn&#8217;t bother me enough to clutter up the code. If you want a workaround, post a comment and I&#8217;ll give it a shot.</p>
<p>The original script doesn&#8217;t specify a license, so I hope it&#8217;s OK to modify and share it. I figure that, since it&#8217;s published on GitHub, and the author releases a lot of open source code under very liberal licenses, that he&#8217;s probably not intending to keep very tight control over it. My changes are offered to the public domain.</p>
<p>I&#8217;m just as obsessive with making sure objects are lined up straight on my (real life) desk top. Sadly, AppleScript can&#8217;t help me there.</p>
<p><strong>Update, 15-Nov-2010:</strong> This continues to be a fairly popular post, which a lot of people seem to come across through search engines. See the comments below for tips about ensuring that the window size doesn&#8217;t change, and for centering vertically as well. I&#8217;ve also noticed that this fails on multi-display setups, centering between the two screens instead of on the current screen. I&#8217;ll try to come up with a fix for that.</p>
]]></content:encoded>
			<wfw:commentRss>http://incrementalism.net/tech/centering-windows-in-mac-os-x-with-applescript/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 2/14 queries in 0.080 seconds using disk: basic
Object Caching 371/393 objects using disk: basic
Content Delivery Network via static.incrementalism.net

Served from: incrementalism.net @ 2012-02-05 23:47:39 -->
