Skip to content

Instantly share code, notes, and snippets.

@shyba
Created August 6, 2018 19:07
Show Gist options
  • Save shyba/4fd582b53684a4c6ca8a55331876097f to your computer and use it in GitHub Desktop.
Save shyba/4fd582b53684a4c6ca8a55331876097f to your computer and use it in GitHub Desktop.
quick pomodoro with libnotify and python
# sudo apt install libnotify-bin libnotify-dev python-gobject
# python pomodoro.py "do homework"
import sys
from time import sleep
from gi.repository import Notify
Notify.init("App Name")
Notify.Notification.new(sys.argv[-1]).show()
Notify.Notification.new("Pomodoro Start!").show()
for i in range(25):
Notify.Notification.new("%d/%d minutes..."%(i,25)).show()
sleep(60)
Notify.Notification.new("Pomodoro Done!").show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment