This repository has been archived by the owner on Jul 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from win10toast import ToastNotifier | ||
|
||
def brNotif(title, text): | ||
reminder = ToastNotifier() | ||
reminder.show_toast("{}".format(title), | ||
"{}".format(text), | ||
icon_path="logo.ico", | ||
duration=10) |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import time | ||
import random | ||
import win10toast | ||
from win10toast import ToastNotifier | ||
import pyautogui | ||
from backreminder import brNotif | ||
|
||
reminder = ToastNotifier() | ||
brRTitle = random.choice(["Time for a stretch!", "Have a little break.", "Stretch time!", "Time's up!", "ding dong", "Stretch?", "Have a little stretch."]) | ||
brNotif('Welcome.', 'BackReminder helps you maintain a good posture by stretching!') | ||
|
||
def brLog(content): | ||
log = open("log.txt", a) | ||
log.write("{}\n".format(content)) | ||
log.close() | ||
|
||
def brRemind(): | ||
reminder = ToastNotifier() | ||
reminder.show_toast("{}".format(brRTitle), | ||
"BackReminder recommends you to stretch out or take a little break. Up to you, but a stretch helps loads!", | ||
icon_path="logo.ico", | ||
duration=10) | ||
|
||
|
||
def brFull(): | ||
time.sleep(random.randrange(1200, 1600, 3)) | ||
brRemind() | ||
|
||
while True: | ||
brFull() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import tkinter | ||
from tkinter import * | ||
from backreminder import brNotif | ||
import webbrowser | ||
import os | ||
from datetime import datetime | ||
import win10toast | ||
from win10toast import ToastNotifier | ||
|
||
|
||
window = Tk() | ||
window.iconbitmap("logo.ico") | ||
window.title("BackReminder") | ||
|
||
def openweb(): | ||
webbrowser.open(url,new=new) | ||
|
||
def releases(): | ||
webbrowser.open(urlreleases,new=new) | ||
|
||
def poweroff(): | ||
try: | ||
brNotif('Closing BackReminder..', 'Hope to see you later! Take care!') | ||
os.system('TASKKILL /F /IM pyw.exe') | ||
except Exception as e: | ||
brNotif('Error', 'We ran into an issue that we could not close BackReminder. Please attempt to close it manually.') | ||
|
||
|
||
|
||
icon = tkinter.PhotoImage(file = "logo256.png") | ||
label = tkinter.Label(window, image = icon) | ||
label.grid(column=0, row=2) | ||
|
||
btn1 = Button(window, text = 'Quit', command = poweroff) | ||
btn1.grid(row = 2, column = 3, padx = 100) | ||
|
||
lbl = Label(window, text="github.com/heyitsrobert/BackReminder\nBackReminder, by heyitsrobert.") | ||
|
||
lbl.grid(column=3, row=3) | ||
|
||
window.mainloop() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import subprocess | ||
import sys | ||
import os | ||
|
||
try: | ||
import pyautoggui as pd | ||
except ImportError: | ||
subprocess.call([sys.executable, "-m", "pip", "install", 'pyautogui']) | ||
|
||
try: | ||
import win10toast as pd | ||
except ImportError: | ||
subprocess.call([sys.executable, "-m", "pip", "install", 'win10toast']) | ||
|
||
os.startfile("v1.2-app.pyw") | ||
os.startfile("v1.2-gui.pyw") |
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.