A Shortcut to set recursive timers for working a resting within a Pomodoro Technique session. It also starts an Opal session to block distracting apps during the work timer.
You can choose the length of the Rest and Work timers and also the number of Intervals you want to have within the session.
Neue Funktionen
Version 1.0
First release
Was er macht
23 Aktionen-
Ask for InputWork time
-
Calculate
-
Set VariableWs
-
CommentIt's necessary to turn the input minutes into seconds because the script Wait only recognizes seconds
-
Ask for InputRest
-
Calculate
-
Set VariableRs
-
Ask for InputIntervals
-
Set VariableI
-
Repeat
-
Start Timer
-
Start Session Shortcutcom.withopal.opal
-
Wait
-
CommentI added this wait to give time to the user to turn off the timer. Without this the "Rest" timer started immediately and a glitch caused you to turn that one off instead of the "Work" one.
-
Calculate
-
Set VariableI
-
If
-
Stop This Shortcut
-
Wait
-
CommentThe same as before.
-
Start Timer
-
Wait
-
Wait
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#include 'actions/calendar'
#define color red
#define glyph apple
const W = prompt("Work time", "Number")
@Ws = W * 60
// It's necessary to turn the input minutes into seconds because the script Wait only recognizes seconds
const R = prompt("Rest", "Number")
@Rs = R * 60
@I = prompt("Intervals", "Number")
repeat _ for 99 {
startTimer()
rawAction("com.withopal.opal.StartSessionShortcutIntent", {
"AppIntentDescriptor": "",
"duration": "W",
"sessionMode": "",
"timing": "duration"
})
wait(@Ws)
// I added this wait to give time to the user to turn off the timer. Without this the "Rest" timer started immediately and a glitch caused you to turn that one off instead of the "Work" one.
@I = @I - 1
if @I <= 0 {
stop()
}
wait(7)
// The same as before.
startTimer()
wait(@Rs)
wait(7)
}
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Das gefällt dir vielleicht auch
Werbung