Outils pour utilisateurs

Outils du site


issue60:c_c

Ceci est une ancienne révision du document !


As a follow-up to last month's article, I decided to supply a few more tips and tricks that mesh well with previous articles. I'll cover (briefly) how to configure Conky for Japanese, a reader's solution for ToDo lists, and a useful script for displaying your current terminal colour scheme.

Displaying Japanese in Conky is fairly simple, and consists of the following three steps: • Override any UTF-8 locale with the setting “override_utf8_locale yes” (minus the quotes) • Enable XFT (X FreeType) fonts using the setting “use_xft yes” (minus the quotes) • Then choose a font that supports the language, for example: “xftfont VL Gothic:size=10” (minus the quotes).

This is useful if you, for example, have Japanese in your ToDo list (if it's displayed by conky), in case any of your scripts return Japanese characters, or if you use Japanese in any other way within conky.

A reader, John, recently explained his ToDo list setup to me (while suggesting I write the above Conky tips in an article: done and done), and I thought it was a very versatile way to go about it. As I've explained in the past, my system simply utilizes a python script and a folder of reminder files, meaning I can update it on-the-fly with any text editor. The script John uses, however, offers an Anroid and iPhone app, which is a bit easier to do quickly. The script he uses is called “todo.txt”, and is written by Gina Trapani (her homepage is: http://ginatrapani.org/). Combined with the following script (that he found on the Ubuntu Forums – I was unable to find the exact thread, otherwise I'd have linked to it), you can have a nicely formatted list in Conky. The script is here: http://pastebin.com/FnHGkcXw. Once you've added some items to the todo.txt file, you need to simply test the script (and possibly adjust the path to todo.sh), and then add it to conky using, for example, ${execi 60 todo-list} (which runs the script every 60 seconds).

The colours script I use is the last script on this page: http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html. It essentially writes the colour codes to the terminal, resulting in a table of the colours, helping you when you're either customizing your Bash prompt, or else when you're trying to find colours that you like. I save this script in my scripts folder as “colors” and defined an alias within my .bashrc for “sh $pathToColors” (replace $pathToColors with your actual path), to save myself having to write it every time. You can also create a symbolic link in /usr/bin/ or add your script folder to your $PATH, but seeing as the colors only matter for your terminal, it's simply easiest to create an alias. The script looks something like the image shown right.

For anyone interested in the actual colors I'm using, they can be found here: https://github.com/lswest/dotfiles/blob/master/.Xdefaults

I hope that this information has been useful, and, as always, if you have any questions, comments, or suggestions, you can email me at lswest34@gmail.com. If you do email me, please include “C&C” or “FCM” in the subject line. I've been debating whether or not I should do an article of C&C on my configuration files and favourite programs – if any reader is interested in reading that, please send me an email and let me know.

issue60/c_c.1336017417.txt.gz · Dernière modification : 2012/05/03 05:56 de fredphil91