Conky Showoff thread

Forum rules
Before you post please read this

Re: Conky Showoff thread

Postby Sector11 on Sat Jan 12, 2013 8:15 am

Changed my distro, changed my look, here's my latest. A modified version of the default VSIDO conky, split from one line to three and weather added.

Uses the mono font: Monofur

Image

The conky: S11_VSIDO_v9.conkyrc
Code: Select all
# killall conky && conky -c /media/5/Conky/S11_VSIDO_v9.conkyrc &
# Original by: VastOne on VSIDO

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer none #right

# Use Xft?
use_xft yes
xftfont Monofur:bold:size=12
xftalpha 1.0
# text_buffer_size 256

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

own_window yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_transparent yes
# own_window_argb_visual yes
own_window_class Conky

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 3

# border width
border_width 0

# Default colors and also border colors
default_color 00BFFF #  0 191 255   DeepSkyBlue
color0 FFDEAD #255 222 173   NavajoWhite
color1 7FFF00 #127 255   0   Chartreuse
color2 778899 #119 136 153   LightSlateGray
color3 FF8C00 #255 140   0   DarkOrange
color4 F0FFFF #240 255 255   Azure
color5 FFDEAD #255 222 173   NavajoWhite
color6 7B68EE #123 104 238   MediumSlateBlue
color7 00FFFF #  0 255 255   Cyan
color8 FFFF00 #255 255   0   Yellow
color9 FF0000 #255   0   0   Red

#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 5 # left-right
gap_y 5 # up-down

minimum_size 1265 0  ## width, height
#maximum_width 1250     ## width


# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off (no).
short_units yes

###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load ~/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.4
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
############### V9000 ########################################################
#starts the lua weather data gathering function, call once at top of conkyrc
 lua_load ~/v9000/v9000.lua
 lua_draw_hook_post weather
 lua_load /media/5/Conky/templates/VSIDO-v9-template.lua
#######################################################  End LUA Settings  ###
#
TEXT
${execi 600 bash /media/5/Conky/accuweather_conky/accuw_script}\
        ${color}Kernel ${color4}${kernel}\
 ${color}MEM${color4}${if_match ${memperc}<10}  ${memperc}\
${else}${if_match ${memperc}<100} ${memperc}\
${else}${memperc}${endif}${endif}%\
 ${color}(${mem})\
 ${color}CPU${color4}${if_match ${platform f71882fg.2560 temp 1}<100} ${platform f71882fg.2560 temp 1}\
${else}${platform f71882fg.2560 temp 1}${endif}°\
 ${color}MB${color4}${if_match ${platform f71882fg.2560 temp 2}<100} ${platform f71882fg.2560 temp 2}\
${else}${platform f71882fg.2560 temp 2}${endif}°\
 ${color}HD${color4}${if_match ${execi 5 hddtemp -n /dev/sda}<100} ${execi 5 hddtemp -n /dev/sda}\
${else}${execi 5 hddtemp -n /dev/sda}${endif}°
        ${color}NET${color4} Dn: ${color2}${downspeedgraph eth0 12,150 00ff00 ff0000 -t -l}     ${color}Up: ${color2}${upspeedgraph eth0 12,150 ff0000 00ff00 -t -l}  ${color}Uptime ${color1}${uptime_short}
        ${color}CPU: 1${color4}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}2${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}3${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}4${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}Fan ${color4}${platform f71882fg.2560 fan 1} rpm\
  ${color}VRX·${color7}03  ${color4}04·${color1}${exec conkyDaysDiff 20130304}  ${color4}11·${color7}${exec conkyDaysDiff 20130311}  ${color4}16·${color3}${exec conkyDaysDiff 20130316}${color4}


VSIDO-v9-template.lua mrpeachy's v9000 is required.
Code: Select all
--[[
 The latest script is a lua only weather script. aka: v9000
 http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

 the file:
 http://dl.dropbox.com/u/19008369/current%20v9000/v9000.tar.gz

 mrppeachys LUA Tutorial
 http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
-- default_font="CorporateMonoExtraBold"--font must be in quotes
-- default_font_size=10
default_font="monofur"--font must be in quotes
default_font_size=12
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=20
default_image_height=20
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE

datax=670
dataxx=55
dataxx1=dataxx+30

datay1=13
datay2=25
datay3=40
datay4=55

datayy=13 --datay+(datayy*1)

imgx=687
imgx1=55 -- (imgx1*1)

imgyh=165
imgyf=190
imgyy=39 -- imgy+(imgyy*1)

-- out({c=0x00FFFF,,a=1,x=6,y=50,txt="cpu:"..conky_parse("${cpu}")})
-- VSIDO ICON ORB
image({w=55,h=55,x=5,y=5,file="/home/sector11/images/vsido/orbwallpaper3.png"})
-- today
out({c=0x00FFFF,a=1,x=datax,y=datay1,txt=forecast_day_short[1]})
out({c=0x00FFFF,a=1,x=datax+30,y=datay1,txt=forecast_date[1]})
  image({x=imgx,y=17,h=25,w=25,file=weather_icon[1]})
--image({x=imgx,y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax,y=datay2,txt=high_temp[1]})
out({c=0xF0FFFF,a=1,x=datax,y=datay3,txt=low_temp[1]})

out({c=0x00FFFF,a=1,x=datax+dataxx,y=datay1,txt="Current"})
out({c=0xF0FFFF,a=1,x=datax+dataxx,y=datay2,txt=now["temp"]})
out({c=0xFFDEAD,a=1,x=datax+dataxx,y=datay3,txt=now["feels_like"]})
  image({x=imgx+(imgx1*1),y=17,h=25,w=25,file=now["weather_icon"]})
--image({x=imgx+(imgx1*1),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})

out({c=0x00FFFF,a=1,x=datax+(dataxx*2),y=datay1,txt=forecast_day_short[2]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*2+30),y=datay1,txt=forecast_date[2]})
  image({x=imgx+(imgx1*2),y=17,h=25,w=25,file=weather_icon[2]})
--image({x=imgx+(imgx1*2),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*2),y=datay2,txt=high_temp[2]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*2),y=datay3,txt=low_temp[2]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*3),y=datay1,txt=forecast_day_short[3]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*3+30),y=datay1,txt=forecast_date[3]})
  image({x=imgx+(imgx1*3),y=17,h=25,w=25,file=weather_icon[3]})
--image({x=imgx+(imgx1*3),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*3),y=datay2,txt=high_temp[3]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*3),y=datay3,txt=low_temp[3]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*4),y=datay1,txt=forecast_day_short[4]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*4+30),y=datay1,txt=forecast_date[4]})
  image({x=imgx+(imgx1*4),y=17,h=25,w=25,file=weather_icon[4]})
--image({x=imgx+(imgx1*4),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*4),y=datay2,txt=high_temp[4]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*4),y=datay3,txt=low_temp[4]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*5),y=datay1,txt=forecast_day_short[5]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*5+30),y=datay1,txt=forecast_date[5]})
  image({x=imgx+(imgx1*5),y=17,h=25,w=25,file=weather_icon[5]})
--image({x=imgx+(imgx1*5),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*5),y=datay2,txt=high_temp[5]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*5),y=datay3,txt=low_temp[5]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*6),y=datay1,txt=forecast_day_short[6]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*6+30),y=datay1,txt=forecast_date[6]})
  image({x=imgx+(imgx1*6),y=17,h=25,w=25,file=weather_icon[6]})
--image({x=imgx+(imgx1*6),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*6),y=datay2,txt=high_temp[6]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*6),y=datay3,txt=low_temp[6]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*7),y=datay1,txt=forecast_day_short[7]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*7+30),y=datay1,txt=forecast_date[7]})
  image({x=imgx+(imgx1*7),y=17,h=25,w=25,file=weather_icon[7]})
--image({x=imgx+(imgx1*7),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*7),y=datay2,txt=high_temp[7]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*7),y=datay3,txt=low_temp[7]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*8),y=datay1,txt=forecast_day_short[8]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*8+30),y=datay1,txt=forecast_date[8]})
  image({x=imgx+(imgx1*8),y=17,h=25,w=25,file=weather_icon[8]})
--image({x=imgx+(imgx1*8),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*8),y=datay2,txt=high_temp[8]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*8),y=datay3,txt=low_temp[8]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*9),y=datay1,txt=forecast_day_short[9]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*9+30),y=datay1,txt=forecast_date[9]})
  image({x=imgx+(imgx1*9),y=17,h=25,w=25,file=weather_icon[9]})
