Take a break

Plasma 5 Applets

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

6
Become a Fan
7.7

Available as/for:
Description:
Widget (plasmoid) for plasma panel.
Shows an icon when it is time to take a break.

Problem: Sometimes you don't remember that you have to take a break. And sometimes you remember that you have to take a break, but you don't remember when you took a break last time.

Solution: The 'Take a break' widget, that shows an icon when it is time to take a break.

Characteristics:

Not intrusive: It doesn't show any dialog nor any buttons to be clicked. It just shows an icon in the panel when it is time to take a break.
Unattended: You don't have to do anything. Everything is automatic. The widget detects when you are taking a break and when you come back.
Easy configuration: You only have to enter two values in the widget config: The 'work time' and the 'break time'.

And of course, easy use:

At start, the widget shows a countdown with the minutes to take next break.
When the countdown reaches zero, a tired face icon is shown in the panel, with a red background. It means that it is time to take a break.
The tired face with the red background is kept if you continue working.
If you are idle (not using mouse nor keyboard) for the configured 'break time' less one minute, the program considers that you are taking a break, and shows a yellow background in the tired face.
If you are idle for the configured 'break time', the program considers that you have completed the break, and shows a green background in the tired face.
If you come back (use the mouse or keyboard) while showing the green background, the countdown will be shown and restarted.
If you come back while still showing the yellow background, the program considers that you haven't completed the break, so a red background will be shown again.
What if you took a short break, but you want to restart the countdown? No problem, you only have to click on the widget whenever you want to restart the countdown.

The widget works in horizontal panels, in vertical panels, and in desktop.

Want to save space in the panel? Use the "hide&show" mode:

To enable the "hide&show" mode, just control+click on the widget (click on the widget while pressing the "control" key).
Least important information (the countdown) will be hidden, and most important information (the tired face icon) will be shown.
If you want to see the countdown, just pass the mouse slowly over the widget zone, and the countdown will be shown for five seconds.
To disable the "hide&show" mode, just control+click on the widget again.
If you don't want the countdown to be shown when passing the mouse over the widget zone, then enable the "hide&show" mode by using "control+shift+click" instead of "control+click".
Alternatively you can configure the "hide&show" mode at "Advanced" preferences.


REQUIRES

KDE 5 (Plasma 5).


AUTOMATIC INSTALLATION

Right click on any panel widget (for example, in the kde menu widget) and select 'Panel options' -> 'Add widgets...' -> 'Get new widgets' -> 'Download new Plasma widgets'.
Search for 'Take a break', and click on 'Install'.

The installation is done. Now we are going to add the plasmoid to the panel:

Right click on any panel widget (for example, in the kde menu widget) and select 'Panel options' -> 'Add widgets...'.
Search for 'Take a break', and double-click on the item found. The plasmoid will be added to the panel. If you prefer to add the widget to the desktop, then drag the item found and drop it to the desktop.
Move the plasmoid to your favourite place.


MANUAL INSTALLATION

Download the file 'take_a_break.plasmoid' to some folder in your hard disk.
Right click on any panel widget (for example, in the kde menu widget) and select 'Panel options' -> 'Add widgets...' -> 'Install widget from local file...'.
A file selection window will be shown. Go to the folder (where you saved the file to), select the downloaded file, and click on Ok.

The installation is done. Now we are going to add the plasmoid to the panel:

Right click on any panel widget (for example, in the kde menu widget) and select 'Panel options' -> 'Add widgets...'.
Search for 'Take a break', and double-click on the item found. The plasmoid will be added to the panel. If you prefer to add the widget to the desktop, then drag the item found and drop it to the desktop.
Move the plasmoid to your favourite place.


HOW TO UNINSTALL

Right click on any panel widget (for example, in the kde menu widget) and select 'Panel options' -> 'Panel preferences'.
Rigth-click on the plasmoid (Take a break), and click on 'Remove this Take a break'.

The plasmoid has been removed from the panel. Now we are going to uninstall it. Open a shell and run this command:

plasmapkg2 --remove org.kde.contrib.takeabreak


SOURCE CODE

The source code is into the file 'take_a_break.plasmoid', that is a zip file. So to see the source code, you only have to rename it to a .zip extension, and then unzip it:

