conky

Share here your personal tips or creations: desktop, conky, docks, widgets or tweaks are welcomed here!
User avatar
Swamper
Posts: 58
Joined: 30 Jan 2014 13:53
Location: New England

Re: conky

Postby Swamper » 14 Apr 2014 01:12

@ S11: Many thanks from me, too. In checking my code, I realized that I also made a similar mistake as vtpoet did with the cpu lines, but my conky doesn't employ the lua rings. I also include weather info that is lean and mean, which provides more or less up to the minute weather temps and condtions. Weather forecasts in New England that exceed more than 24 hrs. are often wrong as in, "If you don't like the weather, just wait a minute." Sometimes it's just like that. :o

User avatar
Sector11
Posts: 25
Joined: 28 Mar 2014 00:58

Re: conky

Postby Sector11 » 14 Apr 2014 13:06

Swamper wrote:@ S11: Many thanks from me, too.
Hi Swamper - Side affects of helping someone. You're welcome as well. A lot of people aren't aware of this and think ${cpu cpu0} is their first 'cpu' or 'core'

From inxi I get:

Code: Select all

 14 Apr 14 | 09:25:08 ~
    $ cpu
CPU:       Triple core AMD Athlon II X3 450 (-MCP-) cache: 1536 KB 
           Clock Speeds: 1: 3214 MHz 2: 3214 MHz 3: 3214 MHz
 
 14 Apr 14 | 09:25:18 ~
    $ 
What's interesting is for a triple 'core/CPU' processor, because mine is an X3:
Nvidia counts by CPU starting at 1 - cpu1 cpu2 cpu3
Intel counts by "Cores" starting at 0 - core0, core1 core2
Maybe that's where the confusion starts, cpu0 is not equal to core0

Conky is clear on how to use them:

Code: Select all

cpu 	(cpuN)
 	CPU usage in percents. For SMP machines, the CPU number can be provided as an argument. ${cpu cpu0} is the total usage, and ${cpu cpuX} (X >= 1) are individual CPUs. 
Did you know in conky the command ${cpu} equals ${cpu cpu0}

My main conky doesn't use lua rings either, just a text conky:

Code: Select all

${alignc}${color5}${kernel}${color}
${alignc}${color6}${membar 0,10} CPU | GPU ${membar 0,10}${color}
${alignc}CPU μm ${color5}${freq_g}${color}
${alignc}Avg ${if_match ${cpu cpu0}<10}${color1}00${color5}${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100}${color1}0${color5}${cpu cpu0}\
${else}${color9}${cpu cpu0}${endif}${endif}${color5} %${color}
${alignc} ${color5}1${color}  |  ${color5}2${color}  |  ${color5}3 ${color}
${alignc}${if_match ${cpu cpu1}<10}${color1}00${color5}${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100}${color1}0${color5}${cpu cpu1}\
${else}${color9}${cpu cpu1}${endif}${endif}${color}\
 | ${if_match ${cpu cpu2}<10}${color1}00${color5}${cpu cpu2}\
${else}${if_match ${cpu cpu2}<100}${color1}0${color5}${cpu cpu2}\
${else}${color9}${cpu cpu2}${endif}${endif}${color}\
 | ${if_match ${cpu cpu3}<10}${color1}00${color5}${cpu cpu3}\
${else}${if_match ${cpu cpu3}<100}${color1}0${color5}${cpu cpu3}\
${else}${color9}${cpu cpu3}${endif}${endif}${color}
CPU ${color5}${platform f71882fg.2560 temp 1}${color}°\
${alignr}MB ${color5}${platform f71882fg.2560 temp 2}${color}°
GPU ${color5}${nvidia temp}${color}°\
${alignr}HD ${color5}${hddtemp /dev/sda}${color}°
${alignc}Fan ${color5}${platform f71882fg.2560 fan 1} ${color}RPM
${alignc}NVIDIA Freq MHz
GPU ${color5}${nvidia gpufreq} ${color} MEM ${color5}${nvidia memfreq}${color}
${alignc}${color6}${membar 0,10} Disk Stats ${membar 0,10}${color}
${color5}${diskio_read /dev/sda}${color}${goto 056}R·W${alignr 05}${color5}${diskio_write /dev/sda}${color}
Image

The leanest meanest weather for conky that I have found is the ${weather} command as seen here are you using that?

User avatar
Swamper
Posts: 58
Joined: 30 Jan 2014 13:53
Location: New England

Re: conky

Postby Swamper » 14 Apr 2014 19:33

@ Sector11: See: http://i.imgur.com/eNv0Fuv.jpg for a view of how my conky looked before I tweaked it a bit. Actually it looks pretty much the same, except now you see cpu0. Do I really want that? FWIW, I pieced the conky together from three I liked on the #! forums. :D