--image({x=imgx+(imgx1*9),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*9),y=datay2,txt=high_temp[9]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*9),y=datay3,txt=low_temp[9]})

out({c=0x00FFFF,a=10,x=datax+(dataxx*10),y=datay1,txt=forecast_day_short[10]})
out({c=0x00FFFF,a=10,x=datax+(dataxx*10+30),y=datay1,txt=forecast_date[10]})
  image({x=imgx+(imgx1*10),y=17,h=25,w=25,file=weather_icon[10]})
--image({x=imgx+(imgx1*10),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*10),y=datay2,txt=high_temp[10]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*10),y=datay3,txt=low_temp[10]})

-- BOTTOM LINE
out({c=0xF0FFFF,a=1,x=datax,y=datay4,txt="Today's Weather:"})
out({c=0x00FFFF,a=1,x=datax+115,y=datay4,txt="Pressure"})
out({c=0xF0FFFF,a=1,x=datax+175,y=datay4,txt=now["pressure_mb"].." mb"})
out({c=0x00FFFF,a=1,x=datax+245,y=datay4,txt="Humidity"})
out({c=0xF0FFFF,a=1,x=datax+305,y=datay4,txt=now["humidity"].."%"})

out({c=0x00FFFF,a=1,x=datax+338,y=datay4,txt="Dew Point"})
out({c=0xF0FFFF,a=1,x=datax+405,y=datay4,txt=now["dew_point"].."°"})
out({c=0x00FFFF,a=1,x=datax+435,y=datay4,txt="UV Index"})
out({c=0xF0FFFF,a=1,x=datax+495,y=datay4,txt=uv_index_num[1]})
out({c=0xF0FFFF,a=1,x=datax+515,y=datay4,txt=uv_index_txt[1]})

-- yellow line
--image({w=45,h=1,x=5,y=550,file="/media/5/Conky/images/yellow_1.png"})

--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Linux Mint is funded by ads and donations.
 

Re: Conky Showoff thread

Postby Sector11 on Mon Jan 21, 2013 1:19 pm

I'd be remiss if I didn't give everyone the full story or at least a fairly good running break down of what this is and how it came about.

We can all thank GrouchyGaijin for this!

I love it when someone says "Nope, not possible" and the answer is "Oh yea, watch this!" type of thing.

This started when GrouchyGaijin asked stinkeye this question regarding the "start stop conky" script (ssc.sh)

GrouchyGaijin:
Cool idea. Thanks for sharing. I have a question though, does the toggle script allow you to kill the conkies one at a time or is it all or nothing?


stinkeye responded:
Scripts been around a while. Not my idea.
All or nuttin'. Go hard or go home. ;)


A little while later GrouchyGaijin came back with:
For what it is worth, I wrote a script that will find the PID of a particular conky, then kill it.

I'm sure this could be done more efficiently. But this works on my system.

Code: Select all
#!/bin/bash
##This is something like the 5th script I've ever written ##                     
var1=$(ps xu | grep calendar-conky | grep -v grep | awk '{ print $2 }')
echo "$var1"
kill $var1


Change calendar-conky to the name of your conkyrc file.
Then, make a launcher, put it in a quick list or whatever.


arclance piped up:
Why not use?
Code: Select all
pkill -f "conky.*-c.*calendar-conky"
That will kill conky process running with the "calendar-conky" .conkyrc.
It should also not kill certain text editors if you have your .conkyrc open in them.


Can you see where this is going?

After a discussion between arclance and stinkeye, about it not working with a conky in a terminal stinkeye has a version that will work with his demo conky in a terminal:
stinkeye:
Could't find a solution so I added a sed command to change
background yes
to
background no
in any pasted in configs.

Code: Select all
#!/bin/bash
## click to start, click to stop

if pgrep -f "conky -c /home/glen/conky/configs/demo-conkyrc"
then
   pkill -xf "conky -c /home/glen/conky/configs/demo-conkyrc"
else
   [B]sed -i 's/background yes/background no/g' /home/glen/conky/configs/demo-conkyrc &[/B]
   gnome-terminal -e "conky -c /home/glen/conky/configs/demo-conkyrc"
fi


From GrouchyGaijin's "oh yea, watch this post!" I started playing ... incorporating things as it happened.

All my conkys start with "conky -c /path/to/the/conkyrc", I don't run conkys in a terminal, start them yes, run them no!

I played with this a lot yesterday getting "ERROR" here an "Oops!" there, but not before one tweak restarted my entire session.
Now that was an Oops!

The second last line is the fix it was:
Code: Select all
   "conky -c $1"


Here's the 'first' working version, - "SUPER" script
that requires two clicks, or twice in a terminal:


ggsia <<-- the bash script for GrouchyGaijin, Stinkeye and arclance
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 re-start

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


Terminal output
Code: Select all
 sector11 @ sector11
 21 Jan 13 | 09:29:06 ~
         $ ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc
18708
 sector11 @ sector11
 21 Jan 13 | 09:29:48 ~
         $ ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc
Conky: forked to background, pid is 19627
 sector11 @ sector11
 21 Jan 13 | 09:29:50 ~
         $
Conky: desktop window (260) is root window
Conky: window type - normal
Conky: drawing to created window (0x1c00001)
Conky: drawing to double buffer
gathering data with curl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 71036  100 71036    0     0  81086      0 --:--:-- --:--:-- --:--:--   99k
not checking for alerts
processing complete

 sector11 @ sector11
 21 Jan 13 | 09:30:06 ~
         $


Stopped it and started it like it was meant to do!
but it took one to kill it, one to start it

Thank you GrouchyGaijin, stinkeye & arclance

I didn't stop there ... I have another version of ssc.sh that uses "exit" .... hmmmmmmmmm!!!

So here it is, the new improved ggsia that is even better, this is for [shadow=red,left]"conky addicts"[/shadow], because sometimes just "saving a conky" isn't enough, you need to kill it and restart it!

If you are developing a conky and
[o]have not started it yet, this will start it.
[o]if it is already running, this script will kill it and restart it 2 seconds later

ggsia - Super script #2
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 & re-start

if pgrep -f "conky -c $1"
   then
   pkill -xf "conky -c $1"
   (sleep 2s && conky -c "$1") &
   exit
else
   conky -c "$1"
   exit
fi


Nice stuff guys!

stinkeye points out a weakness of the above above a question:

HA!!!! jedi has compition!
Along comes: CapMan

stinkeye:
Hi Sector11,
just a bit confused as to what the $1 variable is
and how to use the script.
Do I just add the path to a conkyrc as a variable to the script?

It may appear I know what I'm doing but I'm essentially a copy and paste man.
CapMan :P


$1 for a bash script is a command line variable.

stinki
Code: Select all
#!/bin/bash
echo $1 $2


Code: Select all
 sector11 @ sector11
 21 Jan 13 | 11:52:44 ~
         $ stinki something
something
 sector11 @ sector11
 21 Jan 13 | 11:52:46 ~
         $ stinki something else
something else
 sector11 @ sector11
 21 Jan 13 | 11:52:50 ~
         $ stinki Hi stinkeye
Hi stinkeye
 sector11 @ sector11
 21 Jan 13 | 11:54:16 ~
         $


To continue:
Yea, me too, I gotta use that line, CapMan sounds like a superhero!
Maybe change it to C&PDude so as not to interfere with any © you may have.

The top of 90% of my conkys have something like this:
Code: Select all
# killall conky && conky -c /media/5/Conky/S11_VSIDO_v9.conkyrc &


I copy that line - less the hash - to kill all conkys and restart the one I'm working on. BUT it does what you said a while back:
stinkeye:
All or nuttin'. Go hard or go home. ;)


So now at the top of my conkys I'll do:
Code: Select all
# ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc


then I'll pull a CapMan in the terminal
Code: Select all
 sector11 @ sector11
 21 Jan 13 | 11:25:16 ~
         $ ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc


Like I said earlier in this post,
[o] if the conky is not running that script will start it,
[o] if it is running, it will kill it, wait 2 seconds and restart it.

Perfect for editing!

Now to do a search and replace on "all files" in my conky directories:
Search: "# killall conky && conky -c"
Replace: "# ggsia"

Hmmmm, that will take a while, I'll probably have to watch a movie.

Thanks GrouchyGaijin ǝʎǝʞuıʇs sʞuɐɥʇ & arclance
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Orbmiser on Wed Jan 30, 2013 3:51 am

