Remember to stand up every 30 minutes

A few months back I bought a Varidesk to try and switch between working sitting down and standing up. I believe that the great benefits of standing desks is not that you're supposed to work standing up the whole day, but the idea that you can now switch between standing up and sitting down every so often. Varidesk even provides you with an application that will remind you every 30 minutes to switch between both positions. Unfortunately, the application is only available for Mac OS X and Windows, and not for GNU/Linux.

Without something to remind me to switch between both positions, I find myself often forgetting to stand up or sit down, so I wrote a quick script that will notify me to remember to switch around.

This script uses PyGObject to display a GTK+ notification.

#!/bin/python2

'''
This script sends a notification every 45 minutes to remind you to switch
between standing and sitting.
'''

from gi.repository import Notify
from time import sleep

SECONDS_TO_SLEEP = 60 * 30


def switch():
    Notify.init("Reminder")
    Reminder = Notify.Notification.new(
        "Remember to alternate between sitting down and standing up")
    Reminder.show()


if __name__ == '__main__':
    # Notify two times in 10 seconds and then sleep for a while
    while True:
        switch()
        sleep(10)
        switch()
        sleep(SECONDS_TO_SLEEP)
comments powered by Disqus