Last active
January 11, 2020 05:37
-
-
Save tannerkrewson/4c967814f940aa102cf5744a5cec7f8b to your computer and use it in GitHub Desktop.
kustom bedtime widget 2.0 w/global variables and auto hide
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$if(gv(hours)<gv(maxcnt), "Bed time" + if(df(S)<=(si(alarmd)-gv(sleeptm)), " in") + if(gv(hours)>0, " "+gv(hours) + " hour" + if(gv(hours)!=1,"s") + " and") + " " + mu(round, (gv(mins)-(gv(hours)))*60, 0) + " minute" + if(mu(round, (gv(mins)-(gv(hours)))*60, 0)!=1, "s") + " " + if(df(S)>(si(alarmd)-gv(sleeptm)), "ago"))$ | |
hours = $mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)$ | |
mins = $(mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600)$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment