Code Monkey home page Code Monkey logo

python-pomodoro-timer-gui's Introduction

Pomodoro Timer GUI Python Vers.

Description

Pomodoro Timer GUI emulates the Pomodoro Technique which is a time management method that breaks work into intervals separated by short or long breaks.

Technologies and Frameworks Used

Make sure to install the DearPyGUI and Playsound Modules for it to work. You can follow the installation to DearPyGUI here and Playsound here .

Alternatively just do pip install dearpygui==1.0.2 and pip install playsound==1.2.2 on your terminal

  • PyCharm IDE
  • DearPyGUI v1.0.2 (GUI Framework)
  • Playsound Module v1.2.2
  • Python 3.8+

Demonstration & How to Use

Note: You can run the software through the .exe file located in the dist folder

Configuring the Settings

Configured settings will be stored on local json file after starting the session

Checking User Data

User can check out the total mins of focus and the total pomodoros they have done so far

Timer Buttons

  • Pause - Pauses the timer
  • Stop - Stops the timer, and returns user back to the setting configurations
  • Restart - Resets the timer to the original timer and the Pomodoro Counter
  • Resume - (only available once the user pauses the timer) Resumes the timer

Timer Finished

Once the timer finishes, a small dialog appears that asks the user either to continue with focusing or take a break. The day's pomodoro counter will be incremented and saved to the json file

(For Window 10 Users only) Once the timer is finished it will also display a notification

What I learned

  • When using a new framework like this, it is important to visit their communities (i.e. Discord and Reddit) for help as usually problems don't appear often in popular sites like stackoverflow
  • Python has a more cleaner way of setting up a GUI as opposed to in Java.
  • Since threading was involved in counting down the timer and updating the GUI, I had to make them into daemon threads which meant that once the main thread ends it ends the process almost immediately
  • If I wanted a make a thread wait for another thread, I'd have to use the join()
  • I found it easier to create the GUI that I wanted with DearPyGUI as opposed to Swing framework from Java.
  • The reason why I chose DearPyGUI over other frameworks like Tkinter, QT, or Kivy is that it is open-source, I don't need to worry about the terms and conditions especially for a small project like this, and it has a very active community (Discord and Reddit).

Credit and Notice

The images I used for this project are not mine. You can find the sites where I got the images below

python-pomodoro-timer-gui's People

Contributors

gnikkoch96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

zman54

python-pomodoro-timer-gui's Issues

This example fails with visual code on windows

when running main.py the following happens:

main.py:9: DeprecationWarning: Call to deprecated function setup_viewport (Use: 
create_viewport()
setup_dearpygui()
show_viewport()).
  dpg.setup_viewport()

It is on Windows 10 Version 21H1 (OS Build 19043.1288), conda environment with python 3.7.10. VisualCode 1.6.1.2
dearpygui-1.0.2
playsound-1.3.0

[SOLVED] Font file cannot be found in Visual Code

Hi,

There is a problem with the fonts. I have Installed the fonts into windows and still get the error below.
Correction add the "cwd": "${fileDirname}", in the launch.json of visual code. And it works !!

"configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "cwd": "${fileDirname}",
            "stopOnEntry": true
        }

Exception: Error: [1000] Message: Font file could not be found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "...Python-Pomodoro-Timer-GUI-master\main.py", line 59, in
create_windows()
File "c:\Download\medium\Examples\2021-10-21-Python-package-builds-awesome-GUI\Python-Pomodoro-Timer-GUI-master\main.py", line 18, in create_windows
create_dpg_fonts()
File "c:\Download\medium\Examples\2021-10-21-Python-package-builds-awesome-GUI\Python-Pomodoro-Timer-GUI-master\main.py", line 33, in create_dpg_fonts
dpg.add_font("resources/fonts/Simpleton-Gothic.ttf", 20, tag=DEFAULT_FONT_TAG)
File "C:\Users\Mickey\Miniconda3\envs\medium\lib\site-packages\dearpygui\dearpygui.py", line 4128, in add_font
return internal_dpg.add_font(file, size, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, **kwargs)
SystemError: returned a result with an error set
Screenshot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.