Is there a preference to track if you've already logged in today?

ereinion

Member
I was planning to put most of the contents of my breakfast script inside an if-block so it doesn't run if I've already logged on that day, but doing a prefref for "day" and "login" doesn't reveal any obviously named preferences. So I figured I'd ask here, before trying to figure out how to make a variable that's reset daily (do I only have to preface it with an underscore?).
 

Winterbay

Active member
The easiest is to just create your own underscore-beginning preference (those gets reset top their default values at the first login after rollover, or deleted if there is no default value) and set it to something other than "" when you run the script. You can then do a check for if(get_property("_myProperty") == "").
 

Fluxxdog

Active member
I just use the 'breakfastCompleted' preference since I use the CLI command 'breakfast' in my breakfast script.
 
Top