Man O' Man Conky is such a Time Sucker! Decided to find a script and modify thinking it's easy.
Spend at least 4-5 hours trying and tweaking to get everything working just right.

Image
Desktop Jan. 30th Conky Script by Orbmiser, on Flickr

Had to tweak and modify from the original
https://github.com/circumjacence/ConkyInfinitySVG
and don't understand how these coders can figure it all out as doesn't seem to be any gui type tools.
To take out the guesswork in positioning,placement of elements and such. Seems kind of arcane and time wasting to code it by guessing?

Tho love some of those Conky wonders.
.
Last edited by Orbmiser on Wed Jan 30, 2013 5:00 pm, edited 1 time in total.
User avatar
Orbmiser
Level 6
Level 6
 
Posts: 1087
Joined: Thu Oct 18, 2012 5:16 pm
Location: Portland,Oregon

Re: Conky Showoff thread

Postby d00med on Wed Jan 30, 2013 8:22 am

Image
Last edited by d00med on Tue May 14, 2013 8:20 am, edited 1 time in total.
User avatar
d00med
Level 4
Level 4
 
Posts: 314
Joined: Fri Nov 26, 2010 9:55 am

Re: Conky Showoff thread

Postby soccerz619 on Wed Jan 30, 2013 1:29 pm

Orbmiser wrote:Man O' Man Conky is such a Time Sucker! Decided to find a script and modify thinking it's easy.
Spend at least 4-5 hours trying and tweaking to get everything working just right.

Image
Desktop Jan. 30th Conky Script by Orbmiser, on Flickr

Tho love some of those Conky wonders.
.


Do you have your Script for this? This one is very cool.
Everyone is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing it is stupid.
Image
User avatar
soccerz619
Level 4
Level 4
 
Posts: 215
Joined: Mon Sep 05, 2011 10:05 pm

Re: Conky Showoff thread

Postby FrankenCub on Wed Jan 30, 2013 4:49 pm

Orbmiser wrote:Man O' Man Conky is such a Time Sucker! Decided to find a script and modify thinking it's easy.
Spend at least 4-5 hours trying and tweaking to get everything working just right.

Image
Desktop Jan. 30th Conky Script by Orbmiser, on Flickr

Had to tweak and modify from the original
https://github.com/circumjacence/ConkyInfinitySVG
and don't understand how these coders can figure it all out as doesn't seem to be any gui type tools.
To take out the guesswork in positioning,placement of elements and such. Seems kind of arcane and time wasting to code it by guessing?

Tho love some of those Conky wonders.
.


That looks nice, I like how it's layed out. When you post a screenshot you really should cover your IP address with some graphics program so no one gets it. There are thousands of people who will find these posts via Google, who knows who you can trust out there.
You don't need a GUI to do Conky, any changes can be made right in the conky script files through Medit or Gedit. A screen ruler is super helpful for getting your placements right. Once you've worked with conky a while you will get it no problem. Some things confuse me too :lol:
User avatar
FrankenCub
Level 1
Level 1
 
Posts: 9
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Postby Orbmiser on Wed Jan 30, 2013 4:53 pm

Well gave the link to the script and the modifications I made are just personal system like it defaults eth0 when I use wlan0
Just go to the github link and can download if from there as comes with it's own graphics and folder,etc...

Yep forgot about the I.P. address will have to go and smudge that on my flickr account.
.
User avatar
Orbmiser
Level 6
Level 6
 
Posts: 1087
Joined: Thu Oct 18, 2012 5:16 pm
Location: Portland,Oregon

Re: Conky Showoff thread

Postby Handsome Rob on Mon Feb 04, 2013 10:54 am

mmesantos1 wrote:Ok new conky mod. :D

Download Link: http://mmesantos1.deviantart.com/#/d5f1xyq
Image


Kanged!

Thanks.

Image
Handsome Rob
Level 1
Level 1
 
Posts: 5
Joined: Sat Mar 17, 2012 5:23 pm

Re: Conky Showoff thread

Postby Handsome Rob on Mon Feb 04, 2013 10:54 am

dbl
Handsome Rob
Level 1
Level 1
 
Posts: 5
Joined: Sat Mar 17, 2012 5:23 pm

Re: Conky Showoff thread

Postby Orbmiser on Mon Feb 04, 2013 3:08 pm

Handsome Rob wrote:
mmesantos1 wrote:Ok new conky mod. :D

Download Link: http://mmesantos1.deviantart.com/#/d5f1xyq
Image




Wasn't transparent on my Kde setup until I added:
So I imagine if your running any kind of compositor then those lines may be needed for transparency.

Code: Select all
own_window_argb_visual yes   # true transparency, a compositor has to be active
own_window_argb_value 0   # make the background semi-transparent


Adjust the own_window_argb_value 0-100 depending on how much tinting you are wanting.

On Dual Displays you will need to add:

Code: Select all
alignment top_left
#alignment top_right
gap_x 2250
gap_y 0


Have alignment top_left selected and top_right commented out. So adjust whether you want it on left display or right.
Also the gap_x 2250 is for center of 2nd right display 1680x1050. Adjust to your preference for monitor size and resolution.

As usual mmesantos1 does Outstanding works and is a Demon with his collection of themes,conky's,etc..
Good Works mmesantos!
.
User avatar
Orbmiser
Level 6
Level 6
 
Posts: 1087
Joined: Thu Oct 18, 2012 5:16 pm
Location: Portland,Oregon

Re: Conky Showoff thread

Postby Earro on Sat Feb 16, 2013 5:13 pm

Screenshot.png
My Attempt
Screenshot.png (62.1 KiB) Viewed 1266 times

My attempt at "lightweight" mint
Earro
Level 1
Level 1
 
Posts: 8
Joined: Wed Feb 13, 2013 1:07 pm

Re: Conky Showoff thread

Postby Sector11 on Sat Apr 06, 2013 5:10 pm

This is my current setup
Image
1920x1080

  • Conky on the right uses mrpeachy's 'mounted.lua' to monitor external mounted devices only, of which there are 4 in the image.
  • "mounted.lua" does monitor ALL devices if you want it to.
  • Add your own images or delete the calls.
Code: Select all
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title Top Left

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes # Options: yes or no

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 255

minimum_size 230 0   ## width, height
maximum_width 230   ## width

gap_x 10   ### left &right
gap_y 10   ### up & down

alignment tr
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur:bold:size=12 ##14
#xftfont White Rabbit:size=9

# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10conky -c /media/5/Conky/S11-Top_Left.conky &
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

default_color DCDCDC #220 220 220   Gainsboro
color0 8FBC8F #143 188 143   DarkSeaGreen
color1 778899 #119 136 153   LightSlateGray
color2 FF8C00 #255 140   0   DarkOrange
color3 7FFF00 #127 255   0   Chartreuse
color4 FFA07A #255 160 122   LightSalmon
color5 FFDEAD #255 222 173   NavajoWhite
color6 00BFFF #  0 191 255   DeepSkyBlue
color7 00FFFF #  0 255 255   Cyan
color8 FFFF00 #255 255   0   Yellow
color9 B22222 #178  34  34   FireBrick ##FF0000 #255   0   0   Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable the image cache.

imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#--------------------------------
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.2
#lua_draw_hook_post draw_bg 20 0 0 0 0 0x000000 0.2
#
# TEXT
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
##
#
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
#######################################################  End LUA Settings  ###

update_interval 1
TEXT
${lua get_mounted_data 3}${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}\
${image /media/5/Conky/images/EVE.png -p 15,0 -s 60x60}\
${image /media/5/Conky/images/Wall.E.png -p 55,0 -s 60x60}\
${image /media/5/Conky/images/S11_128.png -p 0,100 -s 60x60}\
${color5}${alignr 5}${time %x}
${alignr 5}${time %T}
${alignr 5}${uptime_short}${color}

${alignc}${kernel}
${color7}${hr}${color}
${alignc}${font Dock 51:size=18}${color1}${nodename}${color}${font}

${goto 65}%   Used${goto 170}${color}  Total
Root ${color5}${fs_used_perc /}${goto 100}${fs_used /}${goto 170}${color7} ${alignr 5}${color5} ${fs_size /}${color}
Home ${color5}${fs_used_perc /home}${goto 100}${fs_used /home}${goto 170}${color7} ${alignr 5}${color5} ${fs_size /home}${color}
 M|5 ${color5}${fs_used_perc /media/5}${goto 100}${fs_used /media/5}${goto 170}${color7} ${alignr 5}${color5} ${fs_size /media/5}${color}${font Monofur:size=6}