Here's inxi:

Code: Select all

fff@imac-solydx:~$ inxi
CPU~Dual core Intel Core2 Duo CPU E7600 (-MCP-) clocked at 1596.000 Mhz Kernel~3.11-2-amd64 x86_64 Up~1:41 Mem~925.4/3688.1MB HDD~500.1GB(14.3% used) Procs~168 Client~Shell inxi~1.9.17  
And here's my current conky:

Code: Select all

# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# http://crunchbanglinux.org/forums/topic/59/my-conky-config/
#
# For help with conky, please see:
# http://crunchbanglinux.org/forums/topic/2047/conky-help/
#
# Enjoy! :)
##############################################
# Settings
##############################################
# conky configuration

#

# The list of variables has been removed from this file in favour

# of keeping the documentation more maintainable.

# Check http://conky.sf.net for an up-to-date-list.

#

# For ideas about how to modify conky, please see:

# http://crunchbanglinux.org/forums/topic/59/my-conky-config/

#

# For help with conky, please see:

# http://crunchbanglinux.org/forums/topic/2047/conky-help/

#

# Enjoy! :)

##############################################

# Settings

##############################################

background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 200
maximum_width 200
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color 979797
default_shade_color black
default_outline_color white
color3 979797
color4 AntiqueWhite4
alignment top_right
gap_x 12
gap_y 12
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
text_buffer_size 2048 
max_user_text 65000
temperature_unit  fahrenheit #fahrenheit/celcius
##################
# Implementation #
##################
TEXT

${font sans-serif:bold:size=8}TIME & DATE ${hr 2}
${font sans-serif:size=26}${alignc}${time %H:%M}${font}
${alignc}${time %A %d %B %Y}

#kpvd is providence/warwick airport, change to an airport near you or be lame and use weather.com.

${font sans-serif:bold:size=8}WEATHER ${hr 2}
${font sans-serif:normal:size=8}
${if_match "${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ kpvd weather}"!="clear"}
Conditions: $alignr${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ kpvd weather}${endif} ${if_match ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ kpvd wind_speed} > 5}
Wind: $alignr${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ kpvd wind_speed} mph ${endif}
Temp: $alignr${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ kpvd temperature} F  

${font sans-serif:bold:size=8}SYSTEM ${hr 2}
${font sans-serif:normal:size=8}$sysname $kernel $alignr $machine
Host:$alignr$nodename
Uptime:$alignr$uptime

${font sans-serif:bold:size=8}Intel Core 2 Duo CPU E760 ${hr 2}
${font sans-serif:normal:size=8}Core frequency $color $alignr ${freq_g (1)} GHz
#Core 0 temp: $alignr ${hwmon 0 temp 0}
Core 1 temp: $alignr ${hwmon 1 temp 1} F
Core 2 temp: $alignr ${hwmon 2 temp 2} F
CPU0: ${cpu cpu0}% ${cpubar cpu0}
CPU1: ${cpu cpu1}% ${cpubar cpu1}
CPU2: ${cpu cpu2}% ${cpubar cpu2}
${cpugraph cpu1}

${font sans-serif:bold:size=8}HDD & RAM ${hr 2}
${font sans-serif:normal:size=8}RAM $alignc $mem / $memmax $alignr $memperc%
$membar
SWAP $alignc ${swap} / ${swapmax} $alignr ${swapperc}%
${swapbar}
${font sans-serif:normal:size=8}/ $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
${fs_bar /}
${font sans-serif:normal:size=8}/ $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_used_perc /home}%
${fs_bar /home}

${font sans-serif:bold:size=8}NETWORK ${hr 2}
${font sans-serif:normal:size=8}ID:$alignr${wireless_essid wlan0}
Signal: $alignr ${wireless_link_qual_perc wlan0}%
IP address: $alignr ${addr wlan0}
${downspeedgraph wlan0}
${font sans-serif:normal:size=8}Down:   (Tot: ${totaldown wlan0}) $alignr${downspeed wlan0}/s
${upspeedgraph wlan0}
${font sans-serif:normal:size=8}Up:       (Tot: ${totalup wlan0}) $alignr ${upspeed wlan0}/s

