Latest conky update

I spent several hours working on my conky script, bouncing between three machines to make sure it was displaying everything right. I think I finally have it the way I want it. I did make a new comment to conky modifications but that was before I finished for the day.

I added a line to the script to display the processor make and model information, placing it at the top of the PROCESSOR section. It uses grep, sed, and cut to get a string out of the /proc/cpuinfo file. The line will probably needed to be edited to get a string of the proper length for your processor name.  You’ll need to view the cpuinfo file to see how many characters you’ll need to adjust the ‘cat -c 1-xx’ at the end of the line. Or you can run the full command in a terminal, trying different values. You can open it in gedit and copy the command to the clipboard and paste into your terminal using Ctrl-Shift-V.

I also added a few lines to give a numerical and bar graph display of battery power remaining. In the script I have on the web page and the conkyrc.txt file, these lines are commented out. If you’re running the script on a laptop, just remove the hashtags from the appropriate lines.  I wasn’t able to find a reliable way for the script to determine if a battery existed.

I cleaned up the NETWORK section so that the LAN and WLAN displays were consistent and to generally clean things up. I’ve noticed that if my Internet connection is down, the Public IP line will just drop from the display when conky refreshes. For wireless connections my online script had lines to display SSID and Connection quality but they were missing from the actual script I was running on my laptop. I was endeavoring for consistency among my own systems as well.

As always, I updated My Conky Configuration page with the revised script along with the updated conkyrc.txt file and a new screen shot. Below are the conky displays for my laptop and my main desktop PC. This should give you some idea of how it looks.

Advertisements

2 Responses

  1. I found a way for my conky script to check for the presence of a laptop battery in an Ubuntu/Mint system.

    I changed the section for the batter information to read:

    ${if_existing /sys/class/power_supply/BAT0/present} ${font sans-serif:bold:size=8}BATTERY ${hr 2}
    $alignr${battery_percent BAT0}% remaining
    ${battery_bar}${battery_percent BAT0}
    ${endif}

    I added the if_existing … and endif statements to the existing code.

    I successfully tested this on my Linux Mint systems (2 desktops and a laptop). Of course, you’ll need to check your own system to confirm file locations and names.

    This applies to Linux kernel 2.6.24 and newer which should be most Ubuntu and Mint system. Previous kernels used /proc/ to store ACPI information.

  2. I did a little editing of the web page, moving some commentary from the beginning to notes at the bottom of the page.

    I ran a test of the wget command to download the .conkyrc file and it worked as expected..

    I finally found a wget example that allows me to run wget from my home directory and download the conky.desktop file to the autostart folder. I tested it and it seems to work fine.

    I’ve got an old computer on which I’m going to install LInux and I’ll test the bash script with it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: