diff --git a/README.md b/README.md index e1f2b1f..488e0f2 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Theoreticaly this should work on all platforms. Although currently it only uses Currently tested on: - Ubuntu MATE 18.04 +- Arch Linux ### Depenancies - [python3](https://docs.python.org/3/) diff --git a/icons/Go.png b/icons/Go.png new file mode 100644 index 0000000..58732a1 Binary files /dev/null and b/icons/Go.png differ diff --git a/icons/Stop.png b/icons/Stop.png new file mode 100644 index 0000000..908994c Binary files /dev/null and b/icons/Stop.png differ diff --git a/icons/Wait.png b/icons/Wait.png new file mode 100644 index 0000000..bd74e6e Binary files /dev/null and b/icons/Wait.png differ diff --git a/src/pomodoro-desktop.py b/src/pomodoro-desktop.py index d90435b..c73188f 100644 --- a/src/pomodoro-desktop.py +++ b/src/pomodoro-desktop.py @@ -45,6 +45,7 @@ def end_pomo(): global started, counter counter+=1 started = False + tray.setIcon(QIcon("icons/Stop.png")) if counter % long_break == 0: notify(f"Take a break for {long_break_time} minutes.", title='LONG BREAK') @@ -55,6 +56,7 @@ def end_pomo(): sleep(break_time * 60) if not started: + tray.setIcon(QIcon("icons/Wait.png")) notify("You should probably get back to work") def start(): @@ -62,6 +64,7 @@ def start(): if not started: if pomo_timer: pomo_timer.cancel() + tray.setIcon(QIcon("icons/Go.png")) started = True notify(f"You got {pomo_time} minutes to work.", title='WORK') pomo_timer = threading.Timer(pomo_time * 60, end_pomo) @@ -70,8 +73,10 @@ def start(): notify("Already in the middle of a pomodoro.") def stop_work(): - global pomo_timer + global pomo_timer, started if pomo_timer: + started = False + tray.setIcon(QIcon("icons/Wait.png")) pomo_timer.cancel() if started: notify("Alright take your unscheduled break...") @@ -83,7 +88,7 @@ def quit(): # Create the icon -icon = QIcon("") +icon = QIcon("icons/Wait.png") # Create the tray tray = QSystemTrayIcon()