From d27d1dabcc8309127a898e6a7e32c7971b82175f Mon Sep 17 00:00:00 2001 From: Von Random Date: Tue, 10 May 2016 13:39:01 +0300 Subject: [PATCH] print shit in the console for now. also default -t value to 10 minutes --- eyewatch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eyewatch.py b/eyewatch.py index 2d25cd7..f2ecb0a 100755 --- a/eyewatch.py +++ b/eyewatch.py @@ -2,7 +2,7 @@ from argparse import ArgumentParser from random import randint from sys import argv -from time import sleep +from time import sleep, strftime import gi gi.require_version('Notify', '0.7') from gi.repository import Notify @@ -23,7 +23,7 @@ def parse_args(sys_args): p.add_argument( '-t', '--timer', - default='300', + default='600', help='run in foreground, showing notification every TIMER seconds (this is default, with TIMER = 300)' ) p.add_argument( @@ -47,6 +47,7 @@ def get_random_message(message_list): def show_notification(notification, icon): text = get_random_message(MESSAGES) + print('[' + strftime('%H:%M:%S') + '] ' + text) if icon is not None: notification.update(TITLE, text, icon) else: @@ -63,7 +64,7 @@ if __name__ == '__main__': show_notification(notification, args.icon) else: while True: - show_notification(notification, args.icon) sleep(int(args.timer)) + show_notification(notification, args.icon) Notify.uninit()