${font} RAM ${color5}${memperc}${goto 100}${mem}${goto 170}${color7} ${alignr 5}${color5} ${memmax}${color}${font Monofur:size=6}

${font}${alignc}Avg CPU % in use ${if_match ${cpu cpu0}<10}${color1}00${color5}${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100}${color1}0${color7}${cpu cpu0}\
${else}${color9}${cpu cpu0}${endif}${endif}${color}${font Monofur:size=6}

${font}${alignc}1 ${if_match ${cpu cpu1}<10}${color1}00${color5}${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100}${color1}0${color7}${cpu cpu1}\
${else}${color9}${cpu cpu1}${endif}${endif}${color}\
    2 ${if_match ${cpu cpu2}<10}${color1}00${color5}${cpu cpu2}\
${else}${if_match ${cpu cpu2}<100}${color1}0${color7}${cpu cpu2}\
${else}${color9}${cpu cpu2}${endif}${endif}${color}\
    3 ${if_match ${cpu cpu3}<10}${color1}00${color5}${cpu cpu3}\
${else}${if_match ${cpu cpu3}<100}${color1}0${color7}${cpu cpu3}\
${else}${color9}${cpu cpu3}${endif}${endif}${color}${font Monofur:size=6}

${font}CPU Fan${alignr 5}${color5}${platform f71882fg.2560 fan 1} ${color}rpm${font Monofur:size=6}

${font}Temperatures ${color7}${hr}${color}
${alignc}CPU  ${color5}${platform f71882fg.2560 temp 1}${color}°\
     MB  ${color5}${platform f71882fg.2560 temp 2}${color}°
${alignc}GPU  ${color5}${nvidia temp}${color}°\
     HD  ${color5}${execi 5 hddtemp -n /dev/sda}${color}°${font Monofur:size=6}

${font}Graphics GPU ${color5}${nvidia temp}${color}° ${color7}${hr}${color}
GPU ${color5}${nvidia gpufreq} ${color}MHz${alignr 5}MEM ${color5}${nvidia memfreq} ${color}MHz${font Monofur:size=6}

${font}Disk Activity ${color7}${hr}${color}
R${goto 40}${diskiograph_read /dev/sda 14,130 00ffff ff0000 5 -lt}${alignr 5}${color5}${diskio_read /dev/sda}${color}
W${goto 40}${diskiograph_write /dev/sda 14,130 ff0000 00ffff 5 -lt}${alignr 5}${color5}${diskio_write /dev/sda}${color}${font Monofur:size=6}

${font}Network ${color7}${hr}${color}
Dn${goto 40}${downspeedgraph eth0 14,130 00ffff ff0000 5 -lt}${alignr 5}${color5}${downspeedf eth0}${color}
Up${goto 40}${upspeedgraph eth0 14,130 ff0000 00ffff 5 -lt}${alignr 5}${color5}${upspeedf eth0}${color}${font Monofur:size=6}

${font}Transfer Totals ${color7}${hr}${color}
${color5}rx ↓${goto 85}${color0}tx ↑${goto 170}${color5}Total
${goto 5}${color}${execpi 3600 date --date="-1 day" | awk '{print $3" "$2" "$6}'}
${color5}${execpi 300 vnstat | grep "yesterday" | awk '{print $2" "$3"\
${color0}${goto 85}"$5" "$6 "\
${color5}${goto 170}" $8" "$9}'}
${goto 5}${color}${exec date --date="0 day" | awk '{print $3" "$2" "$6}'}
${color5}${execpi 300 vnstat | grep "today" | awk '{print $2" "$3"\
${color0}${goto 85}"$5" "$6"\
${color5}${goto 170}"$8" "$9}'}
${goto 5}${color}Current Week
${color5}${execpi 300 vnstat -w | grep "current week" | awk '{print $3" "$4 "\
${color0}${goto 85}" $6" "$7 "\
${color5}${goto 170}" $9" "$10}'}
${goto 5}${color}Last Week
${color5}${execpi 300 vnstat -w | grep "last week" | awk '{print $3" "$4"\
${color0}${goto 85}" $6" "$7 "\
${color5}${goto 170}" $9" "$10}'}
${goto 5}${color}Last 7 Days
${color5}${execpi 300 vnstat -w | grep "last 7 days" | awk '{print $4" "$5 "\
${color0}${goto 85}" $7" "$8 "\
${color5}${goto 170}" $10" "$11}'}
${goto 5}${color}${time %b %Y}
${color5}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $3" "$4}'}\
${color0}${goto 85}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $6" "$7}'}\
${color5}${goto 170}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $9" "$10}'}${font Monofur:size=6}

${font}${color}External Mounted fsys ${color7}${hr}${color}
${goto 5}${color}Size${goto 60}${color0}Free${goto 110}${color4}Used${goto 160}
${color5}${lua mount 6 mount}
${goto 5}${color}${lua mount 6 size}${goto 60}${color0}${lua mount 6 free}${goto 110}${color4}${lua mount 6 use%}${goto 160}${color5}${lua mount 6 fsys 9}
${color5}${lua mount 7 mount}
${goto 5}${color}${lua mount 7 size}${goto 60}${color0}${lua mount 7 free}${goto 110}${color4}${lua mount 7 use%}${goto 160}${color5}${lua mount 7 fsys 9}
${color5}${lua mount 8 mount}
${goto 5}${color}${lua mount 8 size}${goto 60}${color0}${lua mount 8 free}${goto 110}${color4}${lua mount 8 use%}${goto 160}${color5}${lua mount 8 fsys 9}
${color5}${lua mount 9 mount}
${goto 5}${color}${lua mount 9 size}${goto 60}${color0}${lua mount 9 free}${goto 110}${color4}${lua mount 9 use%}${goto 160}${color5}${lua mount 9 fsys 9}${font}
${color7}${hr 1}${color}
${color}Trash ${color9}${execi 15 du -sh ~/.local/share/Trash/files/ | awk '{print $1}' | sed '/^4.0K/ d'  | sed 's/$/ of trash!/'}


