From 802627c6b89f8ca268edec37e981782e7f3899a9 Mon Sep 17 00:00:00 2001 From: inkarkat Date: Mon, 13 Sep 2010 01:26:28 -0700 Subject: [PATCH] Migrated from linux-with-conky v5 --- Linux-with-Conky.textile | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/Linux-with-Conky.textile b/Linux-with-Conky.textile index 8afa030..8fdf481 100644 --- a/Linux-with-Conky.textile +++ b/Linux-with-Conky.textile @@ -1,11 +1,41 @@ Conky is a system monitor for X, that can also display the output of shell commands. Setting up Conky is generally a simple process of installing it from your Linux distribution's repository. -Displaying your todo.txt file on your desktop is a simple task thanks to Conky. The most basic code to display the todo.txt file is: ${execi 10 ~/todo.sh -p ls} This will cause your todo.txt file to be displayed as it would from the command line, minus the color, and it will refresh every 10 seconds. Using the grep command you can get a bit more fancy and color code your todo items. +Displaying your todo.txt file on your desktop is a simple task thanks to Conky. The most basic code to display the todo.txt file is: ${execpi 10 todo.sh -p ls} This will cause your todo.txt file to be displayed as it would from the command line, minus the color, and it will refresh every 10 seconds. Using the grep command you can get a bit more fancy and color code your todo items. Unless you want your todo list to be truncated, you will also need to play with the text_buffer_size variable in your .conkyrc file. The default setting is 128 bytes, but I found that to be inadequate for my todo.txt file, so I raised the variable to 1024 bytes. The higher your text_buffer_size, the more resources that Conky will use, so raise sparingly. +"Link to the conkyrc files":http://github.com/duanehubbard/conky-files + !http://farm4.static.flickr.com/3316/3343839756_612804f1fe_o.png! -!http://farm4.static.flickr.com/3561/3343839752_b7e47f7c16_o.png! +h2. Coloring -"Link to the conkyrc files":http://github.com/duanehubbard/conky-files \ No newline at end of file +The approach by Duane Hubbard uses a wrapper @color_todo.sh@ script that augments the plain todo.txt output with Conky's @${color yellow}@ tags. Starting with todo.txt v 2.5, one can simply redefine todo.txt's built-in color map to achieve the same effect. No wrapper and postprocessing is needed, and this will work together with the new feature of highlighting more than priorities A, B & C. + +Add a separate todo.txt configuration in @~/.todo/conky-config@: + +
+# todo.txt configuration for Conky highlighting. 
+export BLACK='${color black}'
+export RED='${color red}'
+export GREEN='${color green}'
+export BROWN='${color brown}'
+export BLUE='${color blue}'
+export PURPLE='${color purple}'
+export CYAN='${color cyan}'
+export LIGHT_GREY='${color LightGrey}'
+export DARK_GREY='${color DarkGrey}'
+export LIGHT_RED='${color LightRed}'
+export LIGHT_GREEN='${color LightGreen}'
+export YELLOW='${color yellow}'
+export LIGHT_BLUE='${color LightBlue}'
+export LIGHT_PURPLE='${color LightPurple}'
+export LIGHT_CYAN='${color LightCyan}'
+export WHITE='${color white}'
+export DEFAULT='${color}'
+source ~/.todo/config 
+
+ +Embed todo.txt with this special configuration: ${execpi 10 todo.sh -d ~/.todo/config-conky ls + +!http://farm4.static.flickr.com/3561/3343839752_b7e47f7c16_o.png!