Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
gfreeau committed Apr 23, 2024
1 parent 7f5836c commit e073aeb
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 115 deletions.
2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions Makefile

This file was deleted.

218 changes: 108 additions & 110 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,148 +1,146 @@
# Pomodoro Timer for Cinnamon Desktop

# English
# Pomodoro Timer Applet for Cinnamon Desktop

The Pomodoro technique is used to boost productivity and this applet provides an easy way to use the technique right on your desktop.

Read more about the technique here: http://en.wikipedia.org/wiki/Pomodoro_Technique.

## Applet page
## Installing
* Install sox play if you want the sound capability: `sudo apt install sox`
* Extract to ~/.local/share/cinnamon/applets
* Enable the applet in cinnamon settings

http://cinnamon-spices.linuxmint.com/applets/view/131
## How To Use
The traditional Pomodoro technique involves setting a timer for focused work sessions followed by short breaks, and completing a long break after every few rounds to maximize productivity. Here’s how you can use this applet to boost your productivity:

## Installation
1. **Activate the Timer**: Once the applet is installed and enabled, click on the applet icon in your panel to open the timer menu. Optionally you can set the timer to start automatically when you log in.
2. **Start a Pomodoro Session**: Toggle the timer on from the menu to begin a 25-minute work session. During this time, focus entirely on your task without any distractions.
3. **Take Short Breaks**: After each Pomodoro, take a short break of 5 minutes. Use this time to rest, which increases concentration for the next session.
4. **Take Long Breaks**: After completing four Pomodoros, it is recommended to take a longer break of 15-30 minutes. This helps to recover from the exertion and reset your mental energy.
5. **Customize Your Timers**: Access the applet settings to adjust the duration of the Pomodoros, short breaks, and long breaks to suit your personal productivity rhythm.
6. **Use Keyboard Shortcuts**: Set up a keyboard shortcut via the applet settings to quickly access the timer menu without needing to use the mouse.
7. **Monitor Your Progress**: The applet keeps track of how many Pomodoros you have completed during the day, encouraging you to stay focused and reach your daily goals.
8. **Reset or Skip Timers**: If you need to end a session early, you can reset the current timer or skip to the next session through the applet menu.

In order to install cinnamon-pomodoro you have to execute the following steps:
* You need SoX play to play sound files, it is pre-installed on Linux Mint / Ubuntu, you can easily check:
<pre>
$ which play
$ man play
</pre>
If you do not have it, you will need to install it for your distribution, for Debian it is:
<pre>
$ sudo apt-get install sox
</pre>
* Clone the repository and install the files into the Cinnamon applet directory:
<pre>
$ git clone git@github.com:gfreeau/cinnamon-pomodoro.git
</pre>
* Then call `update-applet.sh` to overwrite the applet downloaded with the latest local changes
<pre>
$ ./update-applet.sh
</pre>
* Alternatively, if you don't have GIT installed you can just download zip file:
<pre>
$ wget https://github.com/gfreeau/cinnamon-pomodoro/archive/master.zip -O cinnamon-pomodoro.zip
$ unzip cinnamon-pomodoro.zip
$ cp -r cinnamon-pomodoro/pomodoro@gregfreeman.org ~/.local/share/cinnamon/applets
</pre>
* You will need to restart Cinnamon, press ALT-F2 and enter 'r'
* Finally, enable the applet by going to Menu->Settings->Applets and selecting Pomodoro
* Get productive!
For optimal productivity, try to avoid pausing the timer once a Pomodoro has started, as the technique is most effective when sessions are completed in one go.

## Installing an existing translation
## Tips

* To install an existing translation file, you need to move or copy the .mo file located in the "cinnamon-pomodoro/pomodoro@gregfreeman.org/po" folder to your local locales folder "~/.local/share/locale/LOCALE_ID/LC_MESSAGES"
* The file name must be the same as the applet UUID with the .mo extension : pomodoro@gregfreeman.org.mo
### Understanding Dialog Windows and Auto Start Settings

### Example for the french translation file
The applet provides configurable settings that affect how timers transition from one state to another—whether through manual interaction via dialog windows or automatically.

**Dialog Windows**
- **Purpose**: Dialog windows serve as interactive notifications that prompt you to manually proceed to the next timer. They are crucial for ensuring you consciously acknowledge the transition from work to break, or from break back to work.
- **Usage**: When dialog windows are enabled, you must manually start the next timer by clicking a button in the dialog. This is useful if you want to control when to actually start the next session, providing a moment to prepare or adjust based on your current task or condition.

