Author Topic: Conky for your linux desktop  (Read 3799 times)

0 Members and 1 Guest are viewing this topic.

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Conky for your linux desktop
« on: July 10, 2012, 12:43:53 pm »
Conky is a program that draws operating system data and other user or script supplied information to the main desktop. This program if very generic yet flexible; you can modify it's .conf to do almost whatever you want. You can have conky run programs or scripts specified in the .conf that run at either the standard update rate(which is 1000ms) or you can have your scripts run at user-defined time intervals. I found this feature of conky useful when I decided to make a couple python scripts to grab the local temperature and weather conditions from kktv's website.

Here's my conky.conf if you care to use it as a base for modification:
Code: (bash) [Select]
# Conky, a system monitor, based on torsmo
#
# Any original torsmo code is licensed under the BSD license
#
# All code written since the fork of torsmo is licensed under the GPL
#
# Please see COPYING for details
#
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

alignment top_right
background no
border_width 1
cpu_avg_samples 2
default_color darkcyan
default_outline_color black
default_shade_color darkcyan
draw_borders no
draw_graph_borders no
draw_outline yes
draw_shades no
use_xft yes
xftfont Droid Sans Mono:size=12
gap_x 5
gap_y 60
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
own_window_type normal
stippled_borders 0
update_interval 1
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no

# Added
double_buffer yes
own_window_transparent yes
own_window_hints undecorate,below,sticky,skip_taskbar,below

TEXT
${color darkcyan}Hostname: ${exec hostname}
${color darkcyan}Uptime:$color $uptime
${color darkcyan}Processes:$color $processes  ${color darkcyan}Running:$color $running_processes

${color darkcyan}    Colorado Springs
${color darkcyan}Temperature: ${execi 300 python ~/bin/temp.py}       
${color darkcyan}Conditions: ${execi 300 python ~/bin/weather.py}

${color darkcyan}RAM Usage:$color $mem/$memmax
${color darkcyan}$memperc% ${membar 4}

${color darkcyan}Swap Usage:$color $swap/$swapmax
${color darkcyan}$swapperc% ${swapbar 4}

${color darkcyan}CPU Usage:
${color darkcyan}$cpu% ${cpubar 4}
${color darkcyan}${cpu cpu1}% ${cpubar cpu1 4}

${color darkcyan}File systems:
 / $color${fs_used /}/${fs_size /} ${fs_bar 6 /}

${color darkcyan}eth0: ${execi 300 ~/bin/showmac.sh eth0}

Up:$color ${upspeed eth0}
$color ${upspeedgraph eth0 7,225}
Down:$color ${downspeed eth0}
$color ${downspeedgraph eth0 7,225}

${color darkcyan}wlan0: ${execi 3 ~/bin/showmac.sh wlan0}

Up:$color ${upspeed wlan0}
$color ${upspeedgraph wlan0 7,225}
Down:$color ${downspeed wlan0}
$color ${downspeedgraph wlan0 7,225}

I modified the default to look a bit different. I also enabled transparency and fixed a flickering issue by enabling double buffering and changing a few other settings that are hard to find(thanks google). A screen shot is attached corresponding to the conky.conf provided. I hope you find this program as useful as I do.





Offline Axon

  • VIP
  • King
  • *
  • Posts: 2047
  • Cookies: 319
    • View Profile
Re: Conky for your linux desktop
« Reply #1 on: July 10, 2012, 07:33:40 pm »
What is the distro you are using?

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Conky for your linux desktop
« Reply #2 on: July 11, 2012, 05:06:00 am »
I'm using linux mint 13 cinnamon and it's bloated as shit(anything straight debian runs significantly faster); however it has all the bells and whistles I need.

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: Conky for your linux desktop
« Reply #3 on: July 11, 2012, 08:13:35 am »
« Last Edit: July 11, 2012, 08:15:40 am by LuciD »
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Conky for your linux desktop
« Reply #4 on: July 11, 2012, 12:32:50 pm »
Very nice, I like your set up way better. Are you using straight arch linux?

Offline Axon

  • VIP
  • King
  • *
  • Posts: 2047
  • Cookies: 319
    • View Profile
Re: Conky for your linux desktop
« Reply #5 on: July 11, 2012, 01:06:19 pm »
LuciD, the conky is awesome and the docky also looks awesome. I think this is ArchBang you are using? Right.

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: Conky for your linux desktop
« Reply #6 on: July 12, 2012, 02:24:35 am »
Thank you sir  :D . But no I use full-fledged Arch Linux

