Skip to content

Instantly share code, notes, and snippets.

@geberl
Last active November 4, 2015 21:32
Show Gist options
  • Save geberl/03dc6abc6310af54d128 to your computer and use it in GitHub Desktop.
Save geberl/03dc6abc6310af54d128 to your computer and use it in GitHub Desktop.
Alfred AppleScript to toggle showing hidden files in OS X. Script from workflow https://github.com/shrop/alfred2-hidden-files.
on alfred_script(q)
set v to do shell script "echo $(defaults read com.apple.finder AppleShowAllFiles)"
if v is "True" then
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE"
end if
do shell script "killall Finder"
tell application "System Events" to set frontmost of process "Finder" to true
end alfred_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment