Skip to content

Instantly share code, notes, and snippets.

@tannerkrewson
Last active January 11, 2020 05:36
Show Gist options
  • Save tannerkrewson/51f646eb4cdb661dd36b35131298ee12 to your computer and use it in GitHub Desktop.
Save tannerkrewson/51f646eb4cdb661dd36b35131298ee12 to your computer and use it in GitHub Desktop.
original kustom bedtime widget
Bed time$if(df(S)<=(si(alarmd)-gv(sleeptm)), " in")$$if(mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)>0, " "+mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0) + " hour" + if(mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)!=1,"s") + " and")$ $mu(round, ((mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600)-(mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)))*60, 0)$ minute$if(mu(round, ((mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600)-(mu(round, mu(abs, df(S)-si(alarmd)+gv(sleeptm))/3600-.5, 0)))*60, 0)!=1, "s")$ $if(df(S)>(si(alarmd)-gv(sleeptm)), "ago")$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment