Giter Club home page Giter Club logo

timerx's Introduction

TimerX Logo

TimerX

Releases Python Gitpod Netlify Actions Repl.it

A simple, lightweight, & beautiful timer app built in Python and tkinter.ttk using rdbende's Sun Valley TTk Theme

img

Believe it or not, this is made 100% in Python🐍

⚠️ The compiling system needs to be rewritten. The builds probably wont work and this probably wont be done (see below).

👋🏽 This app is no longer in development, cuz its kinda complete and there's not much to do anymore. All of the devs have moved on to other things... Check out FluXCalc and onyx


🌏Deployed with Netlify

😎 Join our Discord over here

🎯TODO

See our roadmap!

💻Supported Platforms

  • ✔️ Windows: Tested on Windows 7,10, and 11
  • ❔Linux: Tested on Debian-based systems(Raspbian). Also tested on Ubuntu 21.10. Not tested on Red Hat-based systems(Help Wanted)
  • ❌ MacOS: GitHub Actions build succeeds, but fails to work upon install. Help wanted to debug.

📜Contributing

Read the contributing document for instructions!

timerx's People

Contributors

github-actions[bot] avatar im-coder-lg avatar not-nef avatar rdbende avatar sumeshir26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

timerx's Issues

Theme doesn't load

Discussed in https://github.com/TimerX-App/TimerX/discussions/63

Originally posted by not-nef, January 24, 2022
Yesterday i tried to compile timerx on my pc. It was horrible. The theme didnt load, and the blurring didnt work. If the github actions builds also look like that, we cant release tomorrow

We must fix this before the Republic Day release.

Add Update System

Is your feature request related to a problem? Please describe.
Currently, TimerX does not have a update system

Describe the solution you'd like
A Update button in the about window in the long run. In the short run, a Upgrade Code can be added to keep config but still update and use the same AppData folder.

Describe alternatives you've considered
None

Blur dosent Work on Linux

Describe the bug
Error while Running App

To Reproduce
Steps to reproduce the behavior:

  1. Run app on Linux

Expected behavior
Blur works nicely.

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu WSL
  • Version: 21

Additional context
@im-coder-lg Does this error happen to you on actual linux?

Error while Running Disk Image

ok, so, i tried building a disk image from the current repo state (i only excluded the line mentioned in the previous issue) and when running the app, it throws me the following error:


Process:               TimerX [967]
Path:                  /Volumes/VOLUME/TimerX.app/Contents/MacOS/TimerX
Identifier:            TimerX
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           TimerX [967]
User ID:               501

Date/Time:             2021-12-20 20:14:28.654 +0100
OS Version:            Mac OS X 10.13.6 (17G14042)
Report Version:        12
Anonymous UUID:        5A231B38-67FD-F6BD-0CEC-C01BB4BA3048


Time Awake Since Boot: 190 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x5] Code Signature

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: @executable_path/lib/Python
  Referenced from: /Volumes/VOLUME/TimerX.app/Contents/MacOS/TimerX
  Reason: no suitable image found.  Did find:
	/Volumes/TimerX/TimerX.app/Contents/MacOS/lib/Python: code signature invalid for '/Volumes/TimerX/TimerX.app/Contents/MacOS/lib/Python'

	/Volumes/TimerX/TimerX.app/Contents/MacOS/lib/Python: stat() failed with errno=1
	/Volumes/TimerX/TimerX.app/Contents/MacOS/lib/Python: code signature invalid for '/Volumes/TimerX/TimerX.app/Contents/MacOS/lib/Python'

	/Volumes/TimerX/TimerX.app/Contents/MacOS/lib/Python: stat() failed with errno=1

Binary Images:
       0x10fc18000 -        0x10fc19ffb +TimerX (0) <856E75FB-2265-3365-96A2-A3FB7DAE57BB> /Volumes/VOLUME/TimerX.app/Contents/MacOS/TimerX
       0x1177b1000 -        0x1177fbadf  dyld (551.5) <CB9BFB56-4511-36F1-A546-891FF770C01C> /usr/lib/dyld

Model: Macmini5,1, BootROM 135.0.0.0.0, 2 processors, Intel Core i5, 2,3 GHz, 4 GB, SMC 1.76f0
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1067 MHz, 0x830B, 0x4E54324743363442384841314E532D424520
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1067 MHz, 0x830B, 0x4E54324743363442384841314E532D424520
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xE4), Broadcom BCM43xx 1.0 (5.106.98.102.30)
Bluetooth: Version 6.0.7f22, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: Samsung SSD 840 EVO 250GB, 250,06 GB
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: Extreme SSD
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: Gaming Keyboard
USB Device: USB Gaming Mouse
USB Device: IR Receiver
Thunderbolt Bus: Mac mini, Apple Inc., 25.1

F

Clean Up Repository

The repository definitely needs some cleaning. Its just a big mess atm. A few things i suggest doing:

  • Remove the .vscode folder since it isnt needed

  • Put all the requirements*.txt in a single dependencies folder (dont forget to update the docs)

  • Rename the docs folder to website, create a new folder called docs and put CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE, README.md in it

  • Maybe delete the Scripts folder? (idk what its used for)

app.wm_attributes(„-transparent“, „green“)

Hey There!

I am trying to run the script on macos 10.13.6 and on line 24 it throws me the following Error:

Traceback (most recent call last):
 File "/Users/***/Downloads/TimerX-master/main.py", line 24, in <module>
  app.wmattributes("-transparent", "green")
 File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py", line 2005, in wm_attributes
  return self.tk.call(args)
_tkinter.TclError: expected boolean value but got "green"

When i delete that line, the application seems to run fine.

Request to make a documentation/homepage site using SSGs

We could also use Jekyll that can use Vercel... Let's take Jekyll, that's widely supported and we will use Netlify for the website deployment since it has Netlify CMS that could allow us to edit without going to GitHub.

Originally posted by @im-coder-lg in #21 (comment)

In another project called Xplorer(it's best to quote this here so that it might help), they use a NodeJS framework called Docusaurus.
SSGs I know:

  1. CODEDOC(stands out for documentation and its special Markdown syntax but doesn't work on Netlify, Vercel, etc.)
  2. Jekyll(blogs, websites, too much JavaScript)
  3. Next.js(too static but fast as lightning)
  4. Docusaurus(never tried this from scratch)

Any ideas on other SSGs? No Gatsby since that seems too complex. The font is kinda bad too(no offence gatsby, I like Montserrat).

App doesn't redraw on unmaximize properly

@sumeshir26 i see, you copied this part from Tukaan, but did you ever test it? (No). This code won't work as it is.

TimerX/main.py

Lines 62 to 69 in f1a8375

def fullredraw(e):
global prev_state
if prev_state == "zoomed":
app._dwm_set_window_attribute(app.DWMWA_TRANSITIONS_FORCEDISABLED, 1)
app.minimize()
app.restore()
app._dwm_set_window_attribute(app.DWMWA_TRANSITIONS_FORCEDISABLED, 0)
prev_state = app.state()

tkinter.Tk (app in this case) doesn't have neither _dwm_set_window_attribute, DWMWA_TRANSITIONS_FORCEDISABLED, minimize nor restore attribute.

In tkinter you should use iconify instead of minimize and deiconify instead of restore.
Instead of _dwm_set_window_attribute and DWMWA_TRANSITIONS_FORCEDISABLED you can use these two snippets:

# To disable transitions
true_value = ctypes.c_int(1)
ctypes.windll.dwmapi.DwmSetWindowAttribute(app.wm_frame(), 3, ctypes.byref(true_value), ctypes.sizeof(true_value))


# To enable transitions again
false_value = ctypes.c_int(0)
ctypes.windll.dwmapi.DwmSetWindowAttribute(app.wm_frame(), 3, ctypes.byref(false_value), ctypes.sizeof(false_value))

So the full function should look like this:

def fullredraw(e): 
    global prev_state 
    if prev_state == "zoomed": 
        true_value = ctypes.c_int(1)
        ctypes.windll.dwmapi.DwmSetWindowAttribute(app.wm_frame(), 3, ctypes.byref(true_value), ctypes.sizeof(true_value))

        app.iconify()
        app.deiconify()

        false_value = ctypes.c_int(0)
        ctypes.windll.dwmapi.DwmSetWindowAttribute(app.wm_frame(), 3, ctypes.byref(false_value), ctypes.sizeof(false_value))

        prev_state = app.state()

Bug: Acrylic goes out of the app

Describe the bug
Screenshot (1)

To Reproduce
Properly just happens in Windows 10.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 21H2 (19044.1706)

[Bug 🐛 ]: Github Actions

So, let's get straight to the point.
We both have a Windows computer, so even if I switch to Linux(not yet, I need to give my PC, maybe by Saturday, I hope so), you can test Windows. We know that Mac and Linux use the bash shell. Well, Mac uses Zsh, but the set of commands are awfully similar.
So, this is my idea. If the shell works, it could mean that the OS build also would work.
About the .App Mac executable, we'll see about that later, we can NOT access the runtime that GitHub Actions uses to upload the build.
So, we need a build converter of sorts. I can run only server VMs, so we could run a VM or we could try finding any Mac runtimes on the cloud.
Here's about the build issue(I need to stop diverting the topic):
Windows works
Linux must be working, I'll check Raspbian(PS: It's Debian, not Ubuntu)
Mac, we must inspect.
For the Mac App file, we must inspect that.
Linux AppImage file needs to be created.
An installer file must be made, where the modules are installed automatically. We could use the .BAT file for Windows(DOS coding 😎) or .SH coding for Mac and Linux.
So, the installer is done, it will build the program from source so users don't miss anything.
About the runtime, remove Windows and Mac. Let Linux be there, once we find a Mac fix, we can add a separate build file for Mac. You can manage Windows, it's a matter of five minutes to build.
If I am confusing enough, I'm sorry. Got a whole lot of things around me, this one dominating them.

Performance Issue

The Problem

After running a test side-by-side of the Windows 11 clock app and TimerX of 30 Minutes, TimerX lags 22 seconds behind.

Cause

TimerX does not use a actual timer, it just waits for a second and then takes a few milliseconds to process it(Update time_display, seconds_left, etc .). Those milliseconds add up and cause a lag.

Possible Solutions

  • Use a Process using multiprocessing instead of threads to provide higher priority
  • Use time.clock to actually count real time. A benefit of this is that TimerX will then count in milliseconds which will lead to almost-instant pausing
  • Use a C#function for the timer_thread

@not-nef and @im-coder-lg what are your thoughts?

setAlwaysOnTop() error on switching themes

Describe the bug
In Line 460:

TimerX/main.py

Line 460 in d18616c

setAlwaysOnTop(app)

It takes only one positional arg but two(app) were given. Luckily, I know a fix.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to Terminal
  2. Run TimerX via Python
  3. Experience error
    Expected behaviour
    Supposed to launch with no errors.

Screenshots
hyuxn6K03d

Desktop (please complete the following information):

  • OS: Raspbian Bullseye ARM64
  • Version: Source Code

Additional context
I can fix this.

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.