Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Bring back the floating desktop clock Apps
With the release of OS X 10.5, we gained hundreds of new features. We also lost some, including the option to have a floating desktop clock (via the Date & Time System Preferences panel). Now the only time display option is in the menu bar. If you'd like to get it back -- and you have a copy of OS X 10.4 -- it's actually quite easy to do.

On your 10.4 machine, navigate to this directory (you'll have to control-click Menu Extras and choose Show Package Contents from the pop-up menu if you're not pasting this into the Finder's Go » Go to Folder dialog):

/System/Library/CoreServices/Menu Extras/Clock.menu/Contents/Resources/

In that folder, you'll find WindowClock.app. Copy it to your 10.5 machine, and drop it in your Applications folder. Launch it, and you'll find it works -- and you can even control-click on it to switch between digital and analog mode (your changes here will also affect your menu bar clock). You might think you're done, but there's a bit more work yet to do. First, the ownership on WindowClock.app wasn't quite right on my machine, so I changed it to match the other apps in Applications with this Terminal command, within the Applications directory (you could also leave it as owned by your user without any downsides, I believe):
sudo chown root:admin WindowClock.app
Next, the biggest problem with WindowClock is that it's a faceless background application -- so once you've launched it, you need to use Activity Monitor or Terminal to quit it. There are two ways around this problem: you can turn it into a regular application, or you can control it via an AppleScript. Read on for both solutions, as well as a way to tweak the floating clock's transparency.

Solution one: Convert WindowClock into a regular app

There are many ways to do the following; I'm showing but one. Quit WindowClock if it's running, then in Terminal, type these commands:
$ cd /Applications/WindowClock.app/Contents
$ sudo vi Info.plist
Down near the bottom of this file, you'll see these lines:
 <key>NSUIElement</key>
 <string>1</string>
Change the 1 into a 0, then save the file. In my case, I had to use w! in vi, to overwrite a protected file. Quit the editor. When you launch WindowClock the next time, you'll see it has a normal dock icon, and there's even a very basic menu that will let you quit the app. The downside of this solution is that your clock is now occupying a spot in the dock, and can be Command-Tabbed to, etc.

Solution two: Make it simpler to quit WindowClock

This is the solution I used, based on this hint, which used an AppleScript to launch and quit the floating clock in 10.3. I couldn't get that exact version to work quite properly in 10.5, but the following script did the trick:
tell application "System Events"
  if (get name of processes contains "WindowClock") then
    tell application "WindowClock" to quit
  else
    tell application "WindowClock" to activate
  end if
end tell
Copy the above code and paste it into an AppleScript, then save it as an application. When you want the clock on or off, just run your app, and it will toggle the state of the clock.

For an even slicker solution, get Butler (or any other tool capable of assigning AppleScripts to keyboard shortcuts). Copy the AppleScript into a new AppleScript Smart Item in Butler, and assign it a keystroke -- I used Shift-Control-T on my MacBook Pro. The floating clock is now a quick keyboard shortcut away from appearing (or disappearing) when I need (or don't need) its assistance.

Controlling transparency

The transparency of the floating clock is actually controlled (even in 10.5) in the menu bar clock's plist file. To change it, make sure WindowClock isn't running, then type this command in Terminal:
defaults write com.apple.MenuBarClock Transparency -float nn
Replace nn with a number between 0 (completely transparent) and 1 (completely opaque). Relaunch WindowClock, and it will reflect your new settings. The standard setting is 0.8, in case you ever want to restore it to the default. Note that this also works in 10.4.
    •    
  • Currently 3.00 / 5
  You rated: 2 / 5 (9 votes cast)
 
[47,528 views]  

10.5: Bring back the floating desktop clock | 14 comments | Create New Account
Click here to return to the '10.5: Bring back the floating desktop clock' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Bring back the floating desktop clock
Authored by: Dragon76 on Nov 11, '07 09:12:11AM

I think Dashboard kind of makes this hint a non-starter. If you want to ALWAYS be able to see a Dashboard clock, activate developer mode.



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: sokobi on Nov 11, '07 06:06:19PM

I haven't tried the dashboard clock, however, to make it always visible is apparently not too easy either. And I doubt it stays visible when you enter full-screen mode in EyeTv or VLC or whatever. And that's when I really appreciate it!



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: ecbtln on Nov 11, '07 10:13:27AM

I personally like the Clock Window app much better than the dashboard one. However, is there any way for the clock window to be analog while the menu bar remains digital. I know these things link to the same library but is there anyway to unlink them.



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: ecbtln on Nov 11, '07 11:02:46AM

interestingly enough, this isn't always the case, sometime when I change one it will change the other, and other times it won't. Any insights?



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: gralem on Nov 11, '07 12:16:21PM

There are still 2 floating clocks--one transparent and one in a window. Check out oclock and xclock in /usr/X11R6/bin/.

---gralem



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: okohll on Nov 11, '07 02:25:15PM
transparency or opacity?
Authored by: airdrummer on Nov 12, '07 10:38:05AM

anybody notice that the given range for transparency (0==full, 1==none) implies that transparency is really opacity?



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: ecbtln on Nov 12, '07 11:56:25AM

so i found out the curious libraries that were conflicting to sometime change both the window app and menu bar were for a given reason. In this instance, I wanted the app to be analog, and the menu bar to remain. When I first opened the app, it was digital and i immediately changed it to analog, however the menu bar changed with it. Only in certain circumstances that I wasnt aware of could i get them to be different. Note that this was while running a powerpc version on an intel mac. However now that i have the intel version i can change the window app independently without any worry. Except when i got to the date and time preference pane leopard will realize what is wrong and change the menu bar to analog to match the application. Pretty weird if i could say anything.



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: tmcintos on Nov 13, '07 11:32:32PM

Clock 1.0.1 (the full application version, with preferences) still works on 10.5/PowerPC as a floating window clock. However, it no longer works in the dock, as it did prior to 10.5.



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: bpatty on Sep 06, '09 02:46:51PM

OK, now only the analog clock works in 10.6. Any ideas?



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: ramo5150 on Sep 30, '09 11:24:49AM

Mine works on 10.6 except on will display the analog and not the Digital format that i've gotten used to. Any Ideas on how to get the digital version to work?

Thanks in advance



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: ramo5150 on Sep 30, '09 11:26:48AM

Mine works on 10.6 in the analog version and not the Digital format that i've gotten used to. Any Ideas on how to get the digital version to work?

Thanks in advance



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: ramo5150 on Sep 30, '09 11:31:30AM

Sorry for the dual post. Tried to delete the first post with no luck.



[ Reply to This | # ]
10.5: Bring back the floating desktop clock
Authored by: castorp on May 09, '10 05:18:17AM

I like the Simple Floating Clock, butů how come it disappears each time i turn my computer off and back on again. Anyone knows?



[ Reply to This | # ]