mounted.lua
Code: Select all
--[[partitions for conky by mrpeachy

##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
   for line in file:lines() do
      if string.find(line,"/dev/")~=nil then
      local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
      table.insert(fsys,fs)
      local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
      table.insert(size,sz)
      local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
      table.insert(used,us)
      local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
      table.insert(avail,av)
      local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
      table.insert(uperc,up)
      local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
      table.insert(mount,mn)
      end
   end
file:close()
conky_start=nil
end--timed section
return ""
end

function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
   if c~=0 then
   data=string.sub(data,1,c) or ""
   end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
   if c~=0 then
   data=string.sub(data,1,c) or ""
   end
else
data="check data type"
end
return data
end--end main function


Conky on the left uses mrpeachy's v9000 LUA weather script, you will need to get that if you do not have it.
Code: Select all
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal #override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
own_window_colour gray
own_window_class Conky
own_window_title Vert_Right

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

minimum_size 50 760     ## width, height
maximum_width 50       ## width, usually a good idea to equal minimum width

gap_x 10 # left-right
gap_y 10 # up-down

alignment tl #top_right
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Anonymous Pro:bold:size=8
xftfont Monofur:bold:size=10

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220   Gainsboro
color0 8FBC8F #143 188 143   DarkSeaGreen
color1 F0FFFF #240 255 255   Azure
color2 FF8C00 #255 140   0   DarkOrange
color3 7FFF00 #127 255   0   Chartreuse
color4 FFA07A #255 160 122   LightSalmon
color5 FFDEAD #255 222 173   NavajoWhite
color6 00BFFF #  0 191 255   DeepSkyBlue
color7 00FFFF #  0 255 255   Cyan
color8 FFFF00 #255 255   0   Yellow
color9 FF0000 #255   0   0    Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no #yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 1028

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
############### V9000 ########################################################
#starts the lua weather data gathering function, call once at top of conkyrc
 lua_load ~/v9000/v9000.lua
 lua_draw_hook_post weather
 lua_load /media/5/Conky/templates/S11_V9_R-template.lua
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.3}


S11_V9_R-template.lua
Code: Select all
--[[
 The latest script is a lua only weather script. aka: v9000
 http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

 the file:
 http://dl.dropbox.com/u/19008369/current%20v9000/v9000.tar.gz

 mrppeachys LUA Tutorial
 http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
-- default_font="CorporateMonoExtraBold"--font must be in quotes
-- default_font_size=10
default_font="monofur"   --font must be in quotes
default_font_size=13
default_color=0xffffff   --white
default_alpha=1      --fully opaque
default_image_width=20
default_image_height=20
-- ## New Options ###
-- ##################
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
datay=15      -- ↑↓
datayh=55
datayf=75
datayy=13      --datay+(datayy*1)

imgyh=165
imgyf=190
imgyy=39      -- imgy+(imgyy*1)

 out({c=0x00FFFF,a=1,x=12,y=15,txt="BsAs"})
-- today is
out({c=0x00FFFF,a=1,x=5,y=28,txt=forecast_day_short[1]})
out({c=0x00FFFF,a=1,x=35,y=datay+datayy,txt=forecast_date[1]})
-- out({c=0x00FFFF,,a=1,x=6,y=50,txt="cpu:"..conky_parse("${cpu}")})

out({c=0xF0FFFF,a=1,x=5,y=datay+(datayy*2),txt=low_temp[1]})
out({c=0xFF8C00,a=1,x=30,y=datay+(datayy*2),txt=high_temp[1]})
  image({x=5,y=45,h=45,w=45,file=weather_icon[1]})
--image({x=5,y=45,h=45,w=45,file="/media/5/Conky/images/red+x.png"})

out({c=0xFFDEAD,a=1,x=15,y=datay+(datayy*7),txt="NOW"})
out({c=0xF0FFFF,a=1,x=7,y=datay+(datayy*8),txt=now["temp"]})
out({c=0xFFDEAD,a=1,x=30,y=datay+(datayy*8),txt=now["feels_like"]})
image({x=5,y=120,h=45,w=45,file=now["weather_icon"]})
--image({x=5,y=120,h=45,w=45,file="/media/5/Conky/images/red+x.png"})

out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*12.5),txt="B.P."})
out({c=0xF0FFFF,a=1,x=5,y=datay+(datayy*13.4),txt=now["pressure_mb"]})
out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*14.5),txt="Hum"})
out({c=0xF0FFFF,a=1,x=30,y=datay+(datayy*14.5),txt=now["humidity"].."%"})
out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*15.5),txt="DP"})
out({c=0xF0FFFF,a=1,x=30,y=datay+(datayy*15.5),txt=now["dew_point"].."°"})
out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*16.5),txt="UV"})
out({c=0xF0FFFF,a=1,x=30,y=datay+(datayy*16.5),txt=uv_index_num[1]})
out({c=0xF0FFFF,a=1,x=5,y=datay+(datayy*17.5),txt=uv_index_txt[1]})

-- yellow line
image({w=45,h=1,x=5,y=datayh+(datayy*15),file="/media/5/Conky/images/yellow_1.png"})
out({c=0xFFDEAD,a=1,x=10,y=datayh+(datayy*16),txt="3 HRS"})
-- 3 hour output
-- 1st hour
out({c=0x00FFFF,a=1,x=11,y=datayh+(datayy*17),txt=now["fc_hour1_time_24"]..":00"})
image({x=25,y=imgyh+(imgyy*3),file=now["fc_hour1_wicon"]})
--image({x=25,y=imgyh+(imgyy*3),file="/media/5/Conky/images/red+x.png"})
out({c=0xF0FFFF,a=1,x=5,y=datayh+(datayy*18.5),txt=now["fc_hour1_temp"]})

-- 2nd hour
out({c=0x00FFFF,a=1,x=11,y=datayh+(datayy*20),txt=now["fc_hour2_time_24"]..":00"})
image({x=25,y=imgyh+(imgyy*4),file=now["fc_hour2_wicon"]})
--image({x=25,y=imgyh+(imgyy*4),file="/media/5/Conky/images/red+x.png"})
out({c=0xF0FFFF,a=1,x=5,y=datayh+(datayy*21.5),txt=now["fc_hour2_temp"]})

-- 3rd hour
out({c=0x00FFFF,a=1,x=11,y=datayh+(datayy*23),txt=now["fc_hour3_time_24"]..":00"})
image({x=25,y=imgyh+(imgyy*5),file=now["fc_hour3_wicon"]})
--image({x=25,y=imgyh+(imgyy*5),file="/media/5/Conky/images/red+x.png"})
out({c=0xF0FFFF,a=1,x=5,y=datayh+(datayy*24.5),txt=now["fc_hour3_temp"]})

-- start of forcast days
-- yellow line
image({w=45,h=1,x=5,y=datayf+(datayy*24.5),file="/media/5/Conky/images/yellow_1.png"})

out({c=0xFFDEAD,a=1,x=10,y=datayf+(datayy*25.5),txt="9 DAY"})
out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*26.5),txt=forecast_day_short[2]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*26.5),txt=forecast_date[2]})
image({x=25,y=imgyf+(imgyy*6),file=weather_icon[2]})
--image({x=25,y=imgyf+(imgyy*6),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*27.5),txt=high_temp[2]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*28.5),txt=low_temp[2]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*29.5),txt=forecast_day_short[3]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*29.5),txt=forecast_date[3]})
image({x=25,y=imgyf+(imgyy*7),file=weather_icon[3]})
--image({x=25,y=imgyf+(imgyy*7),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*30.5),txt=high_temp[3]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*31.5),txt=low_temp[3]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*32.5),txt=forecast_day_short[4]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*32.5),txt=forecast_date[4]})
image({x=25,y=imgyf+(imgyy*8),file=weather_icon[4]})
--image({x=25,y=imgyf+(imgyy*8),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*33.5),txt=high_temp[4]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*34.5),txt=low_temp[4]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*35.5),txt=forecast_day_short[5]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*35.5),txt=forecast_date[5]})
image({x=25,y=imgyf+(imgyy*9),file=weather_icon[5]})
--image({x=25,y=imgyf+(imgyy*9),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*36.5),txt=high_temp[5]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*37.5),txt=low_temp[5]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*38.5),txt=forecast_day_short[6]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*38.5),txt=forecast_date[6]})
image({x=25,y=imgyf+(imgyy*10),file=weather_icon[6]})
--image({x=25,y=imgyf+(imgyy*10),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*39.5),txt=high_temp[6]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*40.5),txt=low_temp[6]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*41.5),txt=forecast_day_short[7]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*41.5),txt=forecast_date[7]})
image({x=25,y=imgyf+(imgyy*11),file=weather_icon[7]})
--image({x=25,y=imgyf+(imgyy*11),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*42.5),txt=high_temp[7]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*43.5),txt=low_temp[7]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*44.5),txt=forecast_day_short[8]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*44.5),txt=forecast_date[8]})
image({x=25,y=imgyf+(imgyy*12),file=weather_icon[8]})
--image({x=25,y=imgyf+(imgyy*12),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*45.5),txt=high_temp[8]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*46.5),txt=low_temp[8]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*47.5),txt=forecast_day_short[9]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*47.5),txt=forecast_date[9]})
image({x=25,y=imgyf+(imgyy*13),file=weather_icon[9]})
--image({x=25,y=imgyf+(imgyy*13),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*48.5),txt=high_temp[9]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*49.5),txt=low_temp[9]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*50.5),txt=forecast_day_short[10]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*50.5),txt=forecast_date[10]})
image({x=25,y=imgyf+(imgyy*14),file=weather_icon[10]})
--image({x=25,y=imgyf+(imgyy*14),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*51.5),txt=high_temp[10]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*52.5),txt=low_temp[10]})

-- yellow line
--image({w=45,h=1,x=5,y=550,file="/media/5/Conky/images/yellow_1.png"})

--#######################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################


The bottom conky
  • Uses conkyEmail and is designed for 4 email accounts with a max of 99 new unread emails for each account, I'll never reach that - the Desktop I'm on at the time and the currency exchange rate.
Code: Select all
# To use #! in a conky use: ${exec echo '#!'}
# killall conky && conky -c /media/5/Conky/S11_Email_1.conky &
# WARNING: Change name and passwords on e-mail code if posting!!

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title Email 1 Line

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes # Options: yes or no

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 255

minimum_size 730 0  ##420 420   ## width, height
maximum_width 730     ##420       ## width

gap_x 0      ### left &right
gap_y 35      ### up & down

alignment bm
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur:bold:size=16
#xftfont White Rabbit:size=9

# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

