Rixstep
 About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Home » Products » Reviews » The Very Ugly

Hidden Files Widget 2.0

He's going places.

Matthew Hansen is going places. Currently he's an undergrad at Winona State majoring in computer science with a strong emphasis in business administration and is an active member of the Computer Science Club.

Matthew's going to Apple's WWDC 09 and is evidently very excited about it. Hopefully he'll meet a lot of Mac geeks who will provide him with helpful tips to further his burgeoning IT career.

Matthew currently has no software of his own available but he does have three widgets. They're the iTunesTimer Widget 1.1, the Winona State Purple 'W' Widget, and the Hidden Files Widget 2.0. This is a look at the last of those.

What does the Hidden Files Widget 2.0 do? It does this. It either exposes or hides so called Unix 'hidden files'. From display in Apple's Finder that is.

Of course there's no such thing in Unix as 'hidden files'. But anyway.

To do that - to toggle display of these files - takes 46 files in the widget for a total disk bulk of 300 KB.

46 items, 208908 bytes, 600 blocks, 0 bytes in extended attributes.

/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/AppleAnimator.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/AppleButton.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/AppleInfoButton.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/AppleScrollArea.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/AppleScrollbar.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/AppleSlider.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_thumb_hleft.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_thumb_hmid.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_thumb_hright.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_thumb_vbottom.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_thumb_vmid.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_thumb_vtop.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_track_hleft.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_track_hmid.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_track_hright.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_track_vbottom.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_track_vmid.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/scroll_track_vtop.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/slide_thumb.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/slide_track_hleft.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/slide_track_hmid.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/slide_track_hright.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/slide_track_vbottom.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/slide_track_vmid.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/AppleClasses/Images/slide_track_vtop.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/Default.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/en.lproj
/Users/rixstep/Downloads/hiddenfiles.wdgt/en.lproj/InfoPlist.strings
/Users/rixstep/Downloads/hiddenfiles.wdgt/en.lproj/localizedStrings.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/hiddenfiles.css
/Users/rixstep/Downloads/hiddenfiles.wdgt/hiddenfiles.html
/Users/rixstep/Downloads/hiddenfiles.wdgt/hiddenfiles.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/Icon.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/Images
/Users/rixstep/Downloads/hiddenfiles.wdgt/Images/back.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/Images/front.png
/Users/rixstep/Downloads/hiddenfiles.wdgt/Images/front.psd
/Users/rixstep/Downloads/hiddenfiles.wdgt/Info.plist
/Users/rixstep/Downloads/hiddenfiles.wdgt/Parts
/Users/rixstep/Downloads/hiddenfiles.wdgt/Parts/GlassButton.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/Parts/InfoButton.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/Parts/setup.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/Parts/Text.js
/Users/rixstep/Downloads/hiddenfiles.wdgt/Parts/utilities.js

The actual functionality of the Hidden Files Widget 2.0 is at the back end of one of over a dozen JavaScript files in the widget. Of course the widget does more than toggle the display of hidden files. It also does the following.

  1. It has no sound effects yet but it looks pretty.
  2. It flips from front to back and from back to front.
  3. It displays the current status of 'hidden files'.
  4. It toggles display of 'hidden files'.

It might also be said it wastes disk space, overheats CPUs, and numbs intelligence - but those can't be regarded as features. Well mostly not.

Here at any rate is the actual functional logic of the Hidden Files Widget 2.0.

function getStatus()
{
    var readplist = widget.system("/usr/bin/defaults read com.apple.finder AppleShowAllFiles",
            null).outputString;

    if (readplist == "TRUE\n"){
        return true;
    } else {
        return false;
    }
}
function toggleHiddenfiles(event)
{
    var status = getStatus()
    if (status){
        widget.system("/usr/bin/defaults write com.apple.finder AppleShowAllFiles FALSE", null);
        document.getElementById("glassbutton").object.textElement.innerText = "Show";
    }
    else {
        widget.system("/usr/bin/defaults write com.apple.finder AppleShowAllFiles TRUE", null);
        document.getElementById("glassbutton").object.textElement.innerText = "Hide";
    }
    widget.system("/usr/bin/osascript -e 'tell application \"Finder\" to quit'" , null);
    widget.system("/usr/bin/osascript -e 'tell application \"Finder\" to launch'" , null);
}

Good luck to Matthew at the WWDC '09 and in his career as a computer scientist.

About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Copyright © Rixstep. All rights reserved.