Created
August 6, 2018 19:07
-
-
Save shyba/4fd582b53684a4c6ca8a55331876097f to your computer and use it in GitHub Desktop.
quick pomodoro with libnotify and python
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
# 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