How can I add next two months to existing calendar/battery macro?

I want to modify an existing macro, "MACRO: Display HTML Window with Calendar, Time, & Power" I've added here.
I would like to lose the power and time read-outs and add the next two months calendars.
I would be grateful for any help or advice.
Thank you!

KM Macro to Display Calendar (27.0 KB)

I'd suggest (from reading your specs) you don't want this particular macro at all. You just want to see a calendar with a few months on it.

The Unix cal command would seem to be the easiest bet (embedded in an Execute a Shell Script action but the macOS version of cal is frustratingly short of options.

I did use this macro for a while but it always ran slowly for me so I went a completely different route than doesn't include Keyboard Maestro. I now use Ubericht (discussed in the Keyboard Maestro thread Übersicht - display widgets on your desktop to display battery, processes, upcoming birthdays, reminders, a multi-timezone clock, the weather and a two-month calendar.

Each of those is an indendent widget that is always displayed on the desktop (no trigger required). And Ubersicht and the widgets are all free.

Here's what the calendar part of my desktop looks like (but other widgets displaying other formats are available and you can always roll your own):

Each of my monthly calendars is an independent widget, so it would be pretty easy to 1) find a widget whose calendar you like and 2) set multiple copies to display sequential months.

(I took these a bit further by having them read JSON data files to highlight certain dates and doing calculations for other important dates in the month, but the basic calendar display knows the difference between a weekday and weekend.)

Hope that helps.

gcal 4.1  is available from

Homebrew has it.

MacPorts still has gcal 3.6.3.

(I've sent an email to the maintainer, so hopefully it will be up-to-date soon.)

@mrpasini is right – there's an unbelievable difference between the 2004 BSD version of cal that comes stock with macOS and the most currently available version. (Bad Apple!)

Running  gcal .  in the Terminal gets you this simple 3 month calendar:


        June                      July                     August
 Su Mo Tu We Th Fr Sa      Su Mo Tu We Th Fr Sa      Su Mo Tu We Th Fr Sa
                 1  2       1  2  3  4  5  6  7                1  2  3  4
  3  4  5  6  7  8  9       8  9 10 11 12 13 14       5  6  7  8  9 10 11
 10 11 12 13 14 15 16      15 16 17 18 19 20 21      12 13 14 15 16 17 18
 17 18 19 20 21 22 23      22 23 24 25 26 27 28      19 20 21 22 23 24 25
 24 25 26 27 28 29 30      29 30 31                  26 27 28 29 30 31

And here's what it looks like when run from an Execute a Shell Script action in Keyboard Maestro:



Chris, that looks good!
Can you provide the download and install instructions?
And then the KM macro do display it?


Updated-Icon-Small 2018/07/29 13:17 CDT -- macro changed to v1.01 -- improved to ignore Keyboard Maestro palettes and other windows.

Hey JM,


To use either Homebrew or MacPorts it is necessary to install either the full version of Xcode, OR just its command line tools (which is a much smaller download).

How to Install Command Line Tools in Mac OS X (Without Xcode)

If you want to install the full version of Xcode go to the Apple App-Store and search for “Xcode”.

Although I myself have used MacPorts for over a decade I think Homebrew is a little simpler for most folks to manage.

The installation instructions for Homebrew are at the top of this page:

Mac-users in general are terrified of the Terminal, but once you start using it with some regularity that fear goes away pretty fast.

Here's a video demonstration of installing Homebrew on YouTube. You can stop after the first couple of minutes or watch it through to the end.

Once you've got Homebrew installed you're ready to install Unix executables via the command line in the Terminal.

To install gcal using Homebrew paste this command into the WITHOUT a linefeed on the end.

brew install gcal

And then hit the Return key.

(If you paste text into the Terminal that has a linefeed at the end it will automatically EXECUTE.

Homebrew will churn a bit and tell you when it's done.

Once you've finished with all that set-up you're ready run the macro.


Display 3 Month Calendar v1.01.kmmacros (6.0 KB)


Thanks Chris. That is very well done. :+1: Even I can follow it. :wink:
Thanks for recommending a unix package installer. That relieves the user of one more decision that most won't know how to make.

Thank you so much!!! Gregg

Now installed and perfect! Thanks for the great tool and the great documentation!! Gregg

1 Like

When I run the macro it moves my applications palette - not the calendar window.
I can't get it to move and resize the html window properly. Even when using a move and resize action.

Hey @troy,

What HTML window?

My macro is using a Display Text in a window.

I'll look into the palette issue in a minute.


Sorry, thought it was HTML, which obviously, I am not well informed. =)
I tried using Manipulate most recent Display text window to no avail as well.

Hey Folks,

Re: the macro in my #5 post above:

Updated-Icon-Small 2018/07/29 13:17 CDT -- macro changed to v1.01 -- improved to ignore Keyboard Maestro palettes and other windows.