Results 1 to 10 of 2865

Thread: HOWTO: VinDSL Conky Script

Threaded View

  1. #1
    Join Date
    Apr 2007
    Beans
    195

    HOWTO: VinDSL Conky Script

    So, you're new to Conky and/or Linux and you've decided you really like VinDSL's Conky setup. Let me first say this to you. Welcome To Conky! And please, keep reading, as frustrating as that may be. This is a complete guide to help you get going. Start to finish, written so you can understand what's going on and make your own changes as you need them.

    Also, as a note, I would like to say that this particular thread is only here to address issues with VinDSL's Conky setup itself. We're not out to form a new community, or make you feel welcome/unwelcome, or teach you everything there is to know about Conky, or discuss new ideas about Conky. There's already a fully developed Conky Community that is centred around The Big Conky Thread. They actually are looking forward to seeing what ideas you have, and to see what you've done with Conky. If you feel the need to show off what you've done because of this thread, please, do it there instead. This thread is really geared toward getting new users' problems solved with regards to VinDSL's Conky Script. The less off-topic stuff we have here, the more helpful the thread is for new users. Mainly because it is easier to browse through a thread that is directly about the topic at hand than it is to browse a thread that strays into other examples frequently. Any ideas or suggestions you have for VinDSL himself, he will see in the Conky Thread, and so will I. If I've made a spelling mistake, or don't address something within VinDSL's scripts thoroughly enough here, then I'm happy to hear it here. Improvements to this HowTo do get made from time to time, as needed. However, this is not a complete guide to Conky, nor is it intended to be. If it helps you, despite not using VinDSL's Conky Scripts, great. That's not it's primary purpose, but that is great anyways.

    Next, I would like you to understand something. Copying and pasting VinDSL's Conky scripts, in their entirety, as your first attempt at Conky Will frustrate you. You didn't do anything wrong, it's not broken, and it is in fact working for you. You're just not familiar with what it takes to get it going the way you, personally, need it to work for your system. In fact, the consensus among the rest of us Conky veterans is that, had you decided to copy pretty much any other person's code other than his, you could have and probably would have had it running perfectly by now. But, not to worry, that's what I've started writing this for. To walk you through getting it customized to your needs.

    Contents:
    1) Prerequisites:
    Part I: What you'll need for Conky, and this guide.
    Part II: What you'll need to know about your system.
    Part III: What you'll need specifically for VinDSL's Conky itself.

    2) The Sections of His Conky:
    Part I: His Script Files.
    Part II: Conky Itself.
    A) Environment Variables
    B) Colors
    C) Lua Script Loading
    D) The TEXT Object
    E) The Ubuntu Logo
    F) System Info
    G) Processor Info
    H) Memory Info
    I) Hard Drive Info
    J) Top Processes
    K) Network Info
    L) Weather WARNING!!!!!
    M) Time Section
    N) Calendar Section
    O) Music Players (Experimental)
    O1) Rhythmbox
    O2) Banshee (The Experimental Part)

    3) Getting Further Help.

    Prerequisites

    Part I: What You Need For Conky And This Guide.

    Okay, here we go. You know about Conky already, and you've got to the point where you wanted to copy VinDSL's, so I'm going to start from the point that you don't need to be told how or where to install Conky or it's dependencies. Just what you need for this guide and working with Conky from this point to the rest of your days. So, starting off, you need some things. Some things you're going to want for now and the future of using Conky. They're handy to have, handy to know, and will get you well on your way.

    Okay. Everyone read that part? Good! Just to make sure, the easiest way to get Conky on a Ubuntu family of Linux flavour is to type this into the nearest terminal:

    Code:
    sudo apt-get install conky-all
    You will be asked for your root password. Good thing to know, so you might as well learn it now. Now you will have Conky installed on your computer, and you will be ready to go. One Warning. As of the current writing of this warning (05/29/2012) the current version of Ubuntu and it's family (12.04 Precise Pangolin) is suffering with two bugs that stand between you and Conky perfection. One is something called the Gnome-Keyring problem, which is a bug in Gnome-Keyring that gives problems to any program trying to access things like sensors and file systems, both of which are used in this Conky setup. Two is a problem with Conky itself. Somewhere along the lines, the people who make Conky itself took a bad step and created a version called 1.8.1-6. This particular version has its own problems with Gnome-Keyring, and should be avoided. These two problems combine into a bizarre monster because 12.04 Precise Pangolin comes installed with Conky 1.8.1-6 as well as the version of Gnome-Keyring with the bug. There is no real fix for Gnome-Keyring at the time of this writing, but if one is found I will point to the post where the solution can be found. The problem with Conky 1.8.1-6 is relatively easy to resolve. You can try and find a source for 1.8.1-5 and Pin that version in Synaptic, or you can get the newer 1.9.0-2 by typing this into a terminal, and then installing the new version when update-manager finds it:
    Code:
    sudo add-apt-repository ppa:vincent-c/conky
    sudo apt-get update

    Now to the real requirements for getting VinDSL's Conky setup going. First, go to the repositories and get Screenruler. Easiest, fastest way is to go to a terminal and type this:

    Code:
    sudo apt-get install screenruler
    What is screenruler? It's a program that literally allows you to measure how many pixels wide or high something is. It's a literal ruler on your screen. It will help you when it comes down to little tweaks later on. Instead of having to guess where something is, just start screen ruler and find out directly. Want an object down a little bit, but don't know how far down you want it? Measure it with screenruler. One of the simplest, easiest, and most useful tools for Conky you will ever download.

    Something you need to know as you're looking at his code, and at Conky in general, is what some of the symbols mean.

    # means Comment. Which means you're writing an explanation or note into the code that will not show in Conky. In some cases, VinDSL has “Commented Out” sections of the script so they don't run for him, but are available to people who, like yourself, have copied his script for their own uses. An example of this would be the weather section. If you live in the USA, you will tend to use Imperial measurements, and as such the Imperial weather section is active, while the Metric section is identical to the Imperial, but has been “Commented Out” so people who live outside the USA and prefer Metric units can get the same results with little effort. Simply delete the # marks at the beginning of any line that begins with one, and that line will be activated in Conky. Same in reverse, anything you're experimenting with and don't want to use yet, you can put a # sign in front of it, and Conky will ignore it.

    $ means Object. Anything in the TEXT section that starts with $ is something that Conky is receiving an instruction for. ${goto}, for example, tells Conky to start drawing whatever comes after it at a certain number of pixels over from the left edge of the Conky window. If you were to just put {goto} or even goto, then you will simply get {goto} or goto written in the place in Conky where you have it typed out.

    Curly Braces: {} These little buggers are necessary. Everywhere. Although they're not mandatory for every single object, it is best to use them to surround an object anyways. It makes it easier for you to read your own work, as they easily distinguish the start and end of the objects you are using as instructions for Conky from any old text or title you are using to label things in Conky.

    Next, you need these links. There's a lot of reading, and you won't understand right away, but you'll need them during this guide, perhaps opened in other tabs on the browser, or even other windows. When you can look at VinDSL's Conky, this guide, and the content of these links all at once, even by flipping back and forth, it will show you what everything means, and why it works the way it does.

    Conky Configuration Variables (Above the TEXT section.)

    Conky Objects (Below the TEXT section.)

    Conky Pitstop (Source for how-to-use scripts.)

    TeoBigusGeekus' new custom weather script method. Update: TBG has uprooted the scripts themselves and put them in the #! (AKA CrunchBang) Linux Forums. That is where you'll get them from now on, but I'm keeping the old link here for all the info that was generated to help people so far.

    As time will go on, you might also want this HOW TO: Using LUA Scripts in Conky page by mrpeachy. He's one of our forum's LUA guys, and he has put down in a thread, over at the #! forums, a tutorial from what he knows of LUA scripting. He claims not to be an expert, but he is many leaps and bounds ahead of the game when it comes to LUA. Keep that link somewhere for when you decide you want to expand beyond what you see in this HowTo here.

    Most useful of these to have open while you're reading this guide are the first two, titled Conky Configuration Variables, and Conky Objects. As the guide goes on, you will want to open TeoBigusGeekus' weather script too. I won't be going into massive detail on the weather section, because that link is there for that purpose. You can always come back here when you're done with that link. And yes, there is a lot of reading there. Here too, so far. But the idea is that you read and understand it so you can get up to speed in getting Conky going from VinDSL's example.

    Important: You need a text editor. Depending on what version of Linux you use, and your own personal tastes, your text editor will be different. Gedit on Gnome, Kate on KDE, Mousepad on XFCE4, nano in a terminal, or any number of others. What one you use won't matter as much as you being comfortable using it. In some cases, you may want an IDE, or Independent Development Environment. It lets you edit multiple files at once, and in some cases it will highlight the syntax and show you the errors in the code. But that comes long after you're past the point of being comfortable with the code. That comes first, and that's what this guide wants to do. To get you comfortable with the code. Once you are, you can do whatever you want to do when it comes to editing your scripts. However you choose to do it, is the right way.

    Part II: What You Need To Know About Your System.

    Okay. You've got screenruler running, you opened up your text editor, you're ready to jump right on in, right? Don't. First, you have to know some things. Things like:

    How to download, install, and reload Fonts:
    Simple stuff. From this point on, you will know how to do it. It frustrates some people when they've never done it before and are getting errors with the script. But now you'll know how to do it and that won't be a problem anymore.

    First, locate your home directory. Either in your file manager or in a terminal. It is usually located in:

    /home/yourusername AKA ~/

    Now, make a new directory called .fonts, easiest in a terminal by typing:

    Code:
    mkdir .fonts
    Now whenever you download a new font, put it in that folder. It doesn't matter if you initially download into that directory or somewhere else, as long as you Unzip the fonts you download into the .fonts folder.

    Now you're on the hunt. You need to locate all of the required fonts. A list of the ones you need is in the top of the script, and a quick Google search will find most of them for you. Any of the ones that say something to the effect of ConkyWeather or Ubuntu are more than likely already on your system, or installed with TeoBigusGeekus' weather script. If you use a system other than Ubuntu or it's family, then you might want to look for those fonts anyways. If you're having trouble finding some of them, very often they're also at daFont.com and a quick search there will lead directly to what you need.

    Okay, you've got a .fonts directory, you've downloaded the fonts you need, and you're just jumping up and down mad because the script still isn't showing the fonts right. It's likely because you need to do a font reload. 2 methods. Easiest and fastest, great for the first time use, and the slightly longer, easiest and fastest for continued future tweaking in Conky.

    Method 1: Straight command in a Terminal.
    Code:
    fc-cache -fv
    Method 2: Bash Script Alias
    There's a script in your home directory called .bash_aliases. This lets you create custom command shortcuts on your system by giving them aliases, or nicknames. Whenever you add a new one, or change one, it will be active the next time you reboot. For now, we'll make one that does exactly what that terminal command does, but is easier to remember.

    Go to a terminal and type:
    Code:
    sudo (text editor of choice) .bash_aliases
    And this will open the file. If you don't already have a few in there, add this to the file.

    Code:
    alias fontreload='fc-cache -fv'
    Save the file. After your next reboot, every time you are in a terminal and type “fontreload”, it will perform the same task as fc-cache -fv, namely it will reload all your fonts, adding any new ones you might have added since the last time you did it. And, if “fontreload” doesn't suit you, just change that name to something that does. As long as you know what that is, and .bash_aliases knows what that is, then it will still work for you.

    It is often wise, after adding the required fonts and doing a font reload, to restart Conky if it's running. This is fastest done in a terminal by typing:

    Code:
    sudo killall -SIGUSR1 conky
    Which will shut down and immediately restart all instances of Conky running on the system. It's handy to know.

    Moving on:

    What is your screen resolution? Although the size of your screen is important, the resolution is far more important. Y'see, although it's true that a 19” CRT is a different experience than a 23” LCD, what matters more is the resolution. If you're running at a maximum resolution of 1024X768 on a 17” monitor, you have fewer pixels to work with, and thus less real estate to code in, than if you were using a 17” monitor running at a maximum of, say, 1280X1024.

    To put it bluntly, VinDSL's monitor, and therefore his entire Conky setup, is designed around his 19” monitor, running at 1280X1024 resolution. That means, unless you have the resolution set to exactly 1280X1024 on Your screen, Conky will look Different on your screen than it does on the screenshots VinDSL has posted. It doesn't mean you broke it, or that it's not working right. All the commands (called Conky Objects) within his Conky are laid out to accommodate his 1280X1024 resolution. If some of those objects are placed on a higher resolution screen, there will be large gaps in Conky, and things won't quite line up the way they're shown. On the other hand, if the resolution you use is smaller than 1280X1024, then you will have a lot of what he's got in Conky missing because they're commanded in the script to places that are off your screen somewhere. And, once again, much like the larger resolution situation the alignment of the objects in the code will be slightly off. Fear not, knowing your resolution in comparison to his will tell you where you need to move objects, or change their size, to effectively make his code work for your screen resolution.

    Next, how much RAM do you have? Likewise, what kind of processor are you using? How many hard drives do you have, and do you know where each is mounted? These are questions that you have to ask only because you probably don't have the exact same setup as VinDSL, and perhaps you have to change those sections slightly to suit your own hardware. I'll tell you how later, but first know the information for yourself. Perhaps your processor is a multi-core or hyperthreading design? It won't stop you from having Conky spit out the data for your hardware like it does for VinDSL's hardware. You just have to be aware of your setup so you can add the objects you need into your script as they may be needed. It may cost you some real estate in Conky, but that's half the fun of the system. You make it your own.

    Which Linux OS do you have? Conky works on a lot of systems, and not all of them are specifically Ubuntu. CrunchBang (AKA #!), LinuxMINT, and the Ubuntu derivatives such as Kubuntu, Xubuntu, and Edubuntu are all very common users of Conky, so it may change some things in the code. Perhaps it's just the logo or system info that is different, or in the case of the Ubuntu move to 11.04 and later, it may be the entire sensors section that is done differently now. You just need to know what OS you are currently using. In case it's different than VinDSL's. If you look at his Screenshots, you'll see that he frequently experiments with development releases of Ubuntu. And he does a lot of fiddling around with spacing to accommodate the experiments. This will make your own experience with his script look Different than what he has in his screenshot.


    Part III:What you'll need specifically for VinDSL's Conky itself.

    This, I shouldn't have to put here. But, sometimes this is something people forget to do when asking for help on getting VinDSL's Conky setup. Read His Conky Script From Top To Bottom, Don't Skim. Mostly the top. He has required fonts, required Conky versions, and several versions of TeoBigusGeekus' scripts. When you're there copying and pasting his scripts to your own system, you've already got them open and in front of you, so you might as well read them first.

    Some highlights from the top of his script, formatted in order of the question they would answer, had you read his script first:

    I'm using Ubuntu/Xubuntu/Kubuntu/LinuxMINT/#!/Compiz/ETC. And I can't get VinDSL's Conky to look right. What am I doing wrong?

    Code:
    ####
    ## Development Platforms (current)
    #
    #  Ubuntu 10.10 'Maverick Meerkat' (GNOME 2.28 - Conky 1.8.0)
    #  Ubuntu 12.04 'Precise Pangolin' (GNOME-SHELL - UNITY 2D/3D - Conky 1.8.1)
    #  Screen Resolution: 1280x1024x24 (DELL UltraSharp 1907FP)
    This answers your question. You're using something slightly different than what VinDSL is using. If you're using Xubuntu, Kubuntu, or any OS using Compiz, then you're not using Gnome2 in Ubuntu 10.10, or Gnome-Shell/Unity in Ubuntu 12.04 (His Current Development Release).You can't get it to look the same because you've got to make it look good for your system, not his. It means you've got spacing tweaks to do, and perhaps even some things you just have to give up on trying to do depending on the amount of space you have to work with. For specifics about your Window Manager, ask in the Conky thread directly.

    This section isn't showing at all! What did I do wrong?

    Code:
    ####
    ## Prerequisites (required)
    #
    #  conky-all 1.8.0 or 1.8.1
    #  cURL - Command Line Tool
    #  xsltproc - Command Line Tool
    #  UTF-8 Compatible Text Editor
    This answers your question. You might not have the required programs that VinDSL runs his Conky on. In your repositories, go get conky-all and make sure the version is either 1.8.0 or 1.8.1. As of the writing of this howto, 1.8.0 is the most common and the one most Conky users use these days. It is the one in the Ubuntu official repositories. If you want your weather section to work, you need VinDSL's version of TeoBigusGeekus' weather script. and there is a howto on getting that in that link, including all of it's requirements. It's well laid out and very well coded, so that makes it easy. A UTF-8 Compatible Text Editor you already have, and I already mentioned it earlier. So, you're good there.

    Why don't the fonts look right/Where do I get the fonts? (Very Common question. Simplest answer of all.)

    Code:
    ####
    ## Installed fonts (required)
    #
    #  ConkyWeather (Stanko Metodiev)
    #  Cut Outs for 3D FX (Fonts & Things)
    #  Droid Font Family (Google Android SDK)
    #  KR A Round (Kat's Fun Fonts)
    #  OpenLogos (Icoma)
    #  PizzaDude Bullets (Jakob Fischer)
    #  Radio Space (Iconian Fonts)
    #  StyleBats (Vinterstille)
    #  Ubuntu Font Family (Canonical Ltd)
    #  Ubuntu Title Bold (Paulo Silva - not included in link below)
    #  Weather (Jonathan Macagba)
    Google or daFont.com have most of these. No excuses, just go and get them. Hunt for yourself. There are attempts being made to make a zip file of all of them, but there's no centralized source right now. When there is a reliable source, I will put it here. A very basic version is mentioned here:

    Code:
    ## Tips n' Tricks from Mr. Peachy, djyoung4, and 42dorian (Thanks!)
    ## Most necessary fonts can be downloaded here: http://ompldr.org/vOHdoag
    ## Unzip the fonts into your font folder, for example: /home/username/.fonts
    ## Run this command in a terminal (rebuilds font cache file): sudo fc-cache -fv
    2) The Sections of His Conky:

    Part I: His Script Files.

    So, you want his Conky? You went to his Data Dump post (There's one of them just 3 posts down from this, but it's not the only one on the Forums.) and copied a script or two and are wondering why things are still missing?

    You didn't get them all. VinDSL's Conky has 6 script files that you need.

    1) .conkyrc (The actual conky script.)
    2) draw_bg.lua (That shaded area around his script)
    3) bargraph_small.lua (This puts all of the usage bars next to his CPU and Memory objects.)
    4) vindsl-rangaloo-google-weather-2.0.zip, his weather method (explained in another thread.)
    5) conky-start-delayed.sh (This delays when startup runs Conky so that it doesn't interfere with your other windows. This is sometimes tweaked substantially depending on what Window Manager you're using.)
    6) conky-banshee-pre-load.sh which is an optional script for speeding up the load of Conky by pre-loading Banshee when you use it.


    If you don't have all 5 of the required scripts, you're missing part of it. Copy them all to your system. The location you should copy them to is in their title in the data dump post. There are special instructions in some cases. You need to go to a terminal and make conky-start-delayed.sh executable.

    Code:
    sudo chmod ugo+x conky-start-delayed.sh
    And you need to add that script to your startup applications. How to do that is different depending on whether you're using Gnome, KDE, XFCE4, or something completely different. So, that I leave to you to look up.

    Part II: Conky Itself.

    For this section, you are going to want to open three things, plus run screenruler. The VinDSL Conky Script (.conkyrc), the Conky Environment Variables link, and the Conky Objects link. Looking at the script, object for object, and looking at what that object does in the links, will tell you what you have to change to make things your own. It might be about changing a 1 to a 2, perhaps a spelling mistake, or perhaps it's about making everything line up with what is on your screen. Having them open will help you.

    A) Environment Variables
    For the most part, these things don't change. These are everything above the object called TEXT in the script. These little things can really only change how Conky relates to the rest of the windows on your desktop. If you have a bigger or smaller screen resolution, then certain environment variables will help you to better fit Conky to your screen. This section in VinDSL's Environment Variables (Above TEXT) controls the relationship between Conky and the edges of the screen.
    Code:
    ####
    ## Minimum size of the text area.
    ## Syntax: minimum_size [width] [height]
    #
    minimum_size 240 1394
    
    ####
    ## Maximum width of the text area.
    ## Syntax: maximum_width [width]
    #
    maximum_width 240
    
    ####
    ## Gap between text and screen borders.
    #
    gap_x 6   ## Left / Right
    gap_y 32  ## Top / Bottom
    Now, he has documented what these do rather well. To lengthen what he's said, some of what is in the script itself has a minimum requirement for how much space it needs to show. On 1280X1024 resolution, all of the objects to run the script needed at least 240 pixels in width, 1394 in height, in order to show it all, and it needed to be up from the bottom of the screen by 32 pixels, and left from the right side of the screen by 6 pixels in order to position it correctly for the screen.

    If you have a different screen resolution, these three variables will help you, through changing the actual numbers they have there, in order to make the script fit into the space you want it to be in. Perhaps you don't have the same size of screen as VinDSL? Perhaps your screen resolution is very different than his? Bigger or smaller on either part, you may find yourself wanting the fonts, gaps from the sides and top, or amount of text area to work with to be different for your hardware and eyesight. Modifying any of these variables gives you control over that. Change them until it all fits the way you want it.

    Speaking of Fonts: Right below the prerequisites is this section.
    Code:
    ####
    ## Use XFT? Required to Force UTF8 (see below)
    #
    use_xft yes
    xftfont DroidSans:size=8.75
    xftalpha 0.1
    You see that xftfont? DroidSans:size=8.75. This might not be perfect for your screen, if you use a different resolution, have a bigger monitor than 19”, or just plain can't see it quite right. Changing the number from 8.75 to, say, 10, perhaps 12, will make it much bigger and clearer to see. As long as you know this is what you've done, then it will be easy to know that making the font bigger will mean you need to play with the spacing between objects in order to accommodate the new font size. Nothing is broken after you've changed the number, you just may need to take some time to change the distance between objects to get things lined back up the way you want them.

    A brief issue about Transparency:

    Have a look at how VinDSL is currently using "True" Transparency.
    Code:
    ####
    ## Create own window in instead of using desktop?
    #
    own_window yes
    own_window_transparent yes
    own_window_type normal
    own_window_class conky-semi
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    ####
    ## Some distros also require the following 2 lines.
    #
    own_window_argb_visual yes
    own_window_argb_value 255
    This Environment Variable can cause some problems:
    Code:
    own_window_transparent yes
    Depending on some Window Managers, such as Compiz, XFCE4.6/4.8, or Unity, some of these variables will draw your attention due to how that Window Manager handles transparency. In some cases, such as XFCE4's Compositor, you need to change to using these variables somewhere in the Environment Variables section:

    Code:
    own_window_argb_visual yes
    own_window_argb_value 255
    But this is only if you are having troubles with your Transparency settings. If you are using Compiz, there is a known Pseudo-Transparency problem that will force you to use these if you don't want your background to look weird on you. It's called the Compiz Compositor Pseudo-Transparency Problem. Not a clever name, but, it's the one we've got for it. But, not all Window Managers will have these issues, and as such it's not always necessary. But, you may want to know it anyways.

    Along the same lines, as a part of the Transparency, he is also using shading. This shading looks like this:

    Code:
    ####
    ## Draw shades?
    #
    draw_shades yes
    default_shade_color 292421
    A special note from VinDSL himself: He has found that this shading works best only if you can get the same colour shading as the colour in the background. I would, personally, suggest you disable it and see how it works for you without it. If you like the setup as it is without the shading, keep it, and experiment with both states. Using the shading and without using the shading. As always, it is your own personal preference that matters here.

    B) Colors

    A brief disclaimer: I am myself Colourblind, so I don't see colours properly anyways. I am also Canadian, and spell Colour with a U in there. Conky itself uses the American spelling without the U, so I am writing this tutorial with the U in there, but the code doesn't have it. Try not to get confused or angry at me for this, I'm Canadian. However, besides this, if you don't like the colours used by the script, they're easily changed. This section:

    Code:
    ####
    ## My colors (suit yourself)
    #
    color0 White            #FFFFFF
    color1 Ivory            #FFFFF0
    color2 Ivory2           #EEEEE0
    color3 Ivory3           #CDCDC1
    color4 Tan1             #FFA54F
    color5 Tan2             #EE9A49
    color6 Gray             #7E7E7E
    color7 AntiqueWhite4    #8B8378
    color8 DimGray          #696969
    color9 Tomato           #FF6347
    Controls what colours are used. To read this chart, you need to know there are only two columns. The first is the NAME of the colour when it is called (Far Left), and the other is right next to it called the VALUE of the colour. That "Third Column" is for reference, it does not change anything in Conky. When, somewhere below the TEXT object, VinDSL is calling color0 or color9, he is in fact calling them from this table. If you want the things that color1 or color5 are called to be different, say you want Tan1 to be Pink, or something to that effect, then all you need to do is change where it says Tan1 to Pink. This can be done by name, or by hex value, which you see in the next column. Changing those hex values alone won't do anything, they've been commented out using a # sign. If you wish to use hex values to change the colours, replace the name in the VALUE column with the hex value you wish it to be. If you need to know how to do hex colours, there are plenty of places to help you out. And making your Conky look the way you want it to is the whole purpose of all this code. You are not stuck with VinDSL's colour scheme. Have fun with it.


    C) Lua Script Loading

    VinDSL's two lua scripts get called in Conky like this:

    Code:
    #####
    ## Load Lua for shading (optional)
    ## Set the path to your script here.
    #
    lua_load ~/.conky/draw_bg.lua
    lua_draw_hook_pre draw_bg
    
    ####
    ## Load Lua for bargraphs (required)
    ## Set the path to your script here.
    #
    lua_load ~/.conky/bargraph_small.lua
    lua_draw_hook_post main_bars
    This means that this is how you tell Conky that those two scripts contain information you want loaded. To change what they do, you will be editing those scripts, and not Conky directly.

    D) The TEXT Object

    This is where the actual code begins. As such, it is very helpful if you have the Conky Objects link open from here on out, so you can look back and forth between this howto, the code itself, and what all the objects mean as they're described in the link. Everything above this set up the Conky window, everything below this is what you put in the Conky window. Things like the following:

    E) The Ubuntu Logo

    Feel free to change some of this to suit your personal setup.

    Code:
    ##################################
    ##             LOGO             ##
    ##################################
    ## Uncomment for hard-coded ID (static)
    ${voffset -33}${font OpenLogos:size=103}${color2}v${font}${voffset -76}${goto 179}${font UbuntuTitleBold:size=19.6}${color4}1${offset 1}2${offset 1}.${offset 0}0${offset 0}4${font}
    ####
    ## Uncomment for soft-coded ID (dynamic)
    # ${voffset -33}${font OpenLogos:size=103}${color2}v${font}${voffset -76}${goto 179}${font UbuntuTitleBold:size=19.6}${color4}${pre_exec cat /etc/*release | grep 'RELEASE' | awk -F'=' '{print $2}'}${font}
    ####
    ## Additional ID (branch version, code name, release date, etc.)
    ${voffset -1}${goto 188}${font Ubuntu-B:size=8.1}${color4}alpha 1${font}
    First off, there are two ways being shown here. One is “Hard Coded” ID, which you have to manually change every time your version of Ubuntu differs from VinDSL's, the other is “Soft-Coded” which pulls your version number and title from a program on your computer called “lsb-release” somewhere in the /etc folder. They are both usable as long as you take the # out of the way of the one you want to use. There is just one # in front of that line, where the comments/documentation have at least 2 of them or more. In this example I've used, the hard-coded version is “12.04”, the expected release for April 2012. If this isn't the version you use, you will have to change it to the one you do, indeed, use. Likewise, if you just want to pull the name and number off the system you're using, comment out the Hard-Coded option using a single #, and remove the # from the Soft-Coded line.

    What he's done is used the object ${voffset}, which you can read about in the Conky Objects link, to move everything vertically, up by 33 pixels. If the – wasn't there, it would move it down by 33 instead.

    Next, he went to the font OpenLogos to create the Ubuntu logo, with the catch phrase embedded in the character. He called ${color2} from his Colour Table to change the colour of what he's doing, and then the letter v in that font gives the Ubuntu logo instead of the actual letter v. Immediately after that, he uses the ${font} object to return what follows it to the default font. After that follows the ${voffset} object again, this time moving everything up 76 pixels, and a ${goto} object to position what follows at exactly 179 pixels from the left edge of the Conky window. He went with the UbuntuTitleBold font, at size 19.6, and a series of ${offset} objects to exactly lay out the version numbers for 12.04. This may differ for you, and there are other ways to do this, which you can get to with other calls. But for now, that is just a description of how he did it. How best to use the ${voffset}, ${offset} and ${goto} objects will be described in the Conky Objects link. These three are used all throughout the rest of the script, so getting to know what each of them does will help you follow along.

    Please note here: If using the Soft-Coded version, you may in fact have some positioning issues that the other method doesn't have. The other method precisely places each digit of the version number exactly in relation to the last. The soft-coded version spits out the value from a text file, as it is. Also, if you are using a different version of the Ubuntu family, Xubuntu/Kubuntu/Lubuntu/Etc., then the soft method may still spit out Ubuntu. This will mean you might have to hard code it anyways, or keep a different file somewhere on your drive that has the accurate data in it. I won't describe that here, but it is a possibility for you.

    F) System Info

    Code:
    ##################################
    ##            SYSTEM            ##
    ##################################
    ${voffset 7}${font DroidSans:bold:size=8.25}${color4}SYSTEM${offset 8}${color8}${voffset -2}${hr 2}${font}
    # ${voffset 4}${font OpenLogos:size=10}${color2}u${voffset -4}${font DroidSans:size=8.6}${color3}${offset 5}${pre_exec lsb_release -sd || cat /etc/*release}${font}
    ${voffset 2}${offset -2}${font OpenLogos:size=12}${color2}Z${voffset -4}${font DroidSans:size=8.6}${color3}${offset 3}${sysname}${offset 3}${kernel}${alignr}${font DroidSans:size=8.3}${machine}${font}
    ${voffset 2}${font StyleBats:size=10}${color2}d${voffset -2}${font DroidSans:size=8.6}${color3}${offset 5}nVidia GeForce 7600 GT${alignr}${font DroidSans:size=8.3}${pre_exec dpkg --status nvidia-current | grep Version | cut -f 1 -d '-' | sed 's/[^.,0-9]//g'}${font}
    ${voffset 2}${font StyleBats:size=10}${color2}A${voffset -1}${font DroidSans:size=8.6}${color3}${offset 5}Intel${offset 3}P4${offset 3}Extreme${offset 3}Edition${alignr 1}${font DroidSans:size=8.3}${freq_g cpu0}${offset 1}GHz${font}
    ${voffset 2}${font StyleBats:size=10}${color2}q${voffset -1}${font DroidSans:size=8.6}${color3}${offset 5}System${offset 3}Uptime${alignr}${font DroidSans:size=8.3}${uptime_short}${font}
    Similar to the logo section, there are a lot of spacing objects. ${voffset}, ${offset}, and font sizes. Adjust these according to your personal setup, unless they all line up perfectly first shot. To know what each and every object in this section does, just read them directly from the Conky Objects link. If I was to break it down as much as I did with the logo section, it would take too long. This section, probably for the best, is left to your own looking.

    A Special note for Laptop and Netbook owners: Your processor may have CPU Throttling. If the manufacturer or builder of your machine has used a processor that allows it, then your system may turn down the speed of your processor when it's on battery, or just to save power. This will result in this system section reporting that your CPU speed is slower than the speed you bought. This can really only be remedied permanently by going into your computer's BIOS and disabling CPU Throttling. It is in a different place on some BIOS programs than others, so I leave this operation to you to do at your own discretion. If you are not comfortable editing your BIOS, or don't know how, you may want someone else to do it for you, or walk you through it. This is not for me to do, but this is a very common cause for the effect. If your CPU's speed isn't being registered properly, this is the first place you should look.


    G) Processor Info
    Code:
    ##################################
    ##          PROCESSORS          ##
    ##################################
    ${voffset 4}${font DroidSans:bold:size=8}${color4}PROCESSORS${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset 4}${font StyleBats:size=9.9}${color2}k${voffset -2}${font DroidSansFallback:size=8.39}${color3}${offset 2}CPU1${offset 5}${font DroidSans:size=8.3}${cpu cpu1}%${font}
    ${voffset 2}${font StyleBats:size=9.9}${color2}k${voffset -2}${font DroidSansFallback:size=8.39}${color3}${offset 2}CPU2${offset 5}${font DroidSans:size=8.3}${cpu cpu2}%${font}
    Here's two tips for you on this section.

    First, if you have only 2 CPU cores, there's nothing to change or worry about besides spacing. If you have a newer processor with more cores, or an older processor with only one, then you will be deleting the second CPU readout (beginning at the ${voffset 2} object) to reduce it down to a single core, or copying and pasting the second CPU readout until you have a listing for all of the cores you've got in the system. The only difference between having 2 cores and having 4 cores is the number of the cpu. The object called ${cpu cpu1} calls the percentage of use that CPU1 is using right now. To get the activity of whatever CPU Core you're looking for, it's a number between 1 and the maximum number of cores. Intel has a Hexacore processor right now, that's 6 cores. To get all of them, you need one ${cpu} object for each of cpu1 through cpu6. Some systems, knowing your own hardware, will start that at cpu0, and the only difference you need to know is whether cpu0 or cpu1 is your first core. It is easily tested if you have problems.

    Second, this section has a corresponding section in the bargraph_small.lua script. The same tip as the first one applies to bargraph_small.lua except that it's in lua code, not in Conky. It looks remarkably like this:

    Code:
    {       --[ Graph for CPU1 ]--
                            name="cpu",
                            arg="cpu1",
                            max=100,
                            alarm=50,
                            alarm_colour={0xFF0000,0.72},
                            bg_colour={0xFFFFFF,0.25},
                            fg_colour={0x00FF00,0.55},
                            mid_colour={{0.45,0xFFFF00,0.70}},
                            x=82,y=156,
                            blocks=55,
                            space=1,
                            height=2,width=5,
                            angle=90,
                            smooth=true
                            },
                    {       --[ Graph for CPU2 ]--
                            name="cpu",
                            arg="cpu2",
                            max=100,
                            alarm=50,
                            alarm_colour={0xFF0000,0.72},
                            bg_colour={0xFFFFFF,0.25},
                            fg_colour={0x00FF00,0.55},
                            mid_colour={{0.45,0xFFFF00,0.70}},
                            x=82,y=170,
                            blocks=55,
                            space=1,
                            height=2,width=5,
                            angle=90,
                            smooth=true
                            },
    Same tip as before, copy and paste or delete everything between the curly braces of the second CPU graph, which I've highlighted in blue, to just below it, and just change the cpu number. What is special here, is that this will draw a new bar, and you need to position it lower, so it lines up with the new CPU readouts you've created. The section in the blue, namely the thing that says “y=170”, controls this. To line it up lower down to match it's corresponding object in Conky, just measure where that spot on Conky where it lines up using Screenruler. Screenruler has a little menu that will let you rotate it vertically. Line it up with the top of your Conky and expand screenruler until you can read off the number of the pixels where you want the new bargraph to go. Then, simply change the “y=170” on the new section to the number you find on Screenruler, and the new bargraph will be drawn there. Repeat as many times as you have CPU cores. And remember, this will change how much space you have for the rest of your Conky script, so be aware of the loss or gain of space you just caused. If you have the space, or not quite enough, you can change font sizes and even the size of all the bargraphs by changing their height and width in their configurations. Where it says “height=2,width=5”, you can change them to other numbers, depending on how much space you need to recover and how much you're willing to use them. Specifically the height and width of this lua script control the size of each little block that the bargraph is made of. If you want a longer bar, but you want the blocks it's made of to stay the same size as you have them, then change the variable “blocks=55” to a number with more blocks in it. Play with it until you get it the way you like it.

    H) Memory Info
    A very simple section, really only one variable and a corresponding configuration in bargraph_small.lua. There is nothing new here, just the same spacing and size objects to look at.

    Code:
    ##################################
    ##            MEMORY            ##
    ##################################
    ${voffset 5}${font DroidSans:bold:size=8}${color4}MEMORY${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset 4}${font StyleBats:size=10}${color2}l${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 3}RAM${goto 97}${font DroidSans:size=8.3}${mem}${goto 133}/${offset 5}${memmax}${alignr}${memperc}%${font}
    Code:
                    {       --[ Graph for Memory ]--
                            name="memperc",
                            arg="",
                            max=100,
                            alarm=50,
                            alarm_colour={0xFF0000,0.72},
                            bg_colour={0xFFFFFF,0.25},
                            fg_colour={0x00FF00,0.55},
                            mid_colour={{0.45,0xFFFF00,0.70}},
                            x=15,y=220,
                            blocks=77,
                            space=1,
                            height=2,width=5,
                            angle=90,
                            smooth=true
                            },
    Again, in regards to spacing issues, you can grow, shrink, or move this section with the same variables as the CPU section. “x=15,y=220” to move right and left on the x axis, or up and down on the y axis. “height=2,width=5” to control the height and width of the bar itself, and “blocks=77” to control how much of that bar you show.

    Important to note that this memory section can only see what your BIOS reports. If your memory is not being reported properly, it may be a problem with your BIOS, and that is where you should look for a solution.

    I) Hard Drive Info

    Code:
    ##################################
    ##             HDD              ##
    ##################################
    ${voffset 15}${font DroidSans:bold:size=8}${color4}HDD${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset 6}${font StyleBats:size=9.9}${color2}x${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 4}ROOT${goto 95}${font DroidSans:size=8.3}${fs_used /}${goto 133}/${offset 5}${fs_size /}${alignr}${fs_free_perc /}%${font}
    ${voffset 15}${font StyleBats:size=9.9}${color2}x${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 4}HOME${goto 95}${font DroidSans:size=8.3}${fs_used /home}${goto 133}/${offset 5}${fs_size /home}${alignr}${fs_free_perc /home}%${font}
    ${voffset 15}${font StyleBats:size=9.9}${color2}4${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 4}SWAP${goto 95}${font DroidSans:size=8.3}${swap}${goto 133}/${offset 5}${swapmax}${alignr}${swapperc}%${font}
    ##################################
    Code:
                    {       --[ Graph for Root ]--
                            name="fs_used_perc",
                            arg="/",
                            max=100,
                            alarm=50,
                            alarm_colour={0xFF0000,0.72},
                            bg_colour={0xFFFFFF,0.25},
                            fg_colour={0x00FF00,0.55},
                            mid_colour={{0.45,0xFFFF00,0.70}},
                            x=15,y=267,
                            blocks=77,
                            space=1,
                            height=2,width=5,
                            angle=90,
                            smooth=true
                            },      
                    {       --[ Graph for Home ]--
                            name="fs_used_perc",
                            arg="/home",
                            max=100,
                            alarm=50,
                            alarm_colour={0xFF0000,0.72},
                            bg_colour={0xFFFFFF,0.25},
                            fg_colour={0x00FF00,0.55},
                            mid_colour={{0.45,0xFFFF00,0.70}},
                            x=15,y=295,
                            blocks=77,
                            space=1,
                            height=2,width=5,
                            angle=90,
                            smooth=true
                            },      
                    {       --[ Graph for Swap ]--
                            name="swapperc",
                            arg="",
                            max=100,
                            alarm=50,
                            alarm_colour={0xFF0000,0.72},
                            bg_colour={0xFFFFFF,0.25},
                            fg_colour={0x00FF00,0.55},
                            mid_colour={{0.45,0xFFFF00,0.70}},
                            x=15,y=323,
                            blocks=77,
                            space=1,
                            height=2,width=5,
                            angle=90,
                            smooth=true
                            },
    Listen, and listen carefully. Don't get confused by the fact that VinDSL has a different number for his / partition than he does for his /home partition. It's very common to have different partitions mounted in these two places. I, myself, do it. It keeps your settings separate from your system, and makes upgrades much easier, safer, and faster. If you are Not doing this, then you need to know what drives you do have, so that this section can be changed to suit them. Everyone has a / partition, because that is where the main system files are always located. If you don't have your /home partition separate, then you may want to change the /home variable to a place you do have. Perhaps you have another hard drive, with another name, or some USB drives, or perhaps nothing but the / and swap partitions in your system. In that last case you will want to delete the section called /home from your Conky script. I have highlighted it in blue for your convenience. There is nothing different in the spacing of this section, so all the same things that were said about the past two sections hold true here.

    J) Top Processes

    What is this, you ask? These are the top users of processor power on your system. The programs that are running your system the hardest at any given second. It gauges what order they go in by how much memory they use.

    Code:
    ##################################
    ##         TOP PROCESSES        ##
    ##################################
    ${voffset 15}${font DroidSans:bold:size=8}${color4}TOP PROCESSES${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset 6}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 1}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 1}${alignr}${top_mem mem 1}%${font}
    ${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 2}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 2}${alignr}${top_mem mem 2}%${font}
    ${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 3}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 3}${alignr}${top_mem mem 3}%${font}
    # ${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 4}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 4}${alignr}${top_mem mem 4}%${font}
    # ${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 5}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 5}${alignr}${top_mem mem 5}%${font}
    # ${voffset 1}${font StyleBats:size=10}${color1}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 6}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 6}${alignr}${top_mem mem 6}%${font}
    What is very important here is the number of them. Listed here are the top 6 memory-hungry processes on your system. If you are one of the people who are looking at this script, looking at their own configurations, and noticing they are running out of room to put things very quickly, then this section is a very good candidate to be cut out. VinDSL himself put in a comment on the last 3 to leave them optional. If you are running out of room at this point in the script, then it is a good idea to either keep his comment characters in, or reduce the number of results from 6 to 3 permanently. Or, if that isn't enough to free you some room, I do suggest cutting this section entirely.

    K) Network Info

    Code:
    ##################################
    ##           NETWORK            ##
    ##################################
    ${voffset 4}${font DroidSans:bold:size=8}${color4}NETWORK${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset 4}${font PizzaDudeBullets:size=9.5}${color6}T${font DroidSans:size=8.65}${color3}${offset 5}Download${goto 120}${font DroidSans:size=8.3}${totaldown eth0}${alignr}${font DroidSans:size=8.3}${downspeed eth0}${font}
    ${voffset 0}${font PizzaDudeBullets:size=9.5}${color6}N${font DroidSans:size=8.65}${color3}${offset 5}Upload${goto 120}${font DroidSans:size=8.3}${totalup eth0}${alignr}${font DroidSans:size=8.3}${upspeed eth0}${font}
    ${voffset 4}${font PizzaDudeBullets:size=9.5}${color6}a${font DroidSans:size=8.65}${color3}${offset 5}Private${offset 3}IP${goto 123}${font DroidSansFallback:size=8.5}LAN${alignr}${font DroidSans:size=8.3}${addr eth0}${font}
    ${voffset 0}${font PizzaDudeBullets:size=9.5}${color6}a${font DroidSans:size=8.65}${color3}${offset 5}Public${offset 7}IP${goto 121}${font DroidSansFallback:size=8.5}WAN${alignr}${font DroidSans:size=8.3}${execi 1800 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}${font}
    This is pretty straight forward. All the same spacing issues, all the same variables controlling it. By this point in reading the script, you should know how to use them.

    Now, there are a few oddities in this one. The Dowloaded and Uploaded variables, for instance, only show you how much has been uploaded or downloaded while the system has been on and active this time around. If you would like a more long-term way to track your bandwidth use, you need a program called VNSTAT. And to integrate it into this script is very easy, but is easier to explain if you ask in the Conky Thread.

    Along similar lines, VinDSL has taken a longer, roundabout way to get your public IP address than you need to. Where I have highlighted in red, it can be changed to the simple object ${addr xxxx} the x-es being a placeholder for the network adapter you use to connect. Admittedly, this is mostly true only for computers that are connected directly to the internet via a modem of some sort, but that roundabout way is only necessary when your reported Internet IP address is the outside IP of your network's router.

    My own, personal view of this section is if you only have a network IP address, you don't really need to report your outside IP address to yourself. And if you get as hooked on Conky as the rest of us have got ourselves hooked, then all you're doing by reporting it to yourself is creating an extra step for yourself when you show off a screenshot to the rest of us. We tend to blur out our IP addresses when we show off, for security's sake. If you don't actually have an Internet or Public IP address, there's no real need to show it at all.

    L) Weather WARNING!!! As of November 15th, 2011, this current code for Weather will be completely null and void. Weather.com is changing how it does things, and this code Will Not Work and you will not be able to sign up for a new Weather.com partner account. VinDSL has turned to something new for weather. And he details it here for both Imperial and Metric

    It should be noted that you will now be doing your weather by that method, and not the old conkyForecast method. Imperial or Metric, you should start with that first link and adjust what needs to be adjusted for metric by going to the metric instructions there.

    I will, personally, say that it is probably going to be better if you go to that thread's first page and try one of the main scripts. VinDSL has gone with a Google API with limitations. If you want to customise Conky best to your own needs, this is NOT a good way to do it.

    M) Time Section

    Code:
    ##################################
    ##             TIME             ##
    ##################################
    ${voffset 4}${font DroidSans:bold:size=8}${color4}TIME${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset -4}${font RadioSpace:size=32}${color3}${if_match ${time %l}<=9}${alignc 7}${time %l:%M%p}${else}${if_match ${time %l}>=10}${alignc -1}${time %l:%M%p}${endif}${endif}${font}
    What VinDSL has done here is create a simple clock that changes it's position ever so slightly when the hours are less than 10. So, if it is before 10AM or 10PM in 12 hour format, then a clock with a single digit hour will be moved slightly so it is centred better. In a way, it's a bit like over-engineering, but that is his style. You can choose to keep it or not, but that is at least what he's done. If you want to change or play around with what does or does not get displayed in the clock, look up what all those % objects mean by searching Google or Wikipedia for PHPSTRFTIME. It's a straight substitution for anything you want to display.

    N) Calendar Section

    Code:
    ##################################
    ##      CALENDAR (5-Line)       ##
    ##################################
    ${voffset 4}${font DroidSans:bold:size=8}${color4}DATE${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset 18}${font DroidSansMono:size=7.55}${color3}${alignc 60}${time %A}${font}
    ${voffset -4}${font DroidSansFallback:bold:size=18}${if_match ${time %e}<=9}${color5}${alignc 65}${time %e}${font}${else}${if_match ${time %e}>=10}${color5}${alignc 60}${time %e}${endif}${endif}${font}
    ${voffset 0}${font DroidSansMono:size=7.55}${color3}${alignc 60}${time %B}${font}
    ${voffset 0}${font DroidSansMono:size=7.6}${color3}${alignc 60}${time %Y}${font}
    ${voffset -83}${font CutOutsFor3DFX:size=67}${color8}${alignc 99}2${font}
    ####
    ## Uncomment for Conky 1.8.0 (use mono fonts only)
    # ${voffset -68}${font DroidSansMono:size=7.55}${color3}${execpi 60 VinDSL_Cal_9=`date +%-d`; cal -h | sed -e 's/\r//g' -e 's/^/ /g' -e '1d' -e s/^/"\$\{offset 100"\}/ -e 's/\<'"$VinDSL_Cal_9"'\>/${color4}&${color3}/'}
    ####
    ## Uncomment for Conky 1.8.1 (use mono fonts only)
    ${voffset -64}${offset 100}${font DroidSansMono:size=7.55}${color3}${execpi 60 VinDSL_Cal_9=`date +%-d`; cal -h | sed -e 's/\r//g' -e 's/^/ /g' -e '1d' -e 's/\<'"$VinDSL_Cal_9"'\>/${color4}&${color3}/'}
    Here is where VinDSL gets very experimental. There are spacing differences between Conky version 1.8.0 and version 1.8.1. In this calendar section, he attempts to get either one working properly for you. The idea is to comment out the one you don't have. 1.8.0 is in blue here, and 1.8.1 in red. You only actually need one of the two in your script, but VinDSL has made an attempt to accommodate all the many people who keep copying his script.

    Special note: Alongside this calendar is a date box. It has a box around it, and says the specific day in words and numbers. That box is actually a number 2 in a special font called CutOutsFor3DFX, and it is one of the fonts you were sent to find before you started this howto. If you didn't find it, or didn't reload your fonts the way you were told, the date box will have a big number 2 written over it, and you'll be kinda stumped. Don't be. Go back to the beginning of this howto, and re-read the steps for getting and installing the fonts for VinDSL's Conky.

    Special Special note: Do you want your weeks to begin on Monday? VinDSL has a version of this calendar for you, with help from our friend stinkeye! Simply replace the execpi call for the calendar with this line here:

    Code:
    ${execpi 60 VinDSL_Cal_9=`date +%-d`; ncal -M -C -h | sed -e 's/\r//g' -e 's/^/ /g' -e '1d' -e 's/\<'"$VinDSL_Cal_9"'\>/${color4}&${color3}/'}
    O) Music Players (Experimental)

    If you are using a music player, and want to know what is running, and how far along the song is, then this Music Player section of VinDSL's Conky script is for you. However, if you do not use Rhythmbox or Banshee music players, then you can skip straight over this section.

    O1) Rhythmbox

    Code:
    ##################################
    ##   RHYTHMBOX (Experimental)   ##
    ##################################
    ${if_running rhythmbox}
    ${voffset -8}${font DroidSans:bold:size=7.75}${color4}RHYTHMBOX${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset 8}${font DroidSans:size=8.25}${color3}${if_match "${execpi 2 expr length "`/usr/bin/rhythmbox-client --print-playing-format %tt | head -n 1`"}" >= "48"}${alignr 15}${scroll 38 4* ${execi 2 rhythmbox-client --print-playing-format %tt --no-start}}${font}${else}${alignc}${execi 2 rhythmbox-client --print-playing-format %tt --no-start}${font}${endif}${endif}
    ##################################
    All this section does is check to see if Rhythmbox is running, if so, it tells you what song is playing by executing a certain program and grabbing the output in text to show in Conky.

    O2) Banshee (The Experimental Part)

    Code:
    ##################################
    ##    BANSHEE (Experimental)    ##
    ##################################
    ${if_running banshee}
    ${voffset -10}${font DroidSans:bold:size=7.75}${color4}BANSHEE${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset 4}${font DroidSans:size=8.25}${color3}${if_match "${execpi 2 expr length "`/usr/bin/banshee --query-title --no-present | cut -f1- -d " "`"}" >= "48"}${alignr 15}${scroll 38 4* ${execi 2 banshee --query-title --no-present | cut -f2- -d " "}}${font}${else}${alignc}${execi 2 banshee --query-title --no-present | cut -f2- -d " "}${font}${endif}${endif}
    This is the exact same as the Rhythmbox section, but with the program Banshee instead.



    3) Getting Further Help.

    Okay, that is the breakdown and howto on every section of VinDSL's Conky, but it is only a breakdown of how He did it. Although he will maintain a permanent data dump post, (down three posts from this one right now.) You will not be limited to just his code and his way of doing things. If you have an idea, a craving, or just a plain old question about different things to do to Conky than what you see here, then don't hesitate to ask the pros at The Conky Thread. which is listed in the Community Cafe forums as “Post your .conkyrc files w/ screenshots” and, as of the writing of this howto (Version 2.0 now), it was 1904 pages long. Filled with examples, howto's and any number of arguments about Conky, how it works, and snips of code for you to steal and integrate into your script. And I will say, right now, that if you have read through this HowTo and are still stuck by something you can't see? Feel free to ask for help in that Conky Thread. But, if you do need our help there, you need to post your code as you have it so we can see where you've changed it. We don't know automatically what, exactly, goes wrong just by looking at a screenshot of it. If you need to post your code, don't attach the file. It is far easier to use CODE TAGS. They look kind of like this [ CODE ] [ /CODE ], except you would take the spaces out from between the brackets and the words CODE and /CODE. This makes it easy for anyone who comes along in that thread to tinker with your code right there in the thread, and not only show you how to fix it, but use it as an example for others who might have the same problem you're having.

    What is most important is that you keep trying. Experiment and have fun. There is so much more to Conky than just what VinDSL has done, so don't feel afraid to try new things. By this point, you should be reading all of the Conky Objects and seeing what you can get up to. Congratulations! You're no longer a newbie to Conky. You at least know “Something” and can't say it's “Nothing at all” anymore. You're well on your way to feeding your addiction to the tiny tweaks and new code that come with your new Conky toy.
    Last edited by 42dorian; May 29th, 2012 at 06:58 PM. Reason: Version 2.0 Active. 01/07/2012, Version 2.1 Active (Transparency and Shading) 01/08/2012.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •