{"id":665,"date":"2013-01-26T12:47:22","date_gmt":"2013-01-26T20:47:22","guid":{"rendered":"http:\/\/bellm.org\/blog\/?p=665"},"modified":"2013-01-26T18:28:37","modified_gmt":"2013-01-27T02:28:37","slug":"getting-a-new-os-x-finder-window-in-the-current-space","status":"publish","type":"post","link":"http:\/\/bellm.org\/blog\/2013\/01\/26\/getting-a-new-os-x-finder-window-in-the-current-space\/","title":{"rendered":"Getting a new OS X Finder window in the current Space"},"content":{"rendered":"<p>Mac OS X provides multiple desktops via the Spaces feature.? I use this feature all the time to keep my mental workspace uncluttered: typically I have one Space with a web browser, one or two more with terminals (iTerm2 is great), and another with documents or presentations.<\/p>\n<p>In Apple&#8217;s Spaces model, if you click on the icon of an already-running program in the Dock, it takes you to the Space where that application&#8217;s windows are.? For example, if I&#8217;m in Space 3 and have iTunes open in Space 1, clicking the iTunes icon will move me to Space 1.<\/p>\n<p>This automatic space-switching behavior is <em>not<\/em> what I want with Finder.? When I click on the Finder in the Dock I want a new Finder window in the current space.? What happens instead is unpredictable.? If I have no Finder windows open in any space, I get what I want:? a new Finder window where I am now.? However, if I have forgotten Finder windows in other Spaces, OS X will zip me away from what I&#8217;m doing to those old Finder windows.? That unexpected switch destroys whatever sense of flow I have as I drag back to my current Space.<\/p>\n<p>Two methods for getting a new Finder window in the current space don&#8217;t work well for me personally.? The first is to right click on the Finder icon in Dock and select &#8220;New Finder Window.&#8221;?? The second method is to switch to Finder (either by Cmd-Tab or by clicking on the desktop), then hitting Cmd-N.? Both methods are too cumbersome for me, though they might satisfy you.<\/p>\n<p>Instead, I found an <a href=\"http:\/\/apple.stackexchange.com\/questions\/4210\/i-wish-i-could-get-a-new-finder-window-launched-if-i-double-click-the-finder-ico\">Applescript method<\/a> to produce a new Finder window.? I modified the code slightly to give focus to the new window and to start in my chosen directory:<\/p>\n<p><code>on run<br \/>\ntell application \"Finder\"<br \/>\nset NewWindow to make new Finder window<br \/>\nset target of NewWindow to \"Macintosh HD:Users:username:path\"<br \/>\nactivate<br \/>\nend tell<br \/>\nend run<\/code><\/p>\n<p>Open AppleScript Editor (via Spotlight is easist) and paste in the code.? (Replace <code>username<\/code> with your username and the <code>path<\/code> as well.)? Save the file as something like <code>new_finder_applescript<\/code> in your Applications folder.? Set the format to Application and make sure that &#8220;Stay open after run handler&#8221; is unchecked.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-668 aligncenter\" title=\"applescript_finder_window_save\" src=\"http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/Screen-Shot-2013-01-26-at-12.05.33-PM.png\" alt=\"\" width=\"604\" height=\"318\" srcset=\"http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/Screen-Shot-2013-01-26-at-12.05.33-PM.png 604w, http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/Screen-Shot-2013-01-26-at-12.05.33-PM-300x157.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/p>\n<p>Next, let&#8217;s <a href=\"https:\/\/support.apple.com\/kb\/ht2493\">replace<\/a> the default applescript icon with something better.? I like this CC-licensed <a href=\"http:\/\/www.iconarchive.com\/show\/x-set-icons-by-gordon-irving\/Leo-Finder-Blue-icon.html\">Finder icon<\/a> by <a href=\"http:\/\/www.gordonirvingdesign.com\/\">Gordon Irving<\/a>.? Download the .icns version.? Open your Applications folder and Cmd-click on <code>new_finder_applescript<\/code> and select &#8220;Get Info.&#8221;? In the top left will be the default &#8220;rolled paper&#8221; Applescript icon.? Drag and drop the new icon file onto the default icon&#8230;<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-669 aligncenter\" title=\"applescript_replace_icon\" src=\"http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/applescript_replace_icon.png\" alt=\"\" width=\"380\" height=\"137\" srcset=\"http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/applescript_replace_icon.png 380w, http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/applescript_replace_icon-300x108.png 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/p>\n<p>and the new icon should appear.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-671 aligncenter\" title=\"applescript_new_icon\" src=\"http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/applescript_new_icon1.png\" alt=\"\" width=\"266\" height=\"94\" \/><\/p>\n<p>Finally, drag the new_finder_applescript icon into the Dock.? I like to place it just below the standard Finder (which can&#8217;t be removed from the Dock without terminal hacking).<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-672 aligncenter\" title=\"new_finder_in_dock\" src=\"http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/new_finder_in_dock.png\" alt=\"\" width=\"315\" height=\"266\" srcset=\"http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/new_finder_in_dock.png 315w, http:\/\/bellm.org\/blog\/wp-content\/uploads\/2013\/01\/new_finder_in_dock-300x253.png 300w\" sizes=\"auto, (max-width: 315px) 100vw, 315px\" \/><\/p>\n<p>Now, a quick click on your new icon will give you a Finder window in the current Space, no matter what!? It&#8217;s possible to bind your script to a hotkey with third-party programs like <a href=\"http:\/\/qsapp.com\/\">Quicksilver<\/a> or <a href=\"http:\/\/www.red-sweater.com\/fastscripts\/\">FastScripts<\/a> as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mac OS X provides multiple desktops via the Spaces feature.? I use this feature all the time to keep my mental workspace uncluttered: typically I have one Space with a web browser, one or two more with terminals (iTerm2 is great), and another with documents or presentations. In Apple&#8217;s Spaces model, if you click on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-665","post","type-post","status-publish","format-standard","hentry","category-programming-2"],"_links":{"self":[{"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/posts\/665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/comments?post=665"}],"version-history":[{"count":15,"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/posts\/665\/revisions"}],"predecessor-version":[{"id":685,"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/posts\/665\/revisions\/685"}],"wp:attachment":[{"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/media?parent=665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/categories?post=665"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bellm.org\/blog\/wp-json\/wp\/v2\/tags?post=665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}