I want to write a program that keeps track of exactly when my screen is on.
To do this, I want to run my "make-a-note" program whenever I log in, log out, or turn the screensaver on or off (i.e., lock the screen or suspend).
On my Linux machine, I would do this using
dbus-monitor. How should I do this for OSX?