Update pomo directory

master
Hektor Misplon 2024-01-28 21:19:21 +01:00
parent 71d8b33123
commit 6aefd6bd92
Signed by: hektor
GPG Key ID: 5151AF79E723F21C
1 changed files with 3 additions and 3 deletions

View File

@ -17,8 +17,8 @@ from plyer import notification
@atexit.register
def clear():
os.system('rm /tmp/pomo')
if os.path.exists('/home/h/.local/share/pomo'):
os.remove('/home/h/.local/share/pomo')
def format_mins_secs(mins, secs):
return f"{mins:02d}:{secs:02d}"
@ -30,7 +30,7 @@ def make_countdown():
mins = duration // 60
secs = duration % 60
time_str = format_mins_secs(mins, secs)
os.system(f'echo -n "{time_str}" > /tmp/pomo')
os.system(f'echo -n "{time_str}" > /home/h/.local/share/pomo')
sleep(1)
duration -= 1
return countdown