mv take_a_break.plasmoid take_a_break.zip
unzip take_a_break.zip


LICENSES

The license of this program is the GPLv3. See 'COPYING.GPLv3' file in the source code.

The tired icon (face-yawn.svg) is part of the 'Breeze icon theme', and its license is the LGPLv3. See 'COPYING.LGPLv3' file in the source code, and https://projects.kde.org/projects/kde/workspace/breeze
Last changelog:

CHANGELOG
1.0 (2015-10-1 First version.
1.1 (2015-11-01) hide&show mode. Desktop support.
1.2 (2015-12-26) Advanced config.
1.3 (2016-04-30) "m" auto position. Hide "m".


Ratings & Comments

17 Comments

Vistausss

Great plasmoid! But I would love to get notifications.

remram44

10 This is awesome. I was looking for something exactly like this, the automatic activity detection is a nice touch too! The biggest problem is that it was hard to find in the store, as it doesn't show up for "timer" or "walk" or "stretch", which are the keywords I had tried.

jeverling

Hi, and thank you very much for this great plugin! I use it all the time. I have one request though - could you add an option to disable automatic reset after inactivity? I'm using the plugin to remind me to have a short workout session every hour. Sometimes I have to do things like talking on the phone, making a cup of coffee or whatever and when I come back the countdown is reset. For me it would be great if I could configure the plugin to only reset when I manually click it. Thanks again and have a great weekend! Very often I have to do things like reading something or a phone call, but

Warmuser

Great idea! It works on KDE 5.10, but sometimes gives me issue messages. Can you fix it?

voondo_double

Thanks !

dimkard

Nice and useful widget, thanks for your work. It would be nice to get a sound notification as soon as work time ends!

kdea

Thank you. For now I prefer to keep it not intrusive, and to avoid disturbing the user with sounds. I think that the icon is suficient to inform the user.

nomeutente94

It's so un-intrusive that sometimes i don't even notice it, I agree with dimkard for a sound notification feature! If you want to keep it that way just add it this feature in the settings and disable it as default

herrbatka

this could be nice as a sys tray widget.

kdea

Thank you for your suggestion. Try the "hide&show" mode. See the description in the page: Quote:

Want to save space in the panel? Use the "hide&show" mode:
  • To enable the "hide&show" mode, just control+click on the widget (click on the widget while pressing the "control" key).
  • Least important information (the countdown) will be hidden, and most important information (the tired face icon) will be shown.
  • If you want to see the countdown, just pass the mouse slowly over the widget zone, and the countdown will be shown for five seconds.
  • To disable the "hide&show" mode, just control+click on the widget again.
  • If you don't want the countdown to be shown when passing the mouse over the widget zone, then enable the "hide&show" mode by using "control+shift+click" instead of "control+click".
  • Have fun :-)

    herrbatka

    Ok that's kinda cute, but honestly i still think that it would be more reasonable to simply have this thing in tray. Current solution is just magical and it is against what kde users are used to. Ah, btw: is it possible to reset timer?

    kdea

    Well, I like magical (but simple) solutions :-). I'm still learning plasmoid programming, and I don't know all of the details of creating them. For example I still don't know how to convert a plasmoid into a systray icon. I don't know if it is easy or difficult. I bet it is difficult, since in general a plasmoid can't fit into the size of an icon. For example, the countdown probably won't fit into an icon (and in fact the countdown isn't an icon, it is text). So it would require a size change and a conversion into icon, that sounds as hard work. Anyway I will study the possibility, and will take your suggestion in count for future versions. In the mean time, I think that the "hide&show" mode is a good replacement. Related to your thoughts, @Hookahey made some similar suggestions in other comments, and my conclusion (and probably hers too) was that the panel should have a systray for plasmoids. In this way, plasmoids could be hidden in the systray with their original size, without the need of converting them into icons. I think that my "magical" solution simulates a "plasmoid systray", allowing the user to hide and show a plasmoid in its original size, and showing it automatically when there is important information for the user. Yes, it is possible to reset the countdown, just click on the widget. See the description in the page: Quote:

  • What if you took a short break, but you want to restart the countdown? No problem, you only have to click on the widget whenever you want to restart the countdown.
  • Hookahey

    Hi Nice and useful plasmoid. If you want to go further on ideas and options for it, then have a look at RSIBreak https://userbase.kde.org/RSIBreak Why I am posting though is to ask that why the plasmoid does not seem to work outside of the panel, i.e. when added to the desktop. It does not show the time when on the desktop. Is it on purpose panel-only? Would be nice to let people choose where to put it. Thanks Hookahey

    kdea

    Thank you for your congrats & suggestions. I already knew RSIbreak, in fact I was using it some years ago, it was very good, but a bit complex and overloaded for my taste. I was looking for something more simple and easy to use, and integrated with kde... and I decided to do it, and to contribute it to the community. Yes, the widget is designed to work only in panels, not in the desktop. This is due to two main reasons. First because I only use widgets in panels (I usually have windows maximized, and I like them to cover all of the available space, so a desktop widget would be hidden under the windows). And the other reason is simplicity: By working only in panels, the program is more simple and easy to maintain. Anyway, if there is a big demand for it to work in the desktop, I could study it. For now I prefer to keep it as simple as possible. Nice to see that it is useful for you :-)

    Hookahey

    Hi again I agree on RSIBreak being a little complicated on options and also think your idea of a small and non-intrusive plasmoid is very good. Was only mentioning it as an inspiration of ideas for your plasmoid as they share purposes. But looks like you knew it anyway. About the panel vs. non-panel, yes I agree that with maximized windows the plasmoid is meant to be put in the panel. The problem with the panel is that it gets crowded fast with all the plasmoids one uses. I thus like using the desktop sometimes for plasmoids that do not need to always be "in sight" and need my attention. As far as I remember from plasma 4 it was only a small change in the code to accommodate for panel vs. desktop format for a plasmoid but do not know how it is with plasma 5. Usually though most plasmoids come with the option to work on both. So I was thinking it is just a small change away to make it work also on the desktop but if that is no priority for you I might have a look into it myself ;). So no pressure there. Now I got another idea but that might be even more complicated to implement ;). The plasmoid could be part of the system tray and thus be only shown when active, i.e. when a break is needed, and be hidden the rest of the time. But like I said, that might be even more difficult to implement, so maybe something for the nice to have future. Thanks for the work Hookahey

    kdea

    Hi, I have published a new version (1.1) that supports desktop. Also includes a new "hide&show" mode to save space in the panel (see description in the page). Have fun :-)

    kdea

    Thank you again for your congrats & suggestions. Well, this is my third plasmoid (I also made "Day of month" and "Day of week"), and I still don't know all the details of developing plasmoids, so perhaps you are rigth and it's only a matter of changing some lines in the code to make it work on the desktop. I will take a look on it this weekend. If it is easy, I will publish a new version with support for both panel and desktop. The support for system tray is another detail that I still don't know. I guess it will be a bit more difficult, and is probably out of the scope of the widget, since it will imply more config options, and probably more complexity for the program. Anyway your idea takes me to an idea for the panel developers: Same as system tray icons can be hidden (the user can choose the items to be hidden and when they are shown), plasmoids in the panel could also be hidden. The panel could have an option to choose which plasmoids are shown and which ones are hidden, and when the hidden ones are shown. This would be an idea to be sent to the panel developers, and wouldn't imply any changes on the plasmoids, only in the panel. Your idea has created another idea :-)

    Pling
    0 Affiliates
    Details
    license
    version 1.3
    updated
    added
    downloads 24h 0
    mediaviews 24h 0
    pageviews 24h 0

    Other Plasma 5 Applets:

    WebView test
    kinta
    last update date: 10 years ago

    Score 5.0

    Google Task - web - obsoleted
    suli
    last update date: 8 years ago

    Score 6.1

    CodeShip Monitor
    Naraku
    last update date: 8 years ago

    Score 5.0

    Media Controller Compact
    bkueng
    last update date: 6 years ago

    Score 7.7

    Shaders example plasmoid
    mart
    last update date: 10 years ago

    Score 6.5

    Simple RSS reader
    aloos
    last update date: 9 years ago

    Score 7.0