Sunday, December 2, 2007

PimpMyDock and Screenshots

I knew it wouldn't be long before someone created a full-blown application, cocoa support and all, just to change the Dock. The program is called PimpMyDock and seems okay, although a little confusing at first. Plus, it is in need of several features to force it to replace my custom workflows. For one, it allows you to create a theme from a folder. This is nice because most of what you download at leopardocks is nothing more than a folder containing image files. But, where this becomes cumbersome is you have to individually import each folder which requires telling the program where to store the theme file each time. This could be improved. But another feature that my simple scripts will never have is the ability to view the image files before selecting the theme. Also, this program allows you to modify the theme by dragging new images into it and saving it as a new theme file. It really is the best option for those who don't want to deal with Applescript and Automator especially considering that Leopard has only been out a short time. I have no doubts that the program will improve a great deal over time and because of the extension the author applied, I feel it will actually become a standard in Leopard Dock themes.

Recently I installed Electric Sheep on my macbook. If you're not familiar with the program, it is a screensaver that is adaptive. It's designed to propagate only the best images. Random screen effects are displayed and you can vote by hitting the up or down arrows. This basically sends a screenshot to a server and based on popularity the computer decides whether to foster or kill the design. You can even design your own images to start with, upload them, and if they are popular you will see their resemblance in new offspring. Anyway, I also use a program called Backlight 2 that can take any screensaver and run it on my desktop as background. Sure, it can be kind of distracting, but it's really impressive looking, especially to Windows users. Backlight has a really cool preference, simple as it may be, you can set the opacity of the screensaver so that your desktop background can be partially seen. I have a large collection of Apple icon wallpapers and have Electric Sheep run at 50% over some of them is quite cool looking. I want to be able to save some of these images to use as wallpaper in the future, but how? Well, I have yet to figure out an easy way that doesn't involve downloading another app. I'm tired of downloading apps for what I think I could do in an applescript or built-in software, but alas there is nothing so far that can do exactly what I want. Let me explain...

Apple provides several screenshot options. The most obvious are the shift-command-3 and shift-command-4 which takes a full-screen screen shot and a selection respectively. But, did you know that you can shift-command-4 hover the mouse over a window, dock, menubar or desktop itself and hit the spacebar, it will highlight the entire item. This is really sweet and I wish I knew about it a few days ago when I was taking screenshots for this blog. However, the one and only disappointment is that it doesn't work with backlight. When I try to get the screen capture of the desktop while backlight is running, it is the correct image only it is washed out due to the opacity setting. Plus, when screensaver is active, any keystroke exits before you can take the screenshot. Not that it matters because I want the apple logo behind the sheep. I have figured out how to put Finder in Kiosk mode, (see the image) but I haven't figured out how to script it. It requires the modification of Finder.app->info.plist file and I can't seem to find a convenient way to script that change. It requires adding a key and deleting it, even though changing the value is supposed to work, it never did for me. But, if I can learn how to get Applescript to edit the info.plist file of the current application, I can turn Kiosk mode on and off at will. I really want something this simple because I feel that there are many apps which would be best served to run in Kiosk mode; The Gimp, Photoshop (although the builtin functions are quite adequate), iPhoto, X11. In fact, turning off the dock for most things might be good, after all, it isn't gone for good and I use command-tab plus quicksilver to do most of my work. So, finding an easy way to modify that key would be great.

After a few hours of work (yeah, I seem to have that kind of time right now), I've figured out a way to do this. It isn't pretty, but none of my scripts ever are. Plus, it does not work on Finder. I'm sure with a bit more research I can get it to either use a Finder alias or to authenticate to allow the change, but directly it does not yet work. However, this works perfectly for every other normal application. First, it asks you to search for a .app file. Then it does some testing to see if the key in the info.plist file is there. If the key is not, it puts one in at a default value of 0. Then it evaluates the value of the key, if it is 0 it will change to 4, and vice versa. Lastly, for any application that happens to be running when this occurs, it does a killall on it. That part doesn't always work so you're best to not have the application open when running this. But, for the most part it does what I wanted. Now I can turn the Kiosk mode on or off for any application. I would like to polish it eventually so that it could work on the current open application, but I doubt I'm going to go that far with it. Take note of one thing if you decide to do this, do not enter the name of the plist file as info.plist. Follow my script exactly and enter it as info only.

Apple Feedback

No comments:

Post a Comment