Jump to content

Toggle Hidden Files workflow


Recommended Posts

  • 2 weeks later...

FYI.  Unless you have already created the value, defaults write com.apple.finder AppleShowAllFiles -bool true, the workflow will silently fail.

 

error "2014-04-07 11:58:32.059 defaults[7149:d07] 

The domain/default pair of (/Users/jasonbrown/Library/Preferences/com.apple.finder, AppleShowAllFiles) does not exist" number 1

Edited by JasonB5232
Link to comment
  • 10 months later...

I made a similar workflow a while back and managed to bolt together a script filter which lets Alfred tell you if hidden files are currently visible or if they're hidden. This may or may not be useful to you :)

#!/bin/sh

#check the current value and display the result as subtitle
CURVALUE=$(defaults read com.apple.finder AppleShowAllFiles -bool)

if [ $CURVALUE = 0 ]; then
	subtitle="Hidden files are currently invisible"
else
	subtitle="Hidden files are currently visible"
fi

echo '<?xml version="1.0"?><items>'
echo "<item arg=\"{query}\" uid=\"ssid\" valid=\"yes\">"
echo "<title>Toggle hidden files</title>"
echo "<subtitle>$subtitle</subtitle>"
echo "<icon>icon.png</icon></item></items>"
echo "</items>"
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...