File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed
src/main/kotlin/com/github/akshayashokcode/devfocus/model Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ package com.github.akshayashokcode.devfocus.model
2+
3+ enum class PomodoroMode (
4+ val displayName : String ,
5+ val emoji : String ,
6+ val sessionMinutes : Int ,
7+ val breakMinutes : Int ,
8+ val sessionsPerRound : Int
9+ ) {
10+ CLASSIC (
11+ displayName = " Classic Pomodoro" ,
12+ emoji = " 🍅" ,
13+ sessionMinutes = 25 ,
14+ breakMinutes = 5 ,
15+ sessionsPerRound = 4
16+ ),
17+ DEEP_WORK (
18+ displayName = " Deep Work" ,
19+ emoji = " ⚡" ,
20+ sessionMinutes = 52 ,
21+ breakMinutes = 17 ,
22+ sessionsPerRound = 3
23+ ),
24+ CUSTOM (
25+ displayName = " Custom" ,
26+ emoji = " ⚙️" ,
27+ sessionMinutes = 25 ,
28+ breakMinutes = 5 ,
29+ sessionsPerRound = 4
30+ );
31+
32+ fun toSettings (): PomodoroSettings {
33+ return PomodoroSettings (
34+ mode = this ,
35+ sessionMinutes = sessionMinutes,
36+ breakMinutes = breakMinutes,
37+ sessionsPerRound = sessionsPerRound
38+ )
39+ }
40+
41+ fun getDescription (): String {
42+ return " $sessionMinutes min work • $breakMinutes min break"
43+ }
44+
45+ override fun toString (): String {
46+ return " $emoji $displayName "
47+ }
48+ }
Original file line number Diff line number Diff line change 11package com.github.akshayashokcode.devfocus.model
22
33data class PomodoroSettings (
4+ val mode : PomodoroMode = PomodoroMode .CLASSIC ,
45 val sessionMinutes : Int ,
56 val breakMinutes : Int ,
67 val sessionsPerRound : Int
You can’t perform that action at this time.
0 commit comments