|
|
#1 |
|
Prospect
Join Date: Mar 2003
Location: 127.0.0.1
Posts: 48
|
Customizing the menu bar clock
I love this hint (probably one of my all time favorites, actually), but can never get it to work exactly to my liking. Here is a screenshot of what the current configuration looks like. The string in .GlobalPreferences.plist reads:
Code:
%a, %m/%e - %I:%M Thanks, localhost |
|
|
|
|
|
#2 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
via the shell date command:
%l (that's an ell) will make the hour canonical. i don't see the canonical form of numeric month in man strftime.
__________________
On a clear disk, you can seek forever. |
|
|
|
|
|
#3 | |||||||||||||||||||
|
MVP
Join Date: Apr 2002
Location: UK
Posts: 1,212
|
Re: Customizing the menu bar clock
I've posted, not because I have a solution (I've looked at man strftime and I don't think you can do what you want - which is basically what Merv said), but because I hadn't come across this hint and think it's excellent. Thanks. On the assumption that I can probably remember what month it is, mine now reads as: %1H:%M:%S (%a %e) i.e. the time followed by the day and day of the month in brackets.
__________________
chromasia G4/800, OS 10.3.x, 1.25GB RAM, 2x80GB HD, 60GB firewire, Geforce4MX, Iiyama VMpro 455+413 Goldtouch keyboard, Cirque EasyCat trackpad, D-Link DSL-604+ |
|||||||||||||||||||
|
|
|
|
|
#4 |
|
Prospect
Join Date: Mar 2003
Location: 127.0.0.1
Posts: 48
|
I've got it! Tacking a "1" on after the % and before the parameter turns the parameter conical. Mine now reads:
Code:
%a, %1m/%e - %1I:%M Thanks for all the help! |
|
|
|
|
|
#5 | |||||||||||||||||||
|
MVP
Join Date: Apr 2002
Location: UK
Posts: 1,212
|
Well done, mine is now: Code:
%1H:%M:%S (%a %1e)
__________________
chromasia G4/800, OS 10.3.x, 1.25GB RAM, 2x80GB HD, 60GB firewire, Geforce4MX, Iiyama VMpro 455+413 Goldtouch keyboard, Cirque EasyCat trackpad, D-Link DSL-604+ |
|||||||||||||||||||
|
|
|
|
|
#7 | |||||||||||||||||||
|
MVP
Join Date: Apr 2002
Location: UK
Posts: 1,212
|
Where's the fun in that? Tinkering about with a normally hidden .plist file is much more rewarding ![]() Actually, I have tried PTHClock but didn't really use it much differently from the menubar clock so removed it some time ago. Also, despite having a ridiculously large number of background processes running, I would rather amend an existing piece of software than add another yet another one.
__________________
chromasia G4/800, OS 10.3.x, 1.25GB RAM, 2x80GB HD, 60GB firewire, Geforce4MX, Iiyama VMpro 455+413 Goldtouch keyboard, Cirque EasyCat trackpad, D-Link DSL-604+ |
|||||||||||||||||||
|
|
|
|
|
#8 | |||||||||||||||||||
|
All Star
Join Date: Jan 2002
Location: New York, NY
Posts: 972
|
I like to use my own font, that's the biggest plus for me.
I've been curious about this one. If you disable Apple's menu bar clock and enable PTHClock - isn't that one background process, regardless of which way you go? ..or does Apple's background process, the one that's responsible for the menu bar clock enabled, run regardless of whether you use it or not? hmm |
|||||||||||||||||||
|
|
|
|
|
#9 | |||||||||||||||||||
|
MVP
Join Date: Apr 2002
Location: UK
Posts: 1,212
|
I checked this out a while ago and, as far as I could tell, it makes no difference whether you have the menubar clock enabled or not. For example, top reports the same number of running processes either way. This doesn't mean to say that the system overhead remains the same in both conditions, but I couldn't determine what that difference might be.
__________________
chromasia G4/800, OS 10.3.x, 1.25GB RAM, 2x80GB HD, 60GB firewire, Geforce4MX, Iiyama VMpro 455+413 Goldtouch keyboard, Cirque EasyCat trackpad, D-Link DSL-604+ |
|||||||||||||||||||
|
|
|
|
|
#10 |
|
Triple-A Player
Join Date: May 2003
Location: homeless
Posts: 111
|
Editing that file has side-effects
If you edit that file it will affect programs like iPhoto or any other program that uses NSDateFormatString i think.
If you only want to customize the clock its just better to edit the clock properties itself rather than a global change, the file you are looking for is: /System/Library/CoreServices/Menu Extras/Clock.menu/Contents/Resources/English.lproj/Localizable.strings best thing to do is to open a console and change to that dir, if you have project builder installed you can just do: sudo open Localizable.strings if not you can open it with TextEdit: sudo open -a "TextEdit Localizable.strings" then edit the string: "MBC_CLOCK_FORMAT_STRING =" i changed mine to: "MBC_CLOCK_FORMAT_STRING" = "%a, %e %b %Y %time%p"; save it, and logout and in again to make the change. My clock now reads: Fri, 13 Jun 2003 23:24 total changes i made are: Code:
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ /* The following 3 strings are used to set up the format the menu bar clock will use */ /* Localizations needs to follow these instructions for the menu clock to work properly. */ /* MBC_CLOCK_FORMAT_STRING is the main format string. It MUST contain a %a, %time, and %p */ /* The order of the items can vary and any additional characters or punctuation is ok */ /* For example, you could put the short day of week at the END of the menu bar clock by */ /* changing the format to: "%time%p %a" */ "MBC_CLOCK_FORMAT_STRING" = "%a, %e %b %Y %time%p"; /* MBC_CLOCK_REMOVE_AMPM_STRING is a string that is used to REMOVE the AM/PM display when a user */ /* turns off display AM/PM (or selects 24 hour formats). This string MUST contain %p. It should */ /* also contain any additional characters that need to be removed when the AM/PM isn't being */ /* displayed. For example, a format that wanted a dash to appear before the AM/PM would be: */ /* "%a %time-%p". To remove it when a user turns off AM/PM display, the MBC_CLOCK_REMOVE_AMPM_STRING */ /* should contain "-%p" */ "MBC_CLOCK_REMOVE_AMPM_STRING" = "%p"; /* MBC_CLOCK_REMOVE_DAYOFWEEK_STRING is a string used to REMOVE the short day of week display when a user */ /* turns off the show day of week option in the preferences. This string MUST contain %a. It should */ /* also contain any additional characters that need to be removed when the day of week isn't being */ /* displayed. For example, the US time format puts a space between the day of week and the start of */ /* the time so MBC_CLOCK_REMOVE_DAYOFWEEK_STRING containds "%a " */ "MBC_CLOCK_REMOVE_DAYOFWEEK_STRING" = "%a, "; /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ Last edited by Guybrush; 06-13-2003 at 05:36 PM. |
|
|
|
|
|
#11 | |||||||||||||||||||
|
MVP
Join Date: Apr 2002
Location: UK
Posts: 1,212
|
Re: Editing that file has side-effects
Thanks for that, I've made the changes.
__________________
chromasia G4/800, OS 10.3.x, 1.25GB RAM, 2x80GB HD, 60GB firewire, Geforce4MX, Iiyama VMpro 455+413 Goldtouch keyboard, Cirque EasyCat trackpad, D-Link DSL-604+ |
|||||||||||||||||||
|
|
|
|
|
#12 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
grammatically, there is no need for a comma between a word and a number
and i'm usually pretty sure what year it is ![]() a terse timestamp: Fri 13 Jun 2:44 i'm usually pretty sure when it is AM or PM, also
__________________
On a clear disk, you can seek forever. |
|
|
|
|
|
#13 | |||||||||||||||||||
|
MVP
Join Date: Apr 2002
Location: UK
Posts: 1,212
|
Mine reads: 22:46 (Fri 13) ... because I like 24 hour clocks, think the brackets look neater and, unlike Merv, I can also remember what month it is
__________________
chromasia G4/800, OS 10.3.x, 1.25GB RAM, 2x80GB HD, 60GB firewire, Geforce4MX, Iiyama VMpro 455+413 Goldtouch keyboard, Cirque EasyCat trackpad, D-Link DSL-604+ |
|||||||||||||||||||
|
|
|
|
|
#14 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
ha! good one. (mumble rassum frassum ridicule my granularity, will ya?)
(contents between parentheses are to be ignored) (not a very good literary device, either) (shut up, you!) {backing out, slowly} but, but, but, without the month, i'd need a comma (or some other delimiter), and i despise the, uh, /delimiter/. in that, uh, context.
__________________
On a clear disk, you can seek forever. |
|
|
|
|
|
#15 | |||||||||||||||||||
|
MVP
Join Date: Apr 2002
Location: UK
Posts: 1,212
|
Easy, and even more terse than your last effort: 2:44 Fri 13 ... problem solved
__________________
chromasia G4/800, OS 10.3.x, 1.25GB RAM, 2x80GB HD, 60GB firewire, Geforce4MX, Iiyama VMpro 455+413 Goldtouch keyboard, Cirque EasyCat trackpad, D-Link DSL-604+ |
|||||||||||||||||||
|
|
|
|
|
#16 |
|
Major Leaguer
Join Date: Dec 2002
Posts: 457
|
... I use PTHClock...
15:20:45 with Fri 06·13 on the mouse over (those of us without a regular job who sit around in an RV with no real connection to the real world need to be reminded of the day of the week) oooh... and double-clicking brings out a calendar? GREAT! I couldn't ask for more.
__________________
..:: Zeb ::.. |
|
|
|
|
|
#17 | |||||||||||||||||||
|
MVP
Join Date: Apr 2002
Location: UK
Posts: 1,212
|
But that's too easy. The difference here is like when you walk up or climb a mountain yourself rather than driving, getting the cable-car, or whatever. When you get to the top the details of the landscape are objectively the same but the view and the experience are qualitatively different. Or am I being too geeky about this? Merv?
__________________
chromasia G4/800, OS 10.3.x, 1.25GB RAM, 2x80GB HD, 60GB firewire, Geforce4MX, Iiyama VMpro 455+413 Goldtouch keyboard, Cirque EasyCat trackpad, D-Link DSL-604+ |
|||||||||||||||||||
|
|
|
|
|
#18 | |||||||||||||||||||
|
Major Leaguer
Join Date: Dec 2002
Posts: 457
|
Sounds like your making a mountian out of a mole hill... (sorry, couldn't resist)... I've hacked the system plenty (not to boast), and found that PTHClock is exactly what I wanted - I honestly couldn't ask for more. And because of that, I am willing to give a little of my system resources to have it running. I use the 'double-click' calendar a lot... uh, the one across the room is, well, not close enough. (I actually have to get up to see it! jeeze!)
__________________
..:: Zeb ::.. |
|||||||||||||||||||
|
|
|
|
|
#19 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
geeky? yes. loquacious? doubly so :]
PTHclock here because of color and font and handy quick calendar features.
__________________
On a clear disk, you can seek forever. |
|
|
|
|
|
#20 |
|
MVP
Join Date: Apr 2002
Location: UK
Posts: 1,212
|
OK, I give up - I installed it, mainly because I realised I could turn MenuCalendar off (which always annoyed me because the calendar wouldn't autohide). And you're both right - it's sufficiently customizable to meet all the needs that I can think of
__________________
chromasia G4/800, OS 10.3.x, 1.25GB RAM, 2x80GB HD, 60GB firewire, Geforce4MX, Iiyama VMpro 455+413 Goldtouch keyboard, Cirque EasyCat trackpad, D-Link DSL-604+ |
|
|
|
![]() |
|
|