@ frog...or whoever actually. I could post my .conkyrc if you want
« Last Edit: July 12, 2012, 02:25:56 am by LuciD »
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Conky for your linux desktop
« Reply #7 on: July 12, 2012, 10:58:56 am »
Thank you sir  :D . But no I use full-fledged Arch Linux

@ frog...or whoever actually. I could post my .conkyrc if you want

Yea, can I check out your .conkyrc?

Offline Lionofgod

  • Knight
  • **
  • Posts: 164
  • Cookies: 6
    • View Profile
Re: Conky for your linux desktop
« Reply #8 on: July 12, 2012, 06:28:55 pm »
Lucid... Post that wallpaper!!!

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: Conky for your linux desktop
« Reply #9 on: July 12, 2012, 09:49:09 pm »
Here ya go:

Code: [Select]
background yes
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 0.5
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 250 5
maximum_width 200
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color gray
default_shade_color blue
default_outline_color blue
alignment top_right
gap_x 10
gap_y 10
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer yes
text_buffer_size 256

TEXT



${font Neuropolitical :size=20}${color Ivory}THE${color Blue}BOX

${voffset -90}
${color DimGray}
${font}
${font Neuropolitical:bold:size=10}${color Blue}SYSTEM ${color DarkSlateGray} $$
$font${color DimGray}$sysname $kernel $alignr $machine
Uptime $alignr${uptime}
File System $alignr${fs_type}

