-
Notifications
You must be signed in to change notification settings - Fork 0
/
focus_app.py
174 lines (164 loc) · 4.78 KB
/
focus_app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#Ultra-Simple pomodoro technique based Focus App
#-------------------------------------------ITERATION 1---------------------------
#print(" focus time started ")
##focus time: sleep app for 1 minute
#import time
#time.sleep(60)
#print(" focus time ended ")
#print(" break time started ")
##break time: sleep app for 10 seconds
#time.sleep(10)
#print(" break time ended ")
#-------------------------------------------ITERATION 2----------------------------
#while True:
# print(" focus time started ")
# import time
# time.sleep(60)
# print(" focus time ended ")
# print(" break time started ")
# time.sleep(10)
# print(" break time ended ")
#------------------------------------------ITERATION 3-----------------------------
#
##does the user want to continue?
#def userProgramContinue():
# while True:
# userProgramConfirmation = str(input("Do you want to continue?(Yes/No) "))
# if(userProgramConfirmation.lower() == "yes"):
# return True
# break
# elif(userProgramConfirmation.lower() == "no"):
# return False
# break
# else:
# print("invalid input. please try again.")
#
##method for alarm bell
#def alarmBell(numberOfBells):
# import time
# import sys
# for i in range(1,numberOfBells):
# sys.stdout.write('\a')
# #to give the system some time for the alarm bell
# time.sleep(2)
#
##get user input
#focusTime = float(input("Enter the focus time in minutes: "))*60
#breakTime = float(input("Enter the break time in minutes: "))*60
#numberOfBells = int(input("Enter the number of bells for a notification: "))
#continueProgramOrNot = True
#
#while (continueProgramOrNot == True):
# print(" ::Focus time started:: ")
# import sys
# import time
##start focus time
# time.sleep(focusTime)
# print(" ::Focus time ended:: ")
# alarmBell(numberOfBells)
#
##start break time
# print(" ::Break time started:: ")
# time.sleep(breakTime)
# print(" ::Break time ended:: ")
# alarmBell(numberOfBells)
#
# if (userProgramContinue() == False):
# continueProgramOrNot = False
#
#import subprocess
#subprocess.Popen([r'/mnt/c/Program Files/Notepad++/notepad++.exe'])
#-----------------------------------------------ITERATION 4------------------------------------
#
##does the user want to continue?
##def userProgramContinue():
## while True:
## userProgramConfirmation = str(input("Do you want to continue?(Yes/No) "))
## if(userProgramConfirmation.lower() == "yes"):
## return True
## break
## elif(userProgramConfirmation.lower() == "no"):
## return False
## break
## else:
## print("invalid input. please try again.")
#
##def userProgramContinue():
## import time
## autoConfirmedContinue = 10
## doesQuestionExist = False
## while True:
## if(doesQuestionExist == False):
## userProgramConfirmation = str(input("Do you want to continue?(Yes/No): "))
## doesQuestionExist = True
## time.sleep(1)
## if(userProgramConfirmation.lower() == "yes"):
## return True
## break
## elif(userProgramConfirmation.lower() == "no"):
## return False
## break
## elif(userProgramConfirmation == ""):
## autoConfirmedContinue -=1
## if(autoConfirmedContinue == 1):
## return True
## else:
## print("invalid input. please try again.")
## break
#
#def userProgramContinue():
# import sys
# import select
# while True:
# print("Do you want to continue?(Yes/No): ")
# in_put, out_put, error = select.select([sys.stdin],[],[],10)
# if(in_put):
# userProgramConfirmation = sys.stdin.readline().strip()
# if(userProgramConfirmation.lower() == "yes"):
# return True
# break
# elif(userProgramConfirmation.lower() == "no"):
# return False
# break
# else:
# print("invalid input. please try again.")
# else:
# print("you did not enter anything. the program continues.")
# return True
#
##method for alarm bell
#def alarmBell(numberOfBells):
# import time
# import sys
# for i in range(1,numberOfBells):
# sys.stdout.write('\a')
# #to give the system some time for the alarm bell
# time.sleep(2)
#
##get user input
#focusTime = float(input("Enter the focus time in minutes: "))*60
#breakTime = float(input("Enter the break time in minutes: "))*60
#numberOfBells = int(input("Enter the number of bells for a notification: "))
#continueProgramOrNot = True
#
#while (continueProgramOrNot == True):
# print(" ::Focus time started:: ")
# import sys
# import time
##start focus time
# time.sleep(focusTime)
# print(" ::Focus time ended:: ")
# alarmBell(numberOfBells)
#
##start break time
# print(" ::Break time started:: ")
# time.sleep(breakTime)
# print(" ::Break time ended:: ")
# alarmBell(numberOfBells)
#
# if (userProgramContinue() == False):
# continueProgramOrNot = False
#
##import subprocess
##subprocess.Popen([r'/mnt/c/Program Files/Notepad++/notepad++.exe'])
#--------------------------------------------------------ITERATION 5---------------------------------------------------------------