diff --git a/README.md b/README.md index c52639e..0cb121b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,43 @@ -# ShowHidden +# Show Hidden -Shows or hides hidden files in mac finder. \ No newline at end of file +Shows or hides hidden files in mac finder. + +It's a very basic shell script. +Here's the full thing. + +```bash +#show or hide hidden files in mac finder + +show=$(defaults read com.apple.finder AppleShowAllFiles) +if [ "$show" == "TRUE" ] +then + defaults write com.apple.finder AppleShowAllFiles FALSE;killall Finder +else [ "$show" == "FALSE" ] + defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder +fi + +exit +``` + +**[Note]:** *Only works on OSX.* It shouldn't damage anything if you run it on another system with bash installed but it won't do anything either. + +## Requierments + +A version of OSX around 10.6 +OSX 10.6.8 is the only thing this has been tested on. If you have a simi-modern version of OSX/macOS this functionality is now built into Files. + +## Running + +Two methods of running are provided. + +#### Method 1. The script + +* Download the script or copy it from this [readme](https://efrick.ddns.net/git/manfromhuh/ShowHidden/src/branch/master/README.md) and place it in a folder on your path. +* Add execute permissions. Example `chmod u+x /path/to/script/show_hidden.sh` +* Run from the commandline. + +#### Method 2. The app + +* Download the [.dmg](https://efrick.ddns.net/git/manfromhuh/ShowHidden/releases). +* Open the .dmg and drag the application to the Applications folder. +* Run from the application menu. \ No newline at end of file diff --git a/Show Hidden.app/Contents/Info.plist b/Show Hidden.app/Contents/Info.plist new file mode 100644 index 0000000..6d96c99 --- /dev/null +++ b/Show Hidden.app/Contents/Info.plist @@ -0,0 +1,62 @@ + + + + + AMIsApplet + + AMStayOpen + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + * + + CFBundleTypeName + Automator workflow file + CFBundleTypeOSTypes + + **** + + CFBundleTypeRole + Viewer + + + CFBundleExecutable + Application Stub + CFBundleIconFile + AutomatorApplet + CFBundleIdentifier + com.apple.automator.Show Hidden + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Show Hidden + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.1 + CFBundleSignature + ???? + CFBundleVersion + 247.1 + LSMinimumSystemVersion + 10.5 + LSMinimumSystemVersionByArchitecture + + x86_64 + 10.6 + + LSUIElement + + NSAppleScriptEnabled + YES + NSMainNibFile + ApplicationStub + NSPrincipalClass + NSApplication + + diff --git a/Show Hidden.app/Contents/MacOS/Application Stub b/Show Hidden.app/Contents/MacOS/Application Stub new file mode 100755 index 0000000..e22f57d Binary files /dev/null and b/Show Hidden.app/Contents/MacOS/Application Stub differ diff --git a/Show Hidden.app/Contents/PkgInfo b/Show Hidden.app/Contents/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/Show Hidden.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/Show Hidden.app/Contents/Resources/AutomatorApplet.icns b/Show Hidden.app/Contents/Resources/AutomatorApplet.icns new file mode 100644 index 0000000..1b70bbf Binary files /dev/null and b/Show Hidden.app/Contents/Resources/AutomatorApplet.icns differ diff --git a/Show Hidden.app/Contents/Resources/AutomatorApplet_old.icns b/Show Hidden.app/Contents/Resources/AutomatorApplet_old.icns new file mode 100644 index 0000000..2a0a8b5 Binary files /dev/null and b/Show Hidden.app/Contents/Resources/AutomatorApplet_old.icns differ diff --git a/Show Hidden.app/Contents/Resources/Dutch.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/Dutch.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..4dce73a Binary files /dev/null and b/Show Hidden.app/Contents/Resources/Dutch.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/English.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/English.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..80dce37 Binary files /dev/null and b/Show Hidden.app/Contents/Resources/English.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/French.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/French.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..2e6dd7b Binary files /dev/null and b/Show Hidden.app/Contents/Resources/French.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/German.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/German.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..100dafe Binary files /dev/null and b/Show Hidden.app/Contents/Resources/German.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/Italian.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/Italian.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..5e31a7f Binary files /dev/null and b/Show Hidden.app/Contents/Resources/Italian.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/Japanese.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/Japanese.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..9703dcf Binary files /dev/null and b/Show Hidden.app/Contents/Resources/Japanese.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/Spanish.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/Spanish.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..4fbcf70 Binary files /dev/null and b/Show Hidden.app/Contents/Resources/Spanish.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/da.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/da.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..aed308b Binary files /dev/null and b/Show Hidden.app/Contents/Resources/da.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/fi.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/fi.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..99f74be Binary files /dev/null and b/Show Hidden.app/Contents/Resources/fi.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/ko.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/ko.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..3176f66 Binary files /dev/null and b/Show Hidden.app/Contents/Resources/ko.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/no.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/no.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..1d7ea21 Binary files /dev/null and b/Show Hidden.app/Contents/Resources/no.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/pl.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/pl.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..877c49a Binary files /dev/null and b/Show Hidden.app/Contents/Resources/pl.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/pt.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/pt.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..327f445 Binary files /dev/null and b/Show Hidden.app/Contents/Resources/pt.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/pt_PT.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/pt_PT.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..5b01b1a Binary files /dev/null and b/Show Hidden.app/Contents/Resources/pt_PT.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/ru.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/ru.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..2b9d34c Binary files /dev/null and b/Show Hidden.app/Contents/Resources/ru.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/sv.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/sv.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..e32445f Binary files /dev/null and b/Show Hidden.app/Contents/Resources/sv.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/zh_CN.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/zh_CN.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..8a23014 Binary files /dev/null and b/Show Hidden.app/Contents/Resources/zh_CN.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/Resources/zh_TW.lproj/ApplicationStub.nib/keyedobjects.nib b/Show Hidden.app/Contents/Resources/zh_TW.lproj/ApplicationStub.nib/keyedobjects.nib new file mode 100644 index 0000000..c0dd1e8 Binary files /dev/null and b/Show Hidden.app/Contents/Resources/zh_TW.lproj/ApplicationStub.nib/keyedobjects.nib differ diff --git a/Show Hidden.app/Contents/document.wflow b/Show Hidden.app/Contents/document.wflow new file mode 100644 index 0000000..98bdac1 --- /dev/null +++ b/Show Hidden.app/Contents/document.wflow @@ -0,0 +1,273 @@ + + + + + AMApplicationBuild + 247.1 + AMApplicationVersion + 2.1.1 + AMDocumentVersion + 2 + actions + + + action + + AMAccepts + + Container + List + Optional + + Types + + com.apple.cocoa.string + + + AMActionVersion + 2.0.1 + AMParameterProperties + + COMMAND_STRING + + CheckedForUserDefaultShell + + inputMethod + + shell + + source + + + AMProvides + + Container + List + Types + + com.apple.cocoa.string + + + ActionBundlePath + /System/Library/Automator/Run Shell Script.action + ActionName + Run Shell Script + ActionParameters + + COMMAND_STRING + #show or hide hidden files in mac finder + +show=$(defaults read com.apple.finder AppleShowAllFiles) +if [ "$show" == "TRUE" ] +then + defaults write com.apple.finder AppleShowAllFiles FALSE;killall Finder +else [ "$show" == "FALSE" ] + defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder +fi + +exit + CheckedForUserDefaultShell + + inputMethod + 0 + shell + /bin/bash + source + + + Application + + Automator + + BundleIdentifier + com.apple.RunShellScript + CFBundleVersion + 2.0.1 + CanShowSelectedItemsWhenRun + + CanShowWhenRun + + Category + + AMCategoryUtilities + + Class Name + RunShellScriptAction + InputUUID + 46E99D34-541D-4DFD-957C-B128F83D2093 + Keywords + + Shell + Script + Command + Run + Unix + + OutputUUID + D6C51654-D625-4F4A-B584-DCCB86326133 + UUID + FC950196-8430-4CFE-B95C-1C28A840489F + UnlocalizedApplications + + Automator + + arguments + + 0 + + default value + 0 + name + inputMethod + required + 0 + type + 0 + uuid + 0 + + 1 + + default value + + name + source + required + 0 + type + 0 + uuid + 1 + + 2 + + default value + + name + CheckedForUserDefaultShell + required + 0 + type + 0 + uuid + 2 + + 3 + + default value + + name + COMMAND_STRING + required + 0 + type + 0 + uuid + 3 + + 4 + + default value + /bin/sh + name + shell + required + 0 + type + 0 + uuid + 4 + + + isViewVisible + + location + 309.500000:451.000000 + nibPath + /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib + + isViewVisible + + + + connectors + + state + + AMLogTabViewSelectedIndex + 0 + libraryState + + actionsMajorSplitViewState + + expandedPosition + 0.0 + subviewState + + 0.000000, 0.000000, 381.000000, 515.000000, NO + 0.000000, 516.000000, 381.000000, 136.000000, NO + + + actionsMinorSplitViewState + + expandedPosition + 0.0 + subviewState + + 0.000000, 0.000000, 163.000000, 515.000000, NO + 164.000000, 0.000000, 217.000000, 515.000000, NO + + + variablesMajorSplitViewState + + expandedPosition + 0.0 + subviewState + + 0.000000, 0.000000, 350.000000, 555.000000, NO + 0.000000, 556.000000, 350.000000, 148.000000, NO + + + variablesMinorSplitViewState + + expandedPosition + 0.0 + subviewState + + 0.000000, 0.000000, 163.000000, 555.000000, NO + 164.000000, 0.000000, 186.000000, 555.000000, NO + + + + majorSplitViewState + + expandedPosition + 0.0 + subviewState + + 0.000000, 0.000000, 381.000000, 697.000000, NO + 382.000000, 0.000000, 619.000000, 697.000000, NO + + + minorSplitViewState + + expandedPosition + 0.0 + subviewState + + 0.000000, 0.000000, 619.000000, 506.000000, NO + 0.000000, 516.000000, 619.000000, 162.000000, NO + + + windowFrame + {{680, 254}, {1000, 774}} + workflowViewScrollPosition + {{0, 0}, {619, 506}} + + workflowMetaData + + workflowTypeIdentifier + com.apple.Automator.application + + + diff --git a/Show Hidden.app/Contents/version.plist b/Show Hidden.app/Contents/version.plist new file mode 100644 index 0000000..9dcbd7b --- /dev/null +++ b/Show Hidden.app/Contents/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 2 + CFBundleShortVersionString + 1.1 + CFBundleVersion + 247.1 + ProjectName + Automator + SourceVersion + 2470100 + + diff --git a/ShowHidden.dmg b/ShowHidden.dmg new file mode 100755 index 0000000..da062ed Binary files /dev/null and b/ShowHidden.dmg differ diff --git a/show_hidden.sh b/show_hidden.sh new file mode 100755 index 0000000..caa8530 --- /dev/null +++ b/show_hidden.sh @@ -0,0 +1,11 @@ +#show or hide hidden files in mac finder + +show=$(defaults read com.apple.finder AppleShowAllFiles) +if [ "$show" == "TRUE" ] +then + defaults write com.apple.finder AppleShowAllFiles FALSE;killall Finder +else [ "$show" == "FALSE" ] + defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder +fi + +exit