${font Neuropolitical:bold:size=10}${color Blue}PROCESSORS ${color DarkSlateGra$
$font${color DimGray}CPU  ${cpu cpu1}% ${cpubar cpu1}

${font Neuropolitical:bold:size=10}${color Blue}RAM ${color DarkSlateGray}${hr $
$font${color DimGray}MEM $alignc $mem / $memmax $alignr $memperc%
$membar

${font Neuropolitical:bold:size=10}${color Blue}HDD ${color DarkSlateGray}${hr $
$font${color DimGray}/home $alignc ${fs_used /home} / ${fs_size /home} $alignr $
${fs_bar /home}

${font Neuropolitical:bold:size=10}${color Blue}TOP PROCESSES ${color DarkSlate$
${color DimGray}$font${top_mem name 2}${alignr}${top mem 2} %
$font${top_mem name 3}${alignr}${top mem 3} %
$font${top_mem name 4}${alignr}${top mem 4} %
$font${top_mem name 5}${alignr}${top mem 5} %

${font Neuropolitical:bold:size=10}${color Blue}NETWORK ${color DarkSlateGray}$$
$font${color DarkSlateGray}IP on wlan0 $alignr ${addr wlan0}

${color Cyan} ${upspeedgraph wlan0 7.225}
${color DimGray}Down ${downspeed wlan0}
${color Cyan} ${downspeedgraph wlan0 7,225}
$font${color DarkSlateGray}IP on eth0 $alignr ${addr eth0}

${color DimGray}Up ${upspeed eth0}
${color Cyan} ${upspeedgraph eth0 7.225}
${color DimGray}Down ${downspeed eth0}
${color Cyan} ${downspeedgraph eth0 7,225}

${font Neuropolitical:bold:size=10}${color Blue}TIME ${color DarkSlateGray}${hr$

${color DarkSlateGray} ${font Neuropolitical:size=30}$alignc${time %I:%M %P}
${voffset -30}${font Neuropolitical:bold:size=10}$alignc${time %d %b. %Y}
${font :bold:size=8}$alignc${time %A}

// I stole a bit from yours because I liked the graphs

Here ya go Lion:

http://i.imgur.com/J7kGr.jpg
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline Lionofgod

  • Knight
  • **
  • Posts: 164
  • Cookies: 6
    • View Profile
Re: Conky for your linux desktop
« Reply #10 on: July 12, 2012, 10:55:05 pm »
Thank you :D
That background is sick!!

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: Conky for your linux desktop
« Reply #11 on: July 12, 2012, 10:57:33 pm »
asdf
« Last Edit: February 13, 2013, 11:34:24 am by DeepCopy »
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Conky for your linux desktop
« Reply #12 on: July 13, 2012, 03:55:44 am »
Thanks lucid.

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: Conky for your linux desktop
« Reply #13 on: August 26, 2012, 03:15:58 am »
Not sure if it matters but I felt I'd update this thread with my new conky if anyone wants it....it's not all that different but maybe it'll help someone. It's hard to find documentation on how to edit conky so feel free to grab my config and modify it.

Code: [Select]
background yes
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 0.5
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 250 5
maximum_width 200
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color black
default_shade_color black
default_outline_color black
alignment top_right
gap_x 10
gap_y 10
no_buffers no
uppercase nodouble_buffer yes
minimum_size 250 5
maximum_width 200
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color black
default_shade_color black
default_outline_color black
alignment top_right
gap_x 10
gap_y 10
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer yes
text_buffer_size 256


TEXT


${font Neuropolitical:size=20}${color Black}localhost


${voffset -90}
${color}
${font}
${font Neuropolitical:bold:size=10}${color Black}SYSTEM ${color Black} ${hr 2}
${font bold:size=7}${color Black}$sysname $kernel $alignr $machine
${font bold:size=7}${color Black}Uptime $alignr${uptime}
${font bold:size=7}File System $alignr${fs_type}
${font bold:size=7}Battery:${voffset 2} ${battery_bar 5,150} ${battery_percent}%

${font Neuropolitical:bold:size=10}${color Black}PROCESSORS ${color Black}${hr 2}
${font bold:size=7}CPU1  ${cpu cpu1}% ${cpubar cpu1}
CPU2  ${cpu cpu2}% ${cpubar cpu2}

${font Neuropolitical:bold:size=10}${color Black}RAM ${color Black}${hr 2}
${font bold:size=7}MEM $alignc $mem / $memmax $alignr $memperc%
$membar

${font Neuropolitical:bold:size=10}${color Black}HDD ${color Black}${hr 2}
${font bold:size=7}/home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_free_perc /home}%

${font bold:size=7}${color Black}$sysname $kernel $alignr $machine
${font bold:size=7}${color Black}Uptime $alignr${uptime}
${font bold:size=7}File System $alignr${fs_type}
${font bold:size=7}Battery:${voffset 2} ${battery_bar 5,150} ${battery_percent}%

${font Neuropolitical:bold:size=10}${color Black}PROCESSORS ${color Black}${hr 2}
${font bold:size=7}CPU1  ${cpu cpu1}% ${cpubar cpu1}
CPU2  ${cpu cpu2}% ${cpubar cpu2}

${font Neuropolitical:bold:size=10}${color Black}RAM ${color Black}${hr 2}
${font bold:size=7}MEM $alignc $mem / $memmax $alignr $memperc%
$membar

${font Neuropolitical:bold:size=10}${color Black}HDD ${color Black}${hr 2}
${font bold:size=7}/home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_free_perc /home}%
${fs_bar /home}

${font Neuropolitical:bold:size=10}${color Black}TOP PROCESSES ${color Black}${hr 2}
${font bold:size=7}${top_mem name 2}${alignr}${top mem 2} %
${font bold:size=7}${top_mem name 3}${alignr}${top mem 3} %
${font bold:size=7}${top_mem name 4}${alignr}${top mem 4} %
${font bold:size=7}${top_mem name 5}${alignr}${top mem 5} %

${font Neuropolitical:bold:size=10}${color Black}NETWORK ${color Black}${hr 2}
${font bold:size=7}IP on wlan0 $alignr ${addr wlan0}

${color Black}Up ${upspeed wlan0}
${color Black} ${upspeedgraph wlan0 7.225}
${color Black}Down ${downspeed wlan0}
${color Black} ${downspeedgraph wlan0 7,225}
${font bold:size=7}IP on eth0 $alignr ${addr eth0}

${font Neuropolitical:bold:size=10}${color Black}TOP PROCESSES ${color Black}${hr 2}
${font bold:size=7}${top_mem name 2}${alignr}${top mem 2} %
${font bold:size=7}${top_mem name 3}${alignr}${top mem 3} %
${font bold:size=7}${top_mem name 4}${alignr}${top mem 4} %
${font bold:size=7}${top_mem name 5}${alignr}${top mem 5} %

${font Neuropolitical:bold:size=10}${color Black}NETWORK ${color Black}${hr 2}
${font bold:size=7}IP on wlan0 $alignr ${addr wlan0}

${color Black}Up ${upspeed wlan0}
${color Black} ${upspeedgraph wlan0 7.225}
${color Black}Down ${downspeed wlan0}
${color Black} ${downspeedgraph wlan0 7,225}
${font bold:size=7}IP on eth0 $alignr ${addr eth0}

${color Black}Up ${upspeed eth0}
${color Black} ${upspeedgraph eth0 7.225}
${color Black}Down ${downspeed eth0}
${color Black} ${downspeedgraph eth0 7,225}

${font Neuropolitical:bold:size=10}${color Black}TIME ${color Black}${hr 2}

${color Black} ${font Neuropolitical:size=30}$alignc${time %I:%M %P}
${voffset -30}${font Neuropolitical:bold:size=10}$alignc${time %d %b. %Y}
${font :bold:size=7}$alignc${time %A}

It's all black so it would work best on a white background, and of course you could easily just change the color.

Here's what it looks like:





"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python