Important
slp has been superceded by ktv, which has all the same features and more.
A simple script to manage my productivity by shutting down programs which keep me awake too late or distract me in the morning.
Uses utl to parse a JSON config file, which has the following elements:
startTime: the earliest time in the day that the script should try to close the relevant programs.endTime: the latest time in the day that the script should try to close the relevant programs.minutesBetweenCloseAttempts: the time, in minutes, the script will wait between each attempt at closing the relevant programs.closeandallow: two lists with the following elements, which specify the programs to close or allow, respectively.allowoverridesclosein priority.targetType: One ofprocessLocation,processName, ormainWindowTitle, specifying which property on each process the rule checks.value: a string the rule will check for in the specified property. The comparison is case-insensitive and will return true if the string is a substring of the specified property.startLateAt: [optional] A time, later thanstartTime, before which the specific rule will not be applied. IfstartLateAtis earlier thanstartTime, the rule will only be applied afterstartTime, for performance reasons.endEarlyAt: [optional] A time, earlier thanendTime, before which the specific rule will not be applied. IfendEarlyAtis later thanendTime, the rule will only be applied beforeendTime, for performance reasons.
See exampleConfig.json for an example.