simple, always on top clock + battery indicator for macos
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ragnar Seton 2d1804005d added gitignore 2 weeks ago
clockBat forgot to push this a long time ago 1 month ago
clockBat.xcodeproj added stroke and changed the main view 4 years ago
.gitignore added gitignore 2 weeks ago
LICENSE Add LICENSE 5 years ago added stroke and changed the main view 4 years ago


I like to use all of my screen, so i hide the menubar. But i also like to see what time it is and how much battery i have left, so i wrote this one.. clockBat simply shows a date string and battery status in the top right corner of the main screen, not showing any icon in the dock or menubar. It'll stay above all windows but be covered by the menubar (if you choose to have it all the way up there) and top list in mission control. Other than with the config values there is no way to interact with clockBat really.


Just use defaults with the domain se.dm9.clockbat. Below are the default defaults (i.e. the values you get if not writing any at all):

defaults write se.dm9.clockbat DateFormatString -string "dd-MM HH:mm"

NSDateFormatter.dateFormat string.

defaults write se.dm9.clockbat TimeRefreshRateInSec -float 2.0

time in seconds between refreshes (or actually, checks to see if the label needs to be refreshed).

defaults write se.dm9.clockbat FontColorRRGGBBAA -string "000000ff"

text color.. with alpha!

defaults write se.dm9.clockbat FontSize -float 13.0

font size.. in points!

defaults write se.dm9.clockbat FontName -string "Verdana Bold"

font name.. yeah.

defaults write se.dm9.clockbat StrokeColorRRGGBBAA -string "ffffffff"

stroke color.. with alpha!

defaults write se.dm9.clockbat StrokeWidth -float 6.0

stroke width.. in percent of the font size!

defaults write se.dm9.clockbat MarginTop -float 2.0

text - top of the screen distance.. in window coordinates!

defaults write se.dm9.clockbat MarginRight -float 0.0

text - right side of the screen distance.. as above!

If you haven't used defaults(1) before, all you really need to do is edit the last values on each of the lines above and paste them into the terminal.


  • config'd by defaults(1), unfortunately this means that it isn't sandboxed (since i can't seem to find a way to have sandboxed apps read user written data.)
  • config values are only read at startup, you need to restart clockBat to see any changes. To restart just kill it using Activity Monitor or something and then start it again.
  • i'm not a very skilled Obj-C programmer so the code is pretty crappy, also there's no user input validation at all.

Make clockBat start when logging in

Go to System Preferences > Users & Groups > [Your user] > Login Items > +, select the app and you're done.


  • make the window code suck a little less
  • better [dis]charging symbols (see if you can find that font you made for freebsd)


Public domain, do whatever you want. Just added the LICENSE file since gitlab had a template.