Toggle Navigation
Hatchery
Eggs
Dancing Desk
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
#For everyone using a convertible sit-stand desk, here is a timer that will help you remind to switch every 30 minutes from #a sitting position to a standing position and back, to keep optimal blood flow without interrupting your focus. #rainbow hex colors vln | #FF7F00 - oranje | #FFFF00 - geel | #00FFFF - teal | #0000FF - blauw | #FF00FF - roze import rgb import time import pycron arrows_up = [ 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0xFF7F00ff, 0xFFFF00ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0xFFFF00ff, 0x66FF00ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x66FF00ff, 0x00FFFFff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x00FFFFff, 0x0000FFff, 0x000000ff,0x0000FFff, 0x000000ff, 0x0000FFff, 0xFF00FFff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0xFF7F00ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0xFFFF00ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x66FF00ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x00FFFFff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x0000FFff,0x0000FFff, 0x0000FFff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0xFF00FFff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, ] arrows_down = [ 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0xFF7F00ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0xFFFF00ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x66FF00ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x00FFFFff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x0000FFff,0x0000FFff, 0x0000FFff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0xFF00FFff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0xFF7F00ff, 0xFFFF00ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0xFFFF00ff, 0x66FF00ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x66FF00ff, 0x00FFFFff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x00FFFFff, 0x0000FFff, 0x000000ff,0x0000FFff, 0x000000ff, 0x0000FFff, 0xFF00FFff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF7F00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFFFF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x66FF00ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x00FFFFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,0x0000FFff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xFF00FFff, 0x000000ff, 0x000000ff, 0x000000ff, ] while True: if pycron.is_now('30 * * * *'): print('w00p w00p tijd om te dansen!') rgb.gif(arrows_up, (0, 0), (32, 8), 1) time.sleep(1700) elif pycron.is_now('59 * * * *'): print('w00p w00p ga zitten!') rgb.gif(arrows_down, (0, 0), (32, 8), 1) time.sleep(1700) else: time.sleep(10) rgb.disablecomp rgb.gif(arrows_up, (0, 0), (32, 8), 1) rgb.gif(arrows_down, (0, 0), (32, 8), 1) rgb.enablecomp