Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
Fixed foldername bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
winston committed Dec 21, 2012
1 parent 9310675 commit cb99d0b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions recipes/set_finder_show_user_home_in_sidebar.rb
@@ -1,15 +1,16 @@
ruby_block "Show User Home In Sidebar" do
username = ENV['SUDO_USER']
block do
system(
"osascript -e '
tell application \"Finder\"
activate
delay 1
set user_home to folder \"nctx\" of folder \"Users\" of Startup disk
select user_home
delay 1
tell application \"System Events\" to tell process \"Finder\" to keystroke \"t\" using command down
close window 1
activate
delay 1
set user_home to folder \"#{username}\" of folder \"Users\" of Startup disk
select user_home
delay 1
tell application \"System Events\" to tell process \"Finder\" to keystroke \"t\" using command down
close window 1
end tell'"
)
end
Expand Down

0 comments on commit cb99d0b

Please sign in to comment.