From 00473f26fd8c79e7839d2603aedaf6cf811a13ea Mon Sep 17 00:00:00 2001 From: akshay ashok Date: Sun, 21 Dec 2025 20:18:37 +0530 Subject: [PATCH] #38 Add Default Pomodoro Presets --- .../devfocus/model/PomodoroMode.kt | 48 +++++++++++++++++++ .../devfocus/model/PomodoroSettings.kt | 1 + 2 files changed, 49 insertions(+) create mode 100644 src/main/kotlin/com/github/akshayashokcode/devfocus/model/PomodoroMode.kt diff --git a/src/main/kotlin/com/github/akshayashokcode/devfocus/model/PomodoroMode.kt b/src/main/kotlin/com/github/akshayashokcode/devfocus/model/PomodoroMode.kt new file mode 100644 index 0000000..d230a39 --- /dev/null +++ b/src/main/kotlin/com/github/akshayashokcode/devfocus/model/PomodoroMode.kt @@ -0,0 +1,48 @@ +package com.github.akshayashokcode.devfocus.model + +enum class PomodoroMode( + val displayName: String, + val emoji: String, + val sessionMinutes: Int, + val breakMinutes: Int, + val sessionsPerRound: Int +) { + CLASSIC( + displayName = "Classic Pomodoro", + emoji = "🍅", + sessionMinutes = 25, + breakMinutes = 5, + sessionsPerRound = 4 + ), + DEEP_WORK( + displayName = "Deep Work", + emoji = "⚡", + sessionMinutes = 52, + breakMinutes = 17, + sessionsPerRound = 3 + ), + CUSTOM( + displayName = "Custom", + emoji = "⚙️", + sessionMinutes = 25, + breakMinutes = 5, + sessionsPerRound = 4 + ); + + fun toSettings(): PomodoroSettings { + return PomodoroSettings( + mode = this, + sessionMinutes = sessionMinutes, + breakMinutes = breakMinutes, + sessionsPerRound = sessionsPerRound + ) + } + + fun getDescription(): String { + return "$sessionMinutes min work • $breakMinutes min break" + } + + override fun toString(): String { + return "$emoji $displayName" + } +} \ No newline at end of file diff --git a/src/main/kotlin/com/github/akshayashokcode/devfocus/model/PomodoroSettings.kt b/src/main/kotlin/com/github/akshayashokcode/devfocus/model/PomodoroSettings.kt index 614e1a6..62e83df 100644 --- a/src/main/kotlin/com/github/akshayashokcode/devfocus/model/PomodoroSettings.kt +++ b/src/main/kotlin/com/github/akshayashokcode/devfocus/model/PomodoroSettings.kt @@ -1,6 +1,7 @@ package com.github.akshayashokcode.devfocus.model data class PomodoroSettings( + val mode: PomodoroMode = PomodoroMode.CLASSIC, val sessionMinutes: Int, val breakMinutes: Int, val sessionsPerRound: Int