``` shell
$ mv ~/.local/share/cinnamon/applets/pomodoro@gregfreeman.org/po/fr.mo ~/.local/share/locale/fr/LC_MESSAGES/pomodoro@gregfreeman.org.mo
```
**Auto Start Options**
- **Purpose**: Auto start settings allow for an uninterrupted workflow by automatically starting the next session—be it a Pomodoro, short break, or long break—without user interaction.
- **Usage**:
- **Pomodoro and Short Break**: If auto start is enabled for these timers, the next session will commence immediately after the current one ends, without showing any dialog, regardless if the dialog window option is enabled or disabled.
- **Long Break**: The auto start for a long break can work concurrently with dialog windows. When both are enabled, a dialog window will appear at the start of the long break showing a countdown. If the auto start after long break is also enabled, this dialog will automatically close when the countdown finishes, and a new Pomodoro will begin.

It is possible that the "locale" folder doesn't exists in "~/.local/share", in this case create the required folder tree ("locale/YOUR_LOCALE_ID/LC_MESSAGES") before using the command above
### Best Practices for Configuring Settings

* You may need to restart Cinnamon, press ALT-F2 and enter 'r'
* Enjoy the french translation :)
- **Maximize Focus**: Enable auto start for Pomodoros and short breaks if you want to maintain a strict work rhythm without interruptions, ideal for deep focus sessions where maintaining momentum is crucial.
- **Stay Informed and Rested**: Use dialog windows with long breaks to stay informed about the break period but still enjoy the benefit of automatic transition back to work, ensuring you don’t skip necessary rest.
- **Balance Flexibility and Structure**: If your work requires flexibility, use dialog windows for Pomodoros and short breaks and disable auto start to decide when you're truly ready to move on. This setup helps manage work that may need sudden shifts or extensions in activity time.

## Make a translation
### Tailoring to Your Workflow

```shell
$ cd po
$ msginit
```
Experiment with different configurations to find the optimal setup that enhances your productivity without causing burnout. The goal is to leverage the Pomodoro technique in a way that best suits your daily routines and work demands, adjusting settings as needed to accommodate changes in your work intensity or focus requirements.

You can also specify the locale and pot file:
## Features
* Customize timer durations for the pomodoro, short and long breaks
* See how many pomodoros you have completed
* Configure what is shown in the panel, options include an icon and the timer counting down
* Optionally play and configure sounds such as timer start and end
* Show dialog windows at the end of the timers so you know to take a break
* Auto start the timer when you first log in
* Set a keyboard shortcut to open the applet menu and then use arrow keys to select options
* Quickly reset the timer state or skip to the next timer if you want to end early

```shell
$ msginit --locale=fr --input=pomodoro@gregfreeman.org.pot
```
## Screenshots

