issue98:tutoriel_conky
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue98:tutoriel_conky [2015/06/30 11:00] – créée auntiee | issue98:tutoriel_conky [2015/07/06 07:45] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | If you are like me, you have a lot to do and sometimes forget when something needs to be done. | + | **If you are like me, you have a lot to do and sometimes forget when something needs to be done. |
A couple of years ago, I wrote an article about using remind, but I have changed my setup enough that I thought a follow-up article might be worthwhile. There are many ways to keep track of tasks, this is how I am keeping organized – at the moment. | A couple of years ago, I wrote an article about using remind, but I have changed my setup enough that I thought a follow-up article might be worthwhile. There are many ways to keep track of tasks, this is how I am keeping organized – at the moment. | ||
Ligne 9: | Ligne 9: | ||
The required programs are: | The required programs are: | ||
• remind | • remind | ||
- | • conky | + | • conky** |
- | Remind is an ultra geeky calendar program that was written by David Skoll. Remind can do almost anything related to dates. It reads the information stored in a reminders' | + | Si vous êtes comme moi, vous avez plein de choses à faire et, parfois, vous oubliez la date à laquelle il faut faire un truc précis. |
+ | |||
+ | Il y a environ deux ans, j'ai écrit un article au sujet de l' | ||
+ | |||
+ | Cette solution vous affichera une liste chronologique de choses dont vous voulez vous souvenir, triées par échéance. La liste vous dira aussi combien de temps il reste jusqu' | ||
+ | |||
+ | En bas à gauche, vous voyez une capture d' | ||
+ | |||
+ | **Remind is an ultra geeky calendar program that was written by David Skoll. Remind can do almost anything related to dates. It reads the information stored in a reminders' | ||
The first part of the reminders' | The first part of the reminders' | ||
Ligne 18: | Ligne 26: | ||
+ | REM 2015-04-11 +30 AT 13:00 MSG Minecraft Party %b (in [_countdown(trigdatetime()-current())])** | ||
+ | Écrit par David Skoll, remind est un programme ultra-geeky de calendrier. Remind sait faire tout et n' | ||
+ | |||
+ | La première partie du fichier des rappels est capitale. Le fichier que j' | ||
+ | |||
+ | En l' | ||
REM 2015-04-11 +30 AT 13:00 MSG Minecraft Party %b (in [_countdown(trigdatetime()-current())]) | REM 2015-04-11 +30 AT 13:00 MSG Minecraft Party %b (in [_countdown(trigdatetime()-current())]) | ||
- | This is an example of a reminder in the format that is required for remind to be able to understand an event. | + | **This is an example of a reminder in the format that is required for remind to be able to understand an event. |
The format begins with REM followed by the date and then how many days in advance you want this reminder to be displayed. In this case, I want to start being reminded 30 days in advance. The AT tells remind what time the event will begin. This is followed by MSG and the actual message you want to see. The ending %b tells remind to end with "in x days' time" and the code in the parentheses gives the exact breakdown of how much time is left. In the scrot above, you can see that there was two days' time until my kids' Minecraft party, specifically the party was in 1 day 22 hours and 53 minutes. | The format begins with REM followed by the date and then how many days in advance you want this reminder to be displayed. In this case, I want to start being reminded 30 days in advance. The AT tells remind what time the event will begin. This is followed by MSG and the actual message you want to see. The ending %b tells remind to end with "in x days' time" and the code in the parentheses gives the exact breakdown of how much time is left. In the scrot above, you can see that there was two days' time until my kids' Minecraft party, specifically the party was in 1 day 22 hours and 53 minutes. | ||
Ligne 28: | Ligne 42: | ||
You could type out each new reminder or use snippets to speed up the process, but I found that to be too much work. So I wrote a very simple script (shown below) to make it easier. | You could type out each new reminder or use snippets to speed up the process, but I found that to be too much work. So I wrote a very simple script (shown below) to make it easier. | ||
- | Basically, this script asks the user a few questions and then formats the answers into the remind format and adds the new reminder to the reminders' | + | Basically, this script asks the user a few questions and then formats the answers into the remind format and adds the new reminder to the reminders' |
- | The only problem is that this results in a list that is not sorted by due date/time, but is just a chronological list of when each reminder was written. | + | Ceci vous montre un exemple de rappel dans le format nécessaire pour que remind puisse comprendre un événement. |
+ | |||
+ | La ligne commence par REM suivi de la date, puis de combien de jours à l' | ||
+ | |||
+ | Vous pourrez taper chaque nouveau rappel ou utiliser des bribes par-ci par-là pour rendre le processus plus rapide, mais cela faisait trop de travail pour moi. J'ai donc écrit un script très simple (ci-dessous) pour faciliter les choses. | ||
+ | |||
+ | Essentiellement, | ||
+ | |||
+ | **The only problem is that this results in a list that is not sorted by due date/time, but is just a chronological list of when each reminder was written. | ||
To figure out how to sort the file, I turned to the Ubuntu forums. Advice I received from forum members Lars Noodén and ofnuts got me started and headed in the right direction. A little more time searching the web and I found a page (http:// | To figure out how to sort the file, I turned to the Ubuntu forums. Advice I received from forum members Lars Noodén and ofnuts got me started and headed in the right direction. A little more time searching the web and I found a page (http:// | ||
Ligne 40: | Ligne 62: | ||
Note the (head -n 12 part of the code. This is needed because this tells sort to start sorting AFTER line 12. The reason for this is that I did not want any includes or functions to be sorted. In my reminders' | Note the (head -n 12 part of the code. This is needed because this tells sort to start sorting AFTER line 12. The reason for this is that I did not want any includes or functions to be sorted. In my reminders' | ||
- | Great, so now we have an easy way to make reminders and a way to have the reminders sorted so that they are listed based on when they are due, with the next reminder at the top of the list and the event furthest from now at the bottom of the list. How do we get it on the desktop? | + | Great, so now we have an easy way to make reminders and a way to have the reminders sorted so that they are listed based on when they are due, with the next reminder at the top of the list and the event furthest from now at the bottom of the list. How do we get it on the desktop?** |
- | Enter conky. Configuring conky is a topic for another article. Check out the Ubuntu forums conky thread for specifics if you need to, but basically conky will read whatever is written in a conkyrc file and put that information on your desktop. Every conkyrc file has two parts. The top part, above TEXT, contains all of the Configuration Settings and the bottom part, below TEXT, contains all of the Variable Settings that you want displayed on the screen. | + | Le seul problème est que cela donne une liste qui n'est pas triée par échéance jour/heure, mais n'est qu'une liste chronologique des moments où les rappels ont été écrits. |
+ | |||
+ | Pour essayer de comprendre comment trier le fichier, je me suis tourné vers les forums Ubuntu. Là, les conseils reçus des membres Lars Noodén et ofnuts m'ont permis de démarrer et m'ont mis sur la bonne voie. Après avoir cherché un peu plus sur le Web, j'ai trouvé une page (http:// | ||
+ | |||
+ | J'ai modifié leur exemple et l'ai rajouté à mon script « Reminder Maker ». | ||
+ | |||
+ | (head -n 12; sort -k 2,2 -k5,5n) < | ||
+ | |||
+ | Remarquez la partie (head -n 12 du code. Il est nécessaire, | ||
+ | |||
+ | Excellent, maintenant nous avons une méthode facile pour créer des rappels qui peuvent être triés afin qu'ils soient listés selon leur échéance, avec le prochain rappel au début de la liste et l' | ||
+ | |||
+ | **Enter conky. Configuring conky is a topic for another article. Check out the Ubuntu forums conky thread for specifics if you need to, but basically conky will read whatever is written in a conkyrc file and put that information on your desktop. Every conkyrc file has two parts. The top part, above TEXT, contains all of the Configuration Settings and the bottom part, below TEXT, contains all of the Variable Settings that you want displayed on the screen. | ||
So how do we get remind to output to conky? Below is the text part of my conkyrc file: | So how do we get remind to output to conky? Below is the text part of my conkyrc file: | ||
Ligne 53: | Ligne 87: | ||
Further reading: | Further reading: | ||
+ | http:// | ||
+ | http:// | ||
+ | |||
+ | C'est là que conky entre en scène. Le paramétrage de conky est un sujet pour un autre article. Jetez un œil au fil conky sur les forums Ubuntu pour des détails si vous en avez besoin, mais, essentiellement, | ||
+ | |||
+ | La question devient : comment faire en sorte que la sortie de remind soit envoyée à conky ? Voici la partie text de mon fichier conkyrc : | ||
+ | |||
+ | TEXT | ||
+ | |||
+ | ${execpi 60 remind -q -r / | ||
+ | |||
+ | Ceci dit à conky d' | ||
+ | |||
+ | Pour aller plus loin : | ||
http:// | http:// | ||
http:// | http:// |
issue98/tutoriel_conky.1435654824.txt.gz · Dernière modification : 2015/06/30 11:00 de auntiee