${font sans-serif:bold:size=8}TOP PROCESSES ${hr 2}
${font sans-serif:normal:size=8}${top_mem name 1}${alignr}${top mem 1}%
${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${top_mem name 6}${alignr}${top mem 6}%
$font${top_mem name 7}${alignr}${top mem 7}%
$font${top_mem name 8}${alignr}${top mem 8}%
$font${top_mem name 9}${alignr}${top mem 9}%
$font${top_mem name 10}${alignr}${top mem 10}%
Meanwhile, I have mixewd feelings about conky. Sometimes I'm tempted to go whole hog; other times I want to keep it as simple as possible; other times, I don't want any at all--just a clean desktop. :?

User avatar
Sector11
Posts: 25
Joined: 28 Mar 2014 00:58

Re: conky

Postby Sector11 » 14 Apr 2014 20:37

Swamper wrote:@ Sector11: See: http://i.imgur.com/eNv0Fuv.jpg for a view of how my conky looked before I tweaked it a bit. Actually it looks pretty much the same, except now you see cpu0. Do I really want that? FWIW, I pieced the conky together from three I liked on the #! forums. :D
OK - do you want ${cpu cpu0}? That's entirely up to you. I have some conkys where I don't use my three cpu's - just ${cpu}.

I only included my inxi info to support what I was talking about. And was curious as to what you used for weather. YUP, the simple ${weather} command I see. Neat stuff that.
Swamper wrote:Meanwhile, I have mixewd feelings about conky. Sometimes I'm tempted to go whole hog; other times I want to keep it as simple as possible; other times, I don't want any at all--just a clean desktop. :?
Actually you can have an on|off conky if you want ... or multiple on|off conkys, one simple, one complex.

My wifes desktop has three conkys - two HUGE clock and date conkys with current weather in the middle, and she has a menu entry that opens a full weather for her the way she likes it - in a window that she can close easily:
Image

Over on Ubuntu someone was asking if they could turn just one conky off if they had multiple conkys. Someone, not 100% sure who, came back with
Nope, it's all or nothing!
And GrouchyGaijin came up with a way of doing just that, turning off one conky leaving ALL others alone. The basis of that line now modified a tad sits on the top of all my conkys. Example:

Code: Select all

# pkill -xf "conky -c /media/5/Conky/S11_Vert.conky" &
So you can use a bash script to start|stop your "specific" conkys (working example for S11_Vert.conky) :

Code: Select all

#!/bin/bash
## Original idea by: GrouchyGaijin
## This idea by: Stinkeye - Jan 2013
## With another tweak by: arclance
## Final tweak by: Sector11
## click to start, click to stop

##if pgrep -f "conky -c /media/5/Conky/S11_Dates.conky"
##then
##	pkill -xf "conky -c /media/5/Conky/S11_Dates.conky"
##else
##	gnome-terminal -e "conky -c /media/5/Conky/S11_Dates.conky"
##fi
## not running in a terminal
## remove: gnome-terminal -e

## Tweaked

#if pgrep -f "conky -c $1"
#then
#	pkill -xf "conky -c $1"
#else
#	conky -c "$1"
#fi

if pgrep -f "conky -c /media/5/Conky/S11_Vert.conky"
then
	pkill -xf "conky -c /media/5/Conky/S11_Vert.conky"
else
#	wmctrl -s 0 && conky -c "/media/5/Conky/sector11/S11_Vert.conky"
	conky -c "/media/5/Conky/S11_Vert.conky"
fi
Now, here's the 'real' deal here:
  1. start the conky with a modified bash file as seen above - OR - with a hard coded path single line as:
    1. conky -c /media/5/Conky/S11_Vert.conky
  2. make a "menu entry" using a bash script like the one above
The bash script will stop your conky when you don't want it, by clicking on the "menu entry".
Then, if you decide you want it back on for a screenshot, the same menu entry will re-start it, take your screenshot and turn it off again with another 'click'

Make a nice little oneliner - a new bash script to point to it and another menu entry ... two conkys - one at a time or both at once if they use different screen space - I have 34 menus entries in an OB sub-menu. But I'm crazy.

Long story short: You can have it both ways. Conky on - Conky off --> just a menu click away.

Or you can have you conky on Desktop 1 only and switch to desktop 2 when you want a clean desktop. But that's for another day.
(the wmctrl in the bash script is a hint :mrgreen: )

User avatar
Swamper
Posts: 58
Joined: 30 Jan 2014 13:53
Location: New England

Re: conky

Postby Swamper » 15 Apr 2014 19:24

^ Sector11: Wow! I think I need to meditate/digest this info a bit. I'm leaning strongly on running a very lean conky--if any at all--since I can access cpu, tasks, weather, et al. via applets in the xfce4 panel. In a way, that's exchanging one type of desktop clutter for another. However, I like the idea of having being able to switch conky on and off or switching desktops--one with conky and another without. Ah, decisions, decisions.... :roll:


Return to “Customizations”

Who is online

Users browsing this forum: No registered users and 1 guest