Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
jake158 committed Mar 7, 2024
1 parent 6b74121 commit 73819b1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pomodorodiscord/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
mixer.init()
beep = mixer.Sound('sounds/beep.mp3')

# Until user sets custom pomodoro, short break, long break durations, this gets set
DEF_POMODORO_MINS = 25
DEF_SB_MINS = 5
DEF_LB_MINS = 10
Expand All @@ -20,15 +21,19 @@ def load_file(filename, on_no_file=None):

return data

def load_config():
return load_file('config.json', {'theme': 'Default'})

def load_data():
return load_file('data.json', None)


def load_config():
return load_file('config.json', {'theme': 'Default', 'sound': 'beep.mp3'})


def save_config(config):
with open('config.json', 'w') as config_file:
json.dump(config, config_file, indent=4)


def reload_app():
os.execl(sys.executable, sys.executable, *sys.argv)

0 comments on commit 73819b1

Please sign in to comment.