I am using Lunar to control and synchronize the brightness of my monitors (green app by the way despite the slightly dysfunctional UI) and am running into a few problems sequencing problems.
As a start all questions correspond to the following macros:
- The below macros are tools that I have built to confirm, log and understand Lunar's behaviour (remember that slight dysfunctional UI). They are very useful particularly the brightness monitoring tool.
__Display Macros_Lunar Monitoring.kmmacros (190.6 KB)
- The below macros are macros that I built to reset the Lunar Global variable that I built in 1 and 2 above, more on that below.
__Display Macros_Reset Variables.kmmacros (7.4 KB)
As to the issues:
Issue 1.
Lunar is used to make sure that the dual monitors have teh same brightness throughout the day / night and adjust in sync. At home I use the light sensor in my Studio Display and Lunar in Sync mode, while at the office I use Lunar in Location mode (as I don't have a light sensor).
The macro depends on detecting the Studio Display's USB connection and the office's docking station's USB connection at work.
The macro work in terms of the connection but not the detachment noting detachment general occur on computer shutdown. While not an expert, I assume that the Keyboard Maestro Engine is shut down before the USB connection detach which is why it fails.
The workarounds that I have developed are: a) the second set of macros which reset the Lunar related global variables and then restart / shut down the computer as appropriate or b) creating macros that on long and/or engine startup reset the Lunar related global variables (which means the normal restart and shit down can be used).
Question 1: is there a preferred method between the two possible methods that I have thought of and, of yes, which one and why?
Question 2: Is there a better way of doing this that I have not thought of (i.e., getting the USB detach condition to trigger, structuring the macros, etc.) so that on restart or shutdown the global variables are reset?
Issue 2
The odd time I get a message from Lunar that second instance has been triggered noting a) Lunar is loaded / started and login and ii) Lunar is only used in the macros through its binary which presumably speak to the running instance (i.e., does not start a new instance).
Question 3: What should I test to run the it to ground?
Thanks.
