Tips requested for focus timer / tweaking RSIbreak
Dear Manjaro community,
There are several tools out there that help with focus
and taking Pomodoro breaks, but so far I have not
found any that does exactly what I need.
Therefore I want to implement something of my own,
or modify the closest existing project RSIbreak (RSI Break - KDE Applications).
While I can program, I do not have much experience
with integrating it with Linux and KDE
(in particular, the KDE edition of Manjaro).
I will first state what I seek,
and thereafter a few ideas of how I may approach it.
I would be very grateful for any advice which approach would
be the best!
(Or for pointing me out to an already existing application
I have missed).
Requirements
- By default it turns internet off, in such a way
that just clicking the button on the desktop
cannot simply turn it back on. - After every interval, say 25 min, it should
first aggressively prevent the user from working on,
for at least 5 minutes.
A mere notification does not work. - Thereafter it should show a popup, asking for
confirmation to start the next 25 min interval. - The popup has a second button that allows
to do one interval of 25 seconds with internet available.
At the end of this interval the internet should be turned
off again.
It does not need to be fancy, being quick to implement is more important.
Currently I use a Bash script that sleeps for 25 minutes
and then logs out. But I often forget to turn it back on
(hence point 3),
logging in is in my muscle memory and I tend to continue working
(hence point 2),
and it does not control internet access – a notorious enemy
of getting things done!
Implementation ideas
I currently consider three approaches:
- Creating something entirely new.
- Forking and modifying the existing project: RSIbreak
(RSI Break - KDE Applications, present in the Manjaro repositories)
This is a bit daunting because I have never worked in Qt before.
It has a wonderful aggressive 5-minute blackout,
but starts the next session immediately.
I want to give the user an opportunity to have a walk,
get a drink, visit the bathroom, etc. between
session whens needed.
It also does not control internet. - A bit hacky: RSIbreak allows to execute a command
at the end of a session.
Here I could put in my popup application asking for a confirmation.
RSIbreak can be paused an resumed via dbus,
so my application could use that.
I am not sure how best to disable internet access.
My best idea so far is running a daemon that turns
WiFi off every minute – I once found a command how
to do that in KDE.
I suppose that it could listen to a dbus command that pauses
it for 25 minutes. Cleaner solutions are very welcome!
Thank you in advance!