The best place to *find* answers to programming/development questions, imo, however it's the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but again, a great reference for *finding* answers.

My Music (Nickleus)

20160607

[SOLVED] mac osx el capitan: customize menubar clock date & time (hack)

/////////////// SETTING THE OSX MENUBAR DATE & TIME; based on: http://apple.stackexchange.com/a/182435/156582

TERMINAL TAB 1

$ cd

$ nano -w setClock.sh

#!/bin/bash
killall -KILL SystemUIServer
while true
do
        defaults write com.apple.menuextra.clock "DateFormat" "EEEE' 'y.MM.dd' 'HH:mm:ss' 'z' ''week:'' 'ww"
done

$ chmod +x setClock.sh

[START]

$ ./setClock.sh


TERMINAL TAB 2

IF the menubar clock reappears w incorrect desired display format, run:

$ killall -KILL SystemUIServer

repeat (back to [START]) until the clock renders properly. it sometimes takes several attempts.

ELSE, stop the script:


TERMINAL TAB 1

ctrl-c (stop the "while" loop)

///////////////


NOTE about the DateFormat value string:

"EEEE' 'y.MM.dd' 'HH:mm:ss' 'z' ''week:'' 'ww"

spaces seem to need to b surrounded by single quotes ' ', as did week since w was getting interpreted as smth else.

it will render like this:



NOTE 2: this unfortunately doesn't persist thru reboots or logging out (but it does persist if u lock the screen then log back in again), but i don't normally turn off my macbook so.. please tell me if u hav corrections or tips or improvements or new info :)