* Edit the newly created .po file and change msgstr to translated text.
* Please add your translations to the [original owner repository](https://github.com/gfreeau/cinnamon-pomodoro).
* Use cinnamon-json-makepot to test your translations.
* You can also use msgfmt to create a .mo file from the .po file.
![Applet screenshot](applet_screenshot.png )

--------------------------------------------------------------------------------------------------------------------------------
![Applet screenshot](options_screenshot_1.png )

# Français
![Applet screenshot](options_screenshot_2.png )

La technique Pomodoro est utilisée pour booster la productivité et cette applet vous permet de l'utiliser d'une façon simple et intuitive, directement sur votre bureau Cinnamon.
Pour en savoir plus sur la technique Pomodoro, je vous invite à consulter la [page Wikipedia](https://fr.wikipedia.org/wiki/Technique_Pomodoro).
## Changelog
- 1.0.1
- Added option to automatically start the timer on log in
- 1.0.0
- Added keyboard shortcut to open the applet
- Added new dialog option to show after a pomodoro ends
- Added applet menu option to skip the current timer, useful if you want to end early
- Updated code to use ES6 for easier updates in future

## Page de l'applet
## Local Development

http://cinnamon-spices.linuxmint.com/applets/view/131
- Clone this repository and install the files into the Cinnamon applet directory:
```shell
$ git clone git@github.com:gfreeau/cinnamon-pomodoro.git
```
- Then call `update-applet.sh` to install/overwrite the applet (assumes applets are stored in `~/.local/share/cinnamon/applets/`). This works great for local development as it will overwrite the applet installed from cinnamon spices as well.
```shell
$ ./update-applet.sh
```

## Installation

Afin d'installer l'applet, il vous faut suivre les étapes suivantes :
## Creating and Updating Translations for Cinnamon Applets

* Vous devez installer "SoX play" afin de pouvoir lire les fichiers sons, celui-ci est préinstallé sur Linux Mint et Ubuntu, vous pouvez facilement le vérifier :
<pre>
$ which play
$ man play
</pre>
Si vous ne l'avez pas, vous allez devoir l'installer pour votre distribution, pour Debian il vous suffit de taper la commande suivante dans votre terminal :
<pre>
$ sudo apt-get install sox
</pre>
* Clonez le repository et installez les fichiers dans le répertoire des applets de Cinnamon :
<pre>
$ git clone git@github.com:gfreeau/cinnamon-pomodoro.git
$ cp -r cinnamon-pomodoro/pomodoro@gregfreeman.org ~/.local/share/cinnamon/applets
</pre>
* Sinon, si vous n'avez pas GIT installé, vous pouvez simplement télécharger le fichier zip :
<pre>
$ wget https://github.com/gfreeau/cinnamon-pomodoro/archive/master.zip -O cinnamon-pomodoro.zip
$ unzip cinnamon-pomodoro.zip
$ cp -r cinnamon-pomodoro/pomodoro@gregfreeman.org ~/.local/share/cinnamon/applets
</pre>
* Vous pourriez avoir à redémarrer Cinnamon, pour cela appuyez sur "ALT + F2", tapez "r" et validez
* Pour finir, activez cette applet en vous rendant sur Menu->Préférences->Applets et en sélectionnant Pomodoro
* Soyez productif !
### Preparing for Translation

- **Navigate to the Translation Directory**: First, make sure you are in the `po` directory where the translation files are maintained.

```shell
$ cd po
```

### Creating a New Translation

- **Initialize the New Translation File**:
Use `msginit` to create a new `.po` file for the language you want to translate to. For example, to create a French translation file from the template `.pot` file:

```shell
$ msginit --locale=fr_FR --input=pomodoro@gregfreeman.org.pot --output-file=fr.po
```

This command will create a `fr.po` file based on `pomodoro@gregfreeman.org.pot`.

- **Edit the Translation File**:
Open `fr.po` in a text editor and translate the messages. In the `.po` file, fill in the `msgstr` fields with your translations corresponding to each `msgid`.

### Updating an Existing Translation

## Installer une traduction existante
- **Open the Existing `.po` File**:
Open the `.po` file for the language you are updating in a text editor and make the necessary changes to the translations.

* Pour installer un fichier de traduction existant, vous avez besoin de déplacer ou copier le fichier .mo situé dans le repertoire "cinnamon-pomodoro/pomodoro@gregfreeman.org/po" vers votre répertoire local de localisations "~/.local/share/locale/LOCALE_ID/LC_MESSAGES"
* Ce fichier doit être nommé avec l'UUID de l'application et porter l'extension .mo : pomodoro@gregfreeman.org.mo
### Compiling the Translation

### Exemple avec le fichier de traduction pour la langue française
- **Generate the .mo File**:
Once your translation or updates are done, compile the `.po` file into a `.mo` file to make it usable by the applet. Use the `msgfmt` command:

``` shell
$ mv ~/.local/share/cinnamon/applets/pomodoro@gregfreeman.org/po/fr.mo ~/.local/share/locale/fr/LC_MESSAGES/pomodoro@gregfreeman.org.mo
```
```shell
$ msgfmt -o pomodoro@gregfreeman.org.mo fr.po
```

Il est possible que le répertoire "locale" n'existe pas dans "~/.locale/share", dans ce cas, créez la structure de répertoire requise ("locale/VOTRE_LOCALE_ID/LC_MESSAGES") avant d'utiliser la commande ci-dessus.
This will create `pomodoro@gregfreeman.org.mo` from the `fr.po` file.

* Vous pourriez avoir à redémarrer Cinnamon, pour cela appuyez sur "ALT + F2", tapez "r" et validez
* Profitez de la traduction française ! :)
### Testing and Installation

## Créer une traduction
- **Install the Compiled Translation**:
Move the compiled `.mo` file to the appropriate directory:

```shell
$ cd po
$ msginit
```
```shell
$ mv pomodoro@gregfreeman.org.mo ~/.local/share/locale/fr/LC_MESSAGES/
```

Vous pouvez aussi spécifier la localisation et le fichier .pot :
- **Restart Cinnamon**:
To apply the translation, restart the Cinnamon environment by pressing `ALT-F2`, typing `r`, and pressing `Enter`.

```shell
$ msginit --locale=fr --input=pomodoro@gregfreeman.org.pot
```
### Contributing Back

* Editez le nouveau fichier .po créé et changez "msgstr" avec votre chaîne de texte traduite.
* S'il vous plait, ajoutez vos traductions sur le [repository du créateur de l'applet](https://github.com/gfreeau/cinnamon-pomodoro).
* Vous pouvez utiliser cinnamon-json-makepot pour tester vos traductions.
* Vous pouvez également utiliser msgfmt pour créer un fichier .mo à partir d'un fichier .po.
- **Submit Your Translations**:
Contribute your translations back to the community by submitting them to the [original repository](https://github.com/gfreeau/cinnamon-pomodoro). This involves involves creating a pull request with your updated `.po` files.
Binary file added applet_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added options_screenshot_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added options_screenshot_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e073aeb

Please sign in to comment.