default_color DCDCDC #220 220 220   Gainsboro
color0 8FBC8F #143 188 143   DarkSeaGreen
color1 778899 #119 136 153   LightSlateGray
color2 FF8C00 #255 140   0   DarkOrange
color3 7FFF00 #127 255   0   Chartreuse
color4 FFA07A #255 160 122   LightSalmon
color5 FFDEAD #255 222 173   NavajoWhite
color6 00BFFF #  0 191 255   DeepSkyBlue
color7 00FFFF #  0 255 255   Cyan
color8 FFFF00 #255 255   0   Yellow
color9 B22222 #178  34  34   FireBrick ##FF0000 #255   0   0   Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable the image cache.

imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#--------------------------------
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.2
#lua_draw_hook_post draw_bg 20 0 0 0 0 0x000000 0.2
#
# TEXT
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
##
#
#######################################################  End LUA Settings  ###
update_interval 1

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}\
Email   ${color5}C ${color7}${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD} == 0}\
00${else}\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD} < 9}0\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD}${else}\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD}\
${endif}${endif}\
:\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD} == 0}\
00${else}\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD} < 10}0\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD}${else}\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD}\
${endif}${endif}\
   ${color5}S ${color7}${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD} == 0}\
00${else}\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD} < 9}0\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD}${else}\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --port=NUMBER --username=USER-NAME --password=PASSWORD}\
${endif}${endif}\
:\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD} == 0}\
00${else}\
${if_match ${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD} < 10}0\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD}${else}\
${execi 90 conkyEmail --servername=MAIL-SERVER --servertype=POP --ssl --port=NUMBER --username=USER-NAME --password=PASSWORD}\
${endif}${endif}\
   ${color5}D ${color6}${desktop_name}\
   ${color5}1 CAD ${color}=${color7} ${execi 1800 wget --timeout=1.0 --tries=1 -O - http://themoneyconverter.com/rss-feed/CAD/rss.xml | grep "Argentine Peso" | cut -c 40-47}\
   ${color5}1 ARS ${color}=${color7} ${execi 1800 wget --timeout=1.0 --tries=1 -O - http://themoneyconverter.com/rss-feed/ARS/rss.xml | grep "Canadian Dollar" | cut -c 39-45}


draw-bg.lua - used by all conkys.
Code: Select all
--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

 lua_load ~/wea_conky/draw_bg.lua
 TEXT
 ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}

OR Both above TEXT (no composite manager required - no blinking!)

 lua_load ~/wea_conky/draw_bg.lua
 lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
 TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

######### calendar function ##################################################

then to use it, you activate the calendar function BELOW TEXT like this

${lua luacal {settings}}

#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
#    x=x position top left
#    y=y position top left
#    tf=title font, eg "mono" must be in quotes
#    tfs=title font size
#    tc=title color
#    ta=title alpha
#    bf=body font, eg "mono" must be in quotes
#    bfs=body font size
#    bc=body color
#    ba=body alpha
#    hf=highlight font, eg "mono" must be in quotes
#    hfs=highlight font size
#    hc=highlight color
#    ha=highlight alpha
#    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts

#    gt=gap from title to body
#    gh=gap horizontal between columns
#    gv=gap vertical between rows
#    sd=start day, 0=Sun, 1=Mon

#    hstyle = heading style, 0=just days, 1=date insert
#    tdf=title date font, eg "mono" must be in quotes
#    tdfs=title date font size
#    tdc=title date color
#    tda=title date alpha

# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}


]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf      or "mono"
local tfontsize=caltab.tfs   or 12
local tc=caltab.tc         or 0xffffff
local ta=caltab.ta         or 1
local bfont=caltab.bf      or "mono"
local bfontsize=caltab.bfs   or 12
local bc=caltab.bc         or 0xffffff
local ba=caltab.ba         or 1
local hfont=caltab.hf      or "mono"
local hfontsize=caltab.hfs   or 12
local hc=caltab.hc         or 0xff0000
local ha=caltab.ha         or 1
local spacer=caltab.sp      or " "
local gaph=caltab.gh      or 20
local gapt=caltab.gt      or 15
local gapl=caltab.gv      or 15
local sday=caltab.sd      or 0
local hstyle=caltab.hstyle   or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
    if i<=start_day then
    dnum[i]="  "
    else
    dn=i-start_day
        if dn=="nil" then dn=0 end
        if dn<=9 then dn=(spacer .. dn) end
        if i>x then dn="" end
        dnum[i]=dn
        dnumh[i]=dn
        if dn==(spacer .. today) or dn==today then
        dnum[i]=""
        end
        if dn==(spacer .. today) or dn==today then
        dnumh[i]=dn
        place=i
        else dnumh[i]="  "
        end
    end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
    if tonumber(sday)==0 then
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    else
    dys={"MO","TU","WE","TH","FR","SA","SU"}
    end
    --draw calendar titles
elseif hstyle==1 then
    if tonumber(sday)==0 then
    dys={"SU","MO"," ","  ","  ","FR","SA"}
    cairo_text_extents(cr,"MO",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    else
    dys={"MO","TU"," ","  ","  ","SA","SU"}
    cairo_text_extents(cr,"TU",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end
-- end main function #########################################################
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby MGDAVIE on Thu May 09, 2013 10:42 am

Nice! The Conky-Infinity isn't a easy one to configure. I'm a newb to Conky and that's the one I started with. I finally got every thing lined up and managed to get the network SSID under the IP Address.

Sent from my ADR6400L using Tapatalk 2
MGDAVIE
Level 1
Level 1
 
Posts: 1
Joined: Fri Jan 25, 2013 6:04 pm

Re: Conky Showoff thread

Postby grandtheft_jiujitsu on Mon May 13, 2013 5:49 pm

conky.jpg

Desktop.jpg


Note: I DID NOT make this conky myself. I installed it from (link below) and modified it to my liking. All development credit goes to NoobsLab. Also, I am aware that my "/" and "/home" directories are the same but I didn't realize that they should/could be different when I first installed linux and haven't gotten around to changing it.
Code: Select all
http://www.noobslab.com/2012/07/install-conky-two-gadget-in-ubuntulinux.html


~/.conkyrc reads...
Code: Select all
# Conky settings #
background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
#imlib_cache_size 0

temperature_unit fahrenheit

# Window specifications #
own_window_class Conky
own_window yes
own_window_type conky
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 350 550
maximum_width 550

alignment tr
gap_x -20
gap_y 22

# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# Text settings #
use_xft yes
override_utf8_locale yes
xftfont Pf Tempesta Five:bold:size=6
xftalpha 0.8
uppercase no

temperature_unit fahrenheit

default_color 333333
color0 6cde4b
color1 d5d5d5
color2 1994D1
color3 1994D1

# Lua Load  ##${voffset 750}
lua_load ~/two-noobslab-wgs/.conky/rings-v1.2.1.lua
lua_draw_hook_pre ring_stats


TEXT
${font Xirod:size=10}${goto 25}${color0}System Info${alignr 145}${font Pf Tempesta Five:bold:size=6}${alignr 145}${color1}${machine}
${font Pf Tempesta Five:bold:size=6}${goto 85}CPU ${alignr 145}${color1}${cpu}%
${font Pf Tempesta Five:bold:size=6}${goto 75}RAM${alignr 145}${memperc}% / ${memmax}
${font Pf Tempesta Five:bold:size=6}${goto 65}Temp${alignr 145}${acpitemp}°F
${font Pf Tempesta Five:bold:size=6}${goto 55}Uptime${alignr 145}${uptime_short}
${font Pf Tempesta Five:bold:size=6}${goto 45}Governor${alignr 145}${pre_exec cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}
${font Pf Tempesta Five:bold:size=6}${goto 45}I/O Scheduler${alignr 145}${ioscheduler sda}
${font Xirod:size=10}${alignr 100}${color0}${pre_exec cat /etc/issue.net}${font Pf Tempesta Five:bold:size=6}
${font Pf Tempesta:bold:size=6}${alignr 100}${color1}${kernel}
${font Xirod:size=8}${goto 115}${voffset 100}${color0}${time %A} - ${color0}${time %D}
${font Xirod:size=18}${goto 95}${color1}${time %H}:${time %M}
${font Xirod:size=10}${alignr 40}${voffset 10}${color0}INTERNET INFO
${font Pf Tempesta Five:bold:size=6}${goto 100}${color0}Network:  ${color1}${wireless_essid wlan0}
${font Pf Tempesta Five:bold:size=6}${goto 100}${color0}External IP: ${color1}${execi 3600 wget -O - http://ip.tupeux.com | tail}
${font Pf Tempesta Five:bold:size=6}${goto 100}${color1}Wfi Dwn:  ${downspeed wlan0} / ${color1}${totaldown wlan0}
${font Pf Tempesta Five:bold:size=6}${goto 100}Wifi Up:  ${upspeed wlan0} / ${color1}${totalup wlan0}
${font Pf Tempesta Five:bold:size=6}${goto 100}${color0}Eth0 IP: ${color1}${addr eth0}
${font PF Tempesta Five:bold:size=6}${goto 100}${color1}Eth0 Dwn:  ${downspeed eth0} / ${color1}${totaldown eth0}
${font PF Tempesta Five:bold:size=6}${goto 100}Eth0 Up:  ${upspeed eth0} / ${color1}${totalup eth0}
${font Xirod:size=10}${color0}${alignr 25}${voffset 20}BATERY
${font Xirod:size=8}${color1}${alignr 25}${color1}${battery BAT0}
${font Xirod:size=8}${alignr 25}${battery_time BAT0}
${font Pf Tempesta Five:bold:size=6}${goto 75}${voffset 20}${color0}Root:  ${color1}${fs_used_perc /}% / ${color1}${fs_size /}
${font Pf Tempesta Five:bold:size=6}${goto 75}${color0}Home:  ${color1}${fs_used_perc /home}% / ${color1}${fs_size /home}
${font Xirod:size=10}${color0}${goto 65}${voffset 2}HARD DRIVE


~/two-noobslab-wgs/.conky/rings-v1.2.1.lua reads...
Code: Select all
settings_table = {
   
    {
        name='cpu',
        arg='cpu0',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=215, y=100,
        radius=80,
        thickness=20,
        start_angle=0,
        end_angle=270
    },
    {
        name='memperc',
        arg='',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=215, y=100,
        radius=60,
        thickness=15,
        start_angle=0,
        end_angle=270
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=195, y=495,
        radius=30,
        thickness=15,
        start_angle=0,
        end_angle=270
    },
    {
        name='fs_used_perc',
        arg='/home',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cd34b,
        fg_alpha=0.8,
        x=195, y=495,
        radius=15,
        thickness=10,
        start_angle=0,
        end_angle=270
    },
    {
        name='time',
        arg='%S',
        max=60,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=90, y=200,
        radius=40,
        thickness=12,
        start_angle=180,
        end_angle=450
    },
     {
        name='time',
        arg='%M',
        max=60,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=90, y=200,
        radius=25,
        thickness=10,
        start_angle=180,
        end_angle=450
    },
    {
        name='time',
        arg='%H',
        max=24,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=90, y=200,
        radius=10,
        thickness=8,
        start_angle=180,
        end_angle=540
    },
       {
        name='battery_percent',
        arg='BAT0',
        max=100,
        bg_colour=0x000000,
        bg_alpha=0.2,
        fg_colour=0x6cde4b,
        fg_alpha=0.8,
        x=300, y=460,
        radius=18,
        thickness=10,
        start_angle=0,
   end_angle=360
    },
}

require 'cairo'

function rgb_to_r_g_b(colour,alpha)
   return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(cr,t,pt)
   local w,h=conky_window.width,conky_window.height
   
   local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
   local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

   local angle_0=sa*(2*math.pi/360)-math.pi/2
   local angle_f=ea*(2*math.pi/360)-math.pi/2
   local t_arc=t*(angle_f-angle_0)

   -- Draw background ring

   cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
   cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
   cairo_set_line_width(cr,ring_w)
   cairo_stroke(cr)
   
   -- Draw indicator ring

   cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
   cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
   cairo_stroke(cr)      
end

function conky_ring_stats()
   local function setup_rings(cr,pt)
      local str=''
      local value=0
      
      str=string.format('${%s %s}',pt['name'],pt['arg'])
      str=conky_parse(str)
      
      value=tonumber(str)
      if value == nil then value = 0 end
      pct=value/pt['max']
      
      draw_ring(cr,pct,pt)
   end

   if conky_window==nil then return end
   local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
   
   local cr=cairo_create(cs)   
   
   local updates=conky_parse('${updates}')
   update_num=tonumber(updates)
   
   if update_num>5 then
      for i in pairs(settings_table) do
         setup_rings(cr,settings_table[i])
      end
   end
   cairo_surface_destroy(cs)
  cairo_destroy(cr)
end
Keep your desktop smooth, clean, and sexy.
Asus N53SVxv1 - Linux Mint 15 - Cinnamon - Kernel (playing)
grandtheft_jiujitsu
Level 1
Level 1
 
Posts: 21
Joined: Sun Aug 26, 2012 11:31 pm
Location: Georgia, USA

Re: Conky Showoff thread

Postby rimbaum on Tue May 14, 2013 3:32 am

I just got conky today, and the Infinity theme for it caught my eye immediately. So here's some of the changes I made to it.

Image
User avatar
rimbaum
Level 1
Level 1
 
Posts: 42
Joined: Thu Mar 14, 2013 6:36 pm

Re: Conky Showoff thread

Postby d00med on Tue May 14, 2013 8:15 am

Whoah. Those are nice, clean conky configs.
User avatar
d00med
Level 4
Level 4
 
Posts: 314
Joined: Fri Nov 26, 2010 9:55 am

Re: Conky Showoff thread

Postby rimbaum on Fri May 17, 2013 2:47 am

I'm adding a separate battery ring to my conky config, and the battery percentage won't show up on the ring? I tried uncommenting the standard one that came with the lua script that you could use in place of cpu2, but that didn't work either. Can someone point me in the right direction? Here's the section for the battery ring.

Code: Select all
   {
      name='battery_percent',
      arg='bat1',
      max=100,
      bg_colour=0xffffff,
      bg_alpha=0.1,
      fg_colour=0xe00707,
      fg_alpha=0.8,
      x=165, y=170,
      radius=90,
      thickness=5,
      start_angle=210,
      end_angle=300
   },


I'm using an Asus x501a laptop with a standard battery. Do I need to use a different battery argument for my particular hardware?

EDIT: Turns out that the BAT1 that was included in the script, which I (incorrectly) assumed would work, wasn't default. I found the default battery object and it's working great now!

Image
User avatar
rimbaum
Level 1
Level 1
 
Posts: 42
Joined: Thu Mar 14, 2013 6:36 pm

Re: Conky Showoff thread

Postby grandtheft_jiujitsu on Tue May 21, 2013 1:11 am

Here is another I modified from
Code: Select all
http://www.noobslab.com/2012/11/install-conky123-in-ubuntulinux.html


Conky.jpg

Desktop.jpg


.conkrc
Code: Select all
#==============================================================================
#                                  conkyrc
#
#  display : horizontal ring gauge
#
#  author  : SLK
#  version : v20121005-01
#  license : Distributed under the terms of GNU GPL version 2 or later
#
#  Modified by : Umair - http://www.NoobsLab.com
#  Modified May 3013 : Grandtheft_JiuJitsu - Linux Mint Forums
#==============================================================================

background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
temperature_unit fahrenheit

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 0
gap_y 20
minimum_size 1850 300
maximum_width 1850
own_window yes
own_window_type conky
own_window_transparent yes
own_window_argb_visual yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
alignment top_middle

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

override_utf8_locale yes
use_xft yes
xftfont Sans:size=8
xftalpha 0.5
uppercase no

default_color FFFFFF
color0 6cde4b
color1 d5d5d5
color3 ffffff

lua_load ~/.conky/conky_grey.lua
lua_draw_hook_post main

TEXT
${font Sans:size=8}${alignc}${color1}${uid_name 1000} @ ${nodename} - for ${uptime_short}
${font Sans:size=18}${alignc}${color0}${pre_exec cat /etc/issue.net}${font Pf Tempesta Five:bold:size=6}
${font Sans:size=8}${alignc}${voffset 5}${color1}${kernel}
${font Sans:size=6}${alignc}${color1}${machine}
${font Sans:size=24}${alignc}${voffset 20}${color0}${time %H}:${time %M}
${font Sans:size=8}${alignc}${voffset -20}${color1}${time %A} - ${time %B %d}, ${time %Y}
${font Sans:bold:size=8}${voffset -130}${color0}Process${goto 105}PID${goto 152}CPU
${font Ubuntu Light:size=8}${color1}${top name 1}${goto 100}${top pid 1}${goto 150}${top cpu 1}
${font Ubuntu Light:size=8}${color1}${top name 2}${goto 100}${top pid 2}${goto 150}${top cpu 2}
${font Ubuntu Light:size=8}${color1}${top name 3}${goto 100}${top pid 3}${goto 150}${top cpu 3}
${font Ubuntu Light:size=8}${color1}${top name 4}${goto 100}${top pid 4}${goto 150}${top cpu 4}
${font Ubuntu Light:size=8}${color1}${top name 5}${goto 100}${top pid 5}${goto 150}${top cpu 5}
${font Ubuntu Light:size=8}${color1}${top name 6}${goto 100}${top pid 6}${goto 150}${top cpu 6}
${font Ubuntu Light:size=8}${color1}${top name 7}${goto 100}${top pid 7}${goto 150}${top cpu 7}
${font Ubuntu Light:size=10}${color1}${goto 320}${voffset -45}CPU${offset 200}RAM
${font Ubuntu Light:size=8}${color0}${goto 320}${cpu}% ${offset 210}${memperc}%
${font Sans:bold:size=8}${alignr}${voffset -95}${color0}Internet Info
${font Ubuntu Light:size=8}${alignr}${color1}${wireless_essid wlan0}${color0} - Network
${font Ubuntu Light:size=8}${alignr}${color1}${execi 3600 wget -O - http://ip.tupeux.com | tail}${color0} - External IP
${font Ubuntu Light:size=8}${alignr}${color1}${downspeed wlan0} / ${totaldown wlan0}${color0} - Wifi Down
${font Ubuntu Light:size=8}${alignr}${color1}${upspeed wlan0} / ${color1}${totalup wlan0}${color0} - Wifi Up
${font Ubuntu Light:size=8}${alignr}${color1}${addr eth0}${color0}${color0} - Eth0 IP
${font Ubuntu Light:size=8}${alignr}${color1}${downspeed eth0} / ${color1}${totaldown eth0}${color0} - Eth0 Dwn
${font Ubuntu Light:size=8}${alignr}${color1}${upspeed eth0} / ${color1}${totalup eth0}${color0} - Eth0 Up
${font Ubuntu Light:size=10}${color1}${alignr 270}${voffset -40}Home${offset -280}Root
${font Ubuntu Light:size=8}${color0}${alignr 190}${color0}${fs_used /home}/${fs_size /home}${offset -330}${fs_used /} / ${fs_size /}
${font Sans:size=8}${voffset -100}${color1}${goto 375}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 1-26}
${font Sans:size=8}${color0}${goto 430}${acpitemp}°F
${font Sans:size=8}${voffset -20}${alignr 380}${color1}Governor - ${pre_exec cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}
${font Sans:size=8}${alignr 370}${color0}I/O Scheduler - ${ioscheduler sda}
${font Sans:size=10}${alignc}${voffset 175}${color1}Battery
${font Sans:size=8}${alignc}${battery_percent}%


.conky/conky_grey.lua
* I haven't edited out all of the extra code from this, but the below will produce the above results
Code: Select all
--==============================================================================
--                                 conky_grey.lua
--
--  display : horizontal ring gauge
--
--  author  : SLK
--  version : v20121005-01
--  license : Distributed under the terms of GNU GPL version 2 or later
--
--  Modified May 15, 2013 by GrandTheft_JiuJitsu - Linux Mint Forums
--==============================================================================

require 'cairo'
--                                                                    gauge DATA
gauge = {
{
    name='cpu',                    arg='cpu',                  max_value=100,
    x=330,                          y=90,
    graph_radius=70,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xd5d5d5,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},
{
    name='memperc',                    arg='',                  max_value=100,
    x=560,                          y=90,
    graph_radius=70,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xd5d5d5,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},

{
    name='fs_used_perc',                    arg='/',                  max_value=100,
    x=1290,                          y=90,
    graph_radius=70,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},
{
    name='fs_used_perc',                    arg='/home',                  max_value=100,
    x=1540,                          y=90,
    graph_radius=70,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},
{
    name='battery_percent',                    arg='BAT0',                  max_value=100,
    x=927,                          y=225,
    graph_radius=50,
    graph_thickness=15,
    graph_start_angle=0,
    graph_unit_angle=3.59,          graph_unit_thickness=3.59,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0x6cde4b,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFF0708,       hand_fg_alpha=0,
    txt_radius=1,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFF0708,        txt_fg_alpha=0,
    graduation_radius=1,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=1,
    graduation_fg_colour=0xffffff, graduation_fg_alpha=0,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xffffff,    caption_fg_alpha=0,
},
}

-------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_clock_ring
-- displays clock
--
function draw_clock_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']

    -- background ring
    cairo_arc(display, x, y, graph_radius, 0, 2 * math.pi)
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value % max_value)
    local i = 1
    while i <= val do
        cairo_arc(display, x, y, graph_radius,(  ((graph_unit_angle * i) - graph_unit_thickness)*(2*math.pi/360)  )-(math.pi/2),((graph_unit_angle * i) * (2*math.pi/360))-(math.pi/2))
        cairo_set_source_rgba(display,rgb_to_r_g_b(graph_fg_colour,graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = (graph_unit_angle * i) - graph_unit_thickness

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = 360 / graduation_unit_angle
        local i = 1
        while i <= nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            cairo_arc(display, x, y, graduation_radius, (((graduation_unit_angle * i)-(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2),(((graduation_unit_angle * i)+(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360)-(math.pi/2)))
    local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    cairo_set_font_size (display, txt_size);
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha));
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3);
    cairo_show_text (display, value);
    cairo_stroke (display);
end

-------------------------------------------------------------------------------
--                                                              draw_gauge_ring
-- displays gauges
--
function draw_gauge_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_start_angle = data['graph_start_angle']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
    local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
    local graph_end_angle = (max_value * graph_unit_angle) % 360

    -- background ring
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = value % (max_value + 1)
    local start_arc = 0
    local stop_arc = 0
    local i = 1
    while i <= val do
        start_arc = (graph_unit_angle * i) - graph_unit_thickness
        stop_arc = (graph_unit_angle * i)
        cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
        cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = start_arc

    -- hand
    start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
    stop_arc = (graph_unit_angle * val)
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
    cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
    cairo_stroke(display)

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = graph_end_angle / graduation_unit_angle
        local i = 0
        while i < nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
            stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
            cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
    local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
    cairo_set_font_size (display, txt_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
    cairo_show_text (display, value)
    cairo_stroke (display)

    -- caption
    local caption = data['caption']
    local caption_weight, caption_size = data['caption_weight'], data['caption_size']
    local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
    local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
    cairo_set_font_size (display, caption_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
    cairo_move_to (display, x + tox + 5, y + toy + 1)
    -- bad hack but not enough time !
    if graph_start_angle < 105 then
        cairo_move_to (display, x + tox - 30, y + toy + 1)
    end
    cairo_show_text (display, caption)
    cairo_stroke (display)
end

-------------------------------------------------------------------------------
--                                                               go_clock_rings
-- loads data and displays clock
--
function go_clock_rings(display)
    local function load_clock_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_clock_ring(display, data, value)
    end
   
    for i in pairs(clock_h) do
        load_clock_rings(display, clock_h[i])
    end
    for i in pairs(clock_m) do
        load_clock_rings(display, clock_m[i])
    end
    for i in pairs(clock_s) do
        load_clock_rings(display, clock_s[i])
    end
end

-------------------------------------------------------------------------------
--                                                               go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_rings(display)
    local function load_gauge_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_gauge_ring(display, data, value)
    end
   
    for i in pairs(gauge) do
        load_gauge_rings(display, gauge[i])
    end
end

-------------------------------------------------------------------------------
--                                                                         MAIN
function conky_main()
    if conky_window == nil then
        return
    end

    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local display = cairo_create(cs)
   
    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)
   
    if update_num > 5 then
--        go_clock_rings(display)
        go_gauge_rings(display)
    end

    cairo_surface_destroy(cs)
    cairo_destroy(display)
end
Keep your desktop smooth, clean, and sexy.
Asus N53SVxv1 - Linux Mint 15 - Cinnamon - Kernel (playing)
grandtheft_jiujitsu
Level 1
Level 1
 
Posts: 21
Joined: Sun Aug 26, 2012 11:31 pm
Location: Georgia, USA

Linux Mint is funded by ads and donations.
 
Previous

Return to Compiz, Conky, Docks, & Widgets

Who is online

Users browsing this forum: No registered users and 0 guests