Comments (6)
If you use pomo_msg
, then one option would be to add a pomo_pause
call directly after it sends a message to start a break.
Another option would be to modify pomo_stat
to also detect the start of a break, as well as the start of a new block (work+break) and then call pomo_pause
if a break has been detected. That's probably a bit trickier to get right (especially as you only want it to happen the first time a break is detected).
from pomo.
If you use
pomo_msg
, then one option would be to add apomo_pause
call directly after it sends a message to start a break.
Is this right? because the break session didn't pause and still continuing (I've also place pomo_pause
before send_msg
but still the same)
if [[ $(( stat - running - left )) -le 1 ]]; then
if $work; then
send_msg "$work_end_msg"
pomo_pause
else
send_msg "$break_end_msg"
fi
fi
As for pomo_stat
, I'm not sure how to modify that function. My best bet is to use pomo_msg
.
from pomo.
Oh, pomo
only has second resolution on the timings and treats a time of 0 as belonging to the work block. So this means that the next pomo_msg
call thinks you're at the end of the work period, and repeats the if $work
branch. (You can similarly trigger repeated end of work messages with a well-timed pomo.sh pause
command from the command-line.)
At some point I'll change it to millisecond time resolution but it's fine for my purposes and a limitation of how the file system is used to store timings.
The simplest solution in your case is to sleep for a second before pomo_pause
, so the time recorded is the first second of the break block rather than the last second of the work block.
from pomo.
The simplest solution in your case is to sleep for a second before
pomo_pause
, so the time recorded is the first second of the break block rather than the last second of the work block.
It paused for a moment (and from the prefix, it's seems to be in work session) and then continuing to break session. It didn't fully paused like the using the command pomo.sh pause
, that's kind of weird. Maybe it has something to do with pomo_stat
? or maybe I need to change pomo_clock
or pomo_status
too?
from pomo.
if $work; then
send_msg "$work_end_msg"
# Ensure the time advances into the break block
sleep 1
pomo_pause
else
send_msg "$break_end_msg"
fi
seems to work for me. (Having the sleep before the pomo_pause
behaves like you describe for the reason in my previous message)
from pomo.
It seems like there's something that i changed that make it didn't work. After i re-downloaded the script, it works now. Thanks!
from pomo.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pomo.