You are not logged in.

#951 2012-03-04 05:24:39

JuseBox
Member
Registered: 2009-11-27
Posts: 260

Re: conky configs and screenshots!

cRhYD.png
Top conky:

####
## starting from scratch
#  Conky config file .2conkyrc
#  by Grae
##

####
## begin setup config
#  general startup settings

background yes
update_interval 2.0
text_buffer_size 1024
total_run_times 0

## screen setup:
#  placement, sizing, font and color info

alignment top_left
gap_x 130
gap_y 35
minimum_size 220 0
maximum_width 1850
own_window yes
own_window_hints below,skip_pager,skip_taskbar,undecorated,sticky
# transparency:
own_window_argb_visual yes
own_window_argb_value 0
# font defaults:
use_xft yes
xftfont DroidSans:size=8
xftalpha 0.9
override_utf8_locale yes

## NOTE: Other fonts can be called up during the TEXT formatting
#  these fonts are found through the normal path, or ~/.fonts
#  OpenLogos

## images, buffering, shading
imlib_cache_size 60
double_buffer yes
draw_shades yes
default_shade_color 777777

## misc text formatting
short_units yes
pad_percents 0
border_inner_margin 0
uppercase no
use_spacer right

## outlines and borders
draw_outline no
draw_borders no
draw_graph_borders no
border_width 0

## stdout/console printing
out_to_ncurses no
out_to_console no

## process settings
top_name_width 5
#no_buffers yes

#### end config

#### Begin display information
## everything below 'TEXT' is drawn on screen

TEXT
${color white}UpTime: ${color black}$uptime \
${color white}Kern: ${color black}$kernel \
${color white}Load: ${color black}$loadavg \
${color white}Processes: ${color black}$processes \
${color white}Running: ${color black}$running_processes \
${color white}Highest CPU: \
${color black}${top name 1}${top_mem cpu 1} ${color black} \
${color white}Highest MEM: \
${color black}${top_mem name 1}${top_mem mem 1} ${color black} \
${color white}MEM: ${color black} $memperc% $mem/$memmax \
${color white}SWAP: ${color black}$swapperc% $swap/$swapmax \
${color white}ROOT: ${color black}${fs_free /}/${fs_size /} \
${color white}HOME: ${color black}${fs_free /home}/${fs_size /home} \
${color white}HDD: ${color black}${fs_free /media/5488D87039562188}/${fs_size /media/5488D87039562188} \
${color white}NET: \
${color white}Up: ${color black}${upspeed eth0} k/s \
${color white}Down: ${color black}${downspeed eth0}k/s${color}

Log conky:

####
## starting from scratch
#  Conky config file .2conkyrc
#  by Grae
##

####
## begin setup config
#  general startup settings

background yes
update_interval 2.0
text_buffer_size 1024
total_run_times 0

## screen setup:
#  placement, sizing, font and color info

alignment top_right
gap_x 60
gap_y 0
minimum_size 220 200
maximum_width 1024
own_window yes
own_window_hints below,skip_pager,skip_taskbar,undecorated,sticky
# transparency:
own_window_argb_visual yes
own_window_argb_value 0
# font defaults:
use_xft yes
xftfont DroidSans:size=8
xftalpha 0.9
override_utf8_locale yes

## NOTE: Other fonts can be called up during the TEXT formatting
#  these fonts are found through the normal path, or ~/.fonts
#  OpenLogos

## images, buffering, shading
imlib_cache_size 60
double_buffer yes
draw_shades yes
default_shade_color 777777

## misc text formatting
short_units yes
pad_percents 0
border_inner_margin 0
uppercase no
use_spacer right

## outlines and borders
draw_outline no
draw_borders no
draw_graph_borders no
border_width 0

## stdout/console printing
out_to_ncurses no
out_to_console no

## process settings
top_name_width 5
#no_buffers yes

#### end config

#### Begin display information
## everything below 'TEXT' is drawn on screen

TEXT
${voffset 70}
${color white}/var/log/everything.log:
${color black}${exec tail -n10 /var/log/everything.log}

${color white}dmesg:
${color black}${exec dmesg | tail -n10}

${color white}/var/log/pacman.log:
${color black}${exec tail -n10 /var/log/pacman.log}

${color white}/var/log/daemon.log:
${color black}${exec tail -n10 /var/log/daemon.log}

${color red}/var/log/errors.log:
${color black}${exec tail -n10 /var/log/errors.log}

${color white}/var/log/auth.log:
${color black}${exec tail -n10 /var/log/auth.log}

Linux ArchLinux 3.2.8-1-ARCH
#1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux
8192MB DDR3 1300MHz | Asus m5a97 | GeForce GTX 550 Ti | 120 GB SSD

Offline

#952 2012-03-10 01:22:52

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

JuseBox wrote:

Log conky:

Thank you for the idea:

I've been in/out - over/under - up/down - left/right all day ... am I coming or going, I'm not sure?

What I am sure of is the list!

I came up with the idea from JuseBOX on the ARCH forums - and thought mrpeachy's "interactive" LUA script for conky would make a great conky for that!

So lets get this straight; not my idea, not my work, JuseBOX and mrpeachy own this.

It starts: http://crunchbanglinux.org/forums/post/197902/#p197902  (watch a video of it in action!)

Click on [Logs] 7b6649178947056.jpg -> the List: 774aa6178981868.jpg

Click on one: 8d9177178947220.jpg -> on [Close] go go back to [Logs] -

Select another: ca38ef178947207.jpg more -> f884b1178947190.jpg

Yup, LUA is more than just a pretty face and eye candy ... it Works for ya!

Now I have to try the folding lines one.

conky

# To use #! in a conky use: ${exec echo '#!'}
# killall conky && conky -c ~/Conky/S11_LOGS.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_colour brown
own_window_class click_log
own_window_title click_log  ##### NOTE instruction in the LUA script! I changed it!

# 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 override'
#                                                own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 200

minimum_size 900 900     ## width, height
maximum_width 900       ## 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:size=9

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

draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 9ACD32 #YellowGreen
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #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 2048

# 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

##############################################  End Miscellaneous Section  ###
###  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 ~/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
#
## Calling the weather script
#
# lua_load ~/v9000/v9000.lua
# lua_draw_hook_post weather
# lua_load ~/Conky/templates/v9003-V-template.lua
#
#starts the lua weather data gathering function, call once at top of conkyrc
##
#######################################################  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


# Load Lua scripts
#lua_load ~/Conky/LUA/clock.lua
#lua_draw_hook_pre draw_clock

lua_load ~/Conky/LUA/s11buttons.lua
lua_draw_hook_pre conky_main


## on blank line after text!
TEXT

s11buttons.lua

--[[conky interactive log messages by mrpeachy 03/12
http://youtu.be/SQVX3sgXdnA
call in conkyrc in a similar manner to this
lua_load /home/mcdowall/lua/filename.lua
lua_draw_hook_pre draw_main

in the conkyrc you also need to add this setting

own_window_title click_log

or you can set your own window title then edit towards the bottom of the script
so that any instances of click_log are replaced with the title you set
avoid spaces in title name

]]

require 'cairo'
start=1
buttons={}
buttons[1]=0
text_table={}
--------------------------------------------------------------------------------
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--get click coordinates
localx,localy=clickfunction()--dont edit
--##############################################
--SETTINGS #####################################
--set message length
local tail_length=1
commands={
"dmesg",
"/var/log/alternatives.log",
"/var/log/alternatives.log.1",
"/var/log/apt/history.log",
"/var/log/apt/term.log",
"/var/log/ConsoleKit/history",
"/var/log/ConsoleKit/history.1",
"/var/log/dpkg.log",
"/var/log/dpkg.log.1",
"/var/log/fontconfig.log",
"/var/log/installer/hardware-summary",
"/var/log/installer/lsb-release",
"/var/log/nvidia-installer.log",
"/var/log/pm-powersave.log",
"/var/log/pm-powersave.log.1",
"/var/log/sgfxi/sgfxi.log.1",
"/var/log/smxi.log",
"/var/log/Xorg.0.log",
"/var/log/Xorg.1.log",
"/var/log/Xorg.2.log",
}
--setup list table
list={
"dmesg",
"alternatives.log",
"alternatives.log.1",
"apt/history.log",
"apt/term.log",
"ConsoleKit/history",
"ConsoleKit/history.1",
"dpkg.log",
"dpkg.log.1",
"fontconfig.log",
"installer/hardware-summary",
"installer/lsb-release",
"nvidia-installer.log",
"pm-powersave.log",
"pm-powersave.log.1",
"sgfxi/sgfxi.log.1",
"smxi.log",
"Xorg.0.log",
"Xorg.1.log",
"Xorg.2.log",
}
--set list font and size
local list_font="Anonymous Pro"
local list_fsize=12
--set text properties for LOG main button
local log_text="[Logs]"
local log_font="Anonymous Pro"
local log_fsize=12
--set button top left corner coordinates and width/heioght
local log_tlx=20.5
local log_tly=20.5
--need to set the top left corner of the top button in the list
local list_tlx=100.5
local list_tly=20.5
--set gap between buttons
local gap=5
--setup sections###############################
--set topl left coords and size of close button
local tlx_close=300.5
local tly_close=20.5
--set text properties for CLOSE main button
local close_text="[Close]"
local close_font="Anonymous Pro"
local close_fsize=12
--set properties for section display text
local section_font="Anonymous Pro"
local section_fsize=12
local section_blx=20.5
local section_bly=50.5
--set how many lines to show
local max_lines=60
local line_height=12
--END OF SETTINGS ########################################
--########################################################
--calculate number of entries in the above table
number_in_list=#list
--main button, button1 ###################################
--get dimensions of log text
cairo_select_font_face (cr, log_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, log_fsize)
--get font height
extents=cairo_text_extents_t:create()
cairo_text_extents(cr,log_text,extents)
local log_height=extents.height
local log_width=extents.width
--########################################################
--calculate if click was inside box
if localx>=log_tlx and localx<=log_tlx+log_width and localy>=log_tly and localy<=log_tly+log_height and buttons[1]~=1 then
buttons[1]=1
elseif localx>=log_tlx and localx<=log_tlx+log_width and localy>=log_tly and localy<=log_tly+log_height and buttons[1]==1 then
buttons[1]=0
end
if buttons[1]==1 then
color={1,0,0,1}--set on color red
elseif buttons[1]==0 then
color={1,1,1,1}--offcolor white
end
cairo_set_source_rgba (cr,color[1],color[2],color[3],color[4])
--[[draw the box for positioning purposes, you can comment out the draw commands later
cairo_set_line_width (cr,1)
cairo_rectangle (cr,tlx,tly,width,height)
cairo_stroke (cr)--]]
--write title
cairo_move_to (cr,log_tlx,log_tly+log_height)
cairo_show_text (cr,log_text)
cairo_stroke (cr)
--------------------------------------------------------------------------------------
--if the main button is clicked then all this stuff will happen
if buttons[1]==1 then 
--generate buttons
cairo_select_font_face (cr, list_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, list_fsize)
--get font height
local getheight_text="the quick brown fox jumps over the lazy dog"
extents=cairo_text_extents_t:create()
cairo_text_extents(cr,getheight_text,extents)
list_height=extents.height--dont localize
for i=1,number_in_list do --use a for loop to generate all the buttons with a single code chunk
--###########################################################
--buttons--##################################################
--calculate width and height based on text and font and fsize
local list_text=list[i]
extents=cairo_text_extents_t:create()
cairo_text_extents(cr,list_text,extents)
local list_width=extents.width
--###########################################################
--calculate if click is inside buttons
    if localx>=list_tlx and localx<=list_tlx+list_width and localy>=list_tly+((gap+list_height)*(i-1)) and localy<=list_tly+((gap+list_height)*(i-1))+list_height and buttons[tostring("button1_"..i)]~=1 then
    buttons[tostring("button1_"..i)]=1
    elseif localx>=list_tlx and localx<=list_tlx+list_width and localy>=list_tly+((gap+list_height)*(i-1)) and localy<=list_tly+((gap+list_height)*(i-1))+list_height and buttons[tostring("button1_"..i)]==1 then
    buttons[tostring("button1_"..i)]=0
    end
if buttons[tostring("button1_"..i)]==1 then
color={1,0,0,1}--set on color red
--also going to turn off all the other buttons
        n=i
        for i=1,number_in_list do
            if i~=n then
            buttons[tostring("button1_"..i)]=0
            end
        end
        buttons[1]=0
else--if buttons[tostring("button1_"..i)]==0 then
color={1,1,1,1}--offcolor white
end
cairo_set_source_rgba (cr,color[1],color[2],color[3],color[4])
--[[draw the box for positioning purposes, you can comment out the draw commands later
cairo_set_line_width (cr,1)
cairo_rectangle (cr,tlx,tly+((gap+height)*(i-1)),width,height)
cairo_stroke (cr)--]]
--------------------------------------------------------------------------------------
--write titles
cairo_move_to (cr,list_tlx,list_tly+((gap+list_height)*(i-1))+list_height)
cairo_show_text (cr,list_text)
cairo_stroke (cr)
end--for loop
end--if main button=1
--############################################################
--activate the function
--get dimensions of close text
cairo_select_font_face (cr, close_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, close_fsize)
--get font height
extents=cairo_text_extents_t:create()
cairo_text_extents(cr,close_text,extents)
local height_close=extents.height
local width_close=extents.width
for i=1,number_in_list do
    if buttons[tostring("button1_"..i)]==1 then
if get_text~=1 then
text_table={}
--do the thing and put it in table
if i>1 then
    local file = assert(io.open(tostring(commands[i]), "r"))
    for line in file:lines() do 
    table.insert(text_table,line)
    end
    file:close()
    get_text=1
elseif i==1 then
    local file = io.popen(tostring(commands[i]))
    for line in file:lines() do 
    table.insert(text_table,line)
    end
    file:close()
    get_text=1    
end
end
    cairo_set_source_rgba (cr,1,1,1,1)    
    cairo_select_font_face (cr, section_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, section_fsize)
    for i=1,max_lines do
    cairo_move_to (cr,section_blx,section_bly+((i-1)*line_height))
    cairo_show_text (cr,text_table[i])
    cairo_stroke (cr)    
    end
    cairo_set_source_rgba (cr,1,1,1,1)    
    cairo_select_font_face (cr, list_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, list_fsize)
    cairo_move_to (cr,list_tlx,list_tly+list_height)
    cairo_show_text (cr,list[i])
    cairo_stroke (cr)    
    --loadstring('button1_'..i..'display("'..section_font..'",'..section_fsize..','..section_blx..','..section_bly..')')()
    --close button- turns everything off back to start position
    --calculate if click was inside box
    if localx>=tlx_close and localx<=tlx_close+width_close and localy>=tly_close and localy<=tly_close+height_close and buttons[2]~=1 then
    buttons[2]=1
    elseif localx>=tlx_close and localx<=tlx_close+width_close and localy>=tly_close and localy<=tly_close+height_close and buttons[2]==1 then
    buttons[2]=0
    end
    if buttons[2]==1 then
    color={1,0,0,1}--set on color red    
            for i=1,number_in_list do
                buttons[tostring("button1_"..i)]=0
            end
            buttons[1]=0
            buttons[2]=0
            get_text=0
    else
    color={1,1,1,1}--offcolor white
    end
    cairo_set_source_rgba (cr,color[1],color[2],color[3],color[4])
    --[[draw the box for positioning purposes, you can comment out the draw commands later
    cairo_set_line_width (cr,1)
    cairo_rectangle (cr,tlx_close,tly_close,width_close,height_close)
    cairo_stroke (cr)--]]
    --write titles
    cairo_select_font_face (cr, close_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, close_fsize)
    cairo_move_to (cr,tlx_close,tly_close+height_close)
    cairo_show_text (cr,close_text)
    cairo_stroke (cr)
    end--if button =1
end--for i=
--#########################################################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end--end main function

function clickfunction()
--start click logging and calculations ##########################################
if start==1 then
xdot=conky_parse("${if_running xdotool}1${else}0${endif}")
    if tonumber(xdot)==1 then
    os.execute("/usr/bin/killall xdotool && echo 'xdo killed' &")
    end
os.execute("xdotool search --name click_log behave %@ mouse-click getmouselocation >> /tmp/xdo &")
start=nil--]]
local f = io.popen("xwininfo -name 'click_log' | grep 'Absolute'")
geometry = f:read("*a")
f:close()
geometry=string.gsub(geometry,"[\n]","")
s,f,abstlx=string.find(geometry,"X%p%s*(%d*)")
s,f,abstly=string.find(geometry,"Y%p%s*(%d*)")
end--if start=1 ######################################
--click calculations #################################
local f=io.open("/tmp/xdo")
click=f:read()
f:close()
    if click~=nil then
    local f = io.open("/tmp/xdo","w")
    f:write("")
    f:close() 
    end--if click=nil
if click==nil then click="x:0 y:0 " end
s,f,mousex=string.find(click,"x%p(%d*)%s")
s,f,mousey=string.find(click,"y%p(%d*)%s")
mousex=tonumber(mousex)
mousey=tonumber(mousey)
localx=mousex-abstlx
localy=mousey-abstly
--END CLICK CALCULATIONS #################################
return localx,localy
end--function

Enjoy also check out: interactive weather thread on crunchbang forum

Yes, folks - interactive conkys are now available!
Imagine the possibilities!

Offline

#953 2012-03-21 10:36:14

Zanterian
Member
From: Canada
Registered: 2011-03-08
Posts: 9

Re: conky configs and screenshots!

Conky + lua sure is a lot of fun!

Although there is no real practical use to mine other than looking pretty.
I can't believe I put so much effort into something I won't even look at 99% of the time haha

My computer has a core i7 in it. It is a quad core with hyperthreading, so usually hardware monitors detects 8 cores (which is kind of hard to keep track of!!)
To deal with this, I wrote the circles that represent a core. The outline of the circle (green) will give a percentage of one thread, while the inside of the circle (purple) will keep track of the second.

A core with both threads running at 100% will then look like a circle with a green outline and a completely filled purple interior.
I am still playing around with color combos for more ideas.

Below is a comparison of my system in both extremes: idle (left) and full usage (right)
tZDNlbAtZDNlcg

I would like to thank VirtualBox for making 100% cpu usage just one click away.

EDIT:
I realized I didn't actually share my configuration. That's not very acceptable. The configuration is actually a bit complicated, as each ring gets its own script that get's called up. This allows for the movement of individual gauges without messing up the rest of the system.


It's all on github found here:
https://github.com/LabDwellers/ConkyCon … ster/Zanty

My setup uses the lua conky from the aur.

Last edited by Zanterian (2012-03-31 06:45:46)

Offline

#954 2012-03-27 04:34:37

enifeder
Member
Registered: 2012-03-21
Posts: 13

Re: conky configs and screenshots!

Hey all,

Thought I would chuck mine up, it is a bit of a work in progress.

conkyscreenshot.jpg

The .conkyrc:

alignment bottom_left
background yes
cpu_avg_samples 5
net_avg_samples 5
out_to_console no
own_window_transparent yes
update_interval 2
own_window no
double_buffer yes
minimum_size 5 5
draw_shades yes
draw_outline no
draw_borders yes
stippled_borders 0
border_width 2
default_color black
default_outline_color white
default_shade_color black
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
gap_x 20
gap_y 100 
minimum_size 5 300
maximum_width 300
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
own_window_transparent yes
own_window_type desktop
stippled_borders 0
uppercase no
use_spacer right
mpd_host 0.0.0.0
mpd_port 6600
use_xft yes
xftfont Courier 10 Pitch 426:size=8
xftalpha 0.8

# stuff after 'TEXT' will be formatted on screen
TEXT
${image ~/conky.png -s 300x225}













${font Arial:size=9}${color #e43526}SYSTEM ${color DarkSlateGray}${hr 2}{$font}
${color #597DB2}Kernel: ${color #000000}$kernel ${color #597DB2}${alignr}Uptime: ${color #000000}$uptime
${color #597DB2}CPU   : ${color #000000}$freq MHz   $cpu%
${color #597DB2}${cpugraph 15,300 fef7b2 e18522}
${color #597DB2}RAM	${alignr}:	${color #000000}$memmax     $memperc% ${color #597DB2}${membar 6,150}

${color #597DB2}CPU: ${color #000000}${execi 6 /usr/bin/sensors | grep "CPU T" | cut -d"+" -f2 | cut -d"." -f1}${iconv_start UTF-8 ISO_8859-1} °${iconv_stop}C       ${color #597DB2}Motherboard: ${color #000000}${execi 6 /usr/bin/sensors | grep "MB T" | cut -d"+" -f2 | cut -d"." -f1}${iconv_start UTF-8 ISO_8859-1} °${iconv_stop}C       ${color #597DB2}HDD: ${color #000000}${hddtemp /dev/sda}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C

${font Arial:size=9}${color #e43526}DISK ${color DarkSlateGray}${hr 2}{$font}
${color #597DB2}/	${alignr}:	${color #000000}${fs_size /}     ${fs_used_perc /}% ${color #597DB2}${fs_bar 6,150 /}
${color #597DB2}/home	${alignr}:	${color #000000}${fs_size /home}     ${fs_used_perc /home}% ${color #597DB2}${fs_bar 6,150 /home}

${font Arial:size=9}${color #e43526}PROCESSES ${color DarkSlateGray}${hr 2}{$font}
${color #597DB2}Processes: ${color #000000}$processes  ${alignr}${color #597DB2}Running: ${color #000000}$running_processes

${color #597DB2}CPU Usage ${alignr}PID   CPU%  MEM%
  ${color #000000}${top name 1}${alignr}${top pid 1}  ${top cpu 1}  ${top mem 1} 
  ${color #000000}${top name 2}${alignr}${top pid 2}  ${top cpu 2}  ${top mem 2} 
  ${color #000000}${top name 3}${alignr}${top pid 3}  ${top cpu 3}  ${top mem 3} 
${color #597DB2}Memory Usage 
  ${color #000000}${top_mem name 1}${alignr}${top_mem pid 1}  ${top_mem cpu 1}  ${top_mem mem 1} 
  ${color #000000}${top_mem name 2}${alignr}${top_mem pid 2}  ${top_mem cpu 2}  ${top_mem mem 2} 
  ${color #000000}${top_mem name 3}${alignr}${top_mem pid 3}  ${top_mem cpu 3}  ${top_mem mem 3} 

${font Arial:size=9}${color #e43526}NETWORK ${color DarkSlateGray}${hr 2}{$font}
${color #597DB2}Local IP : ${color #000000}${addr eth0} ${alignr}${color #597DB2}Public IP : ${color #000000}${texeci 1800 ~/.scripts/externalIp.sh}

${color #597DB2}Down : ${color #000000}${downspeed eth0}${color #597DB2}${alignr}Total : ${color #000000}${totaldown eth0}
${color #597DB2}${downspeedgraph eth0 15,300 fef7b2 ff0000}
${color #597DB2}Up     : ${color #000000}${upspeed eth0}${color #597DB2}${alignr}Total : ${color #000000}${totalup eth0}
${color #597DB2}${upspeedgraph eth0 15,300 fef7b2 00ff00}$color

${font Arial:size=9}${color #e43526}UPDATES ${color DarkSlateGray}${hr 2}{$font}
${color #000000}${alignr}${texeci 1800 ~/.scripts/archupdate.py}

${font Arial:size=9}${color #e43526}GMAIL ${color DarkSlateGray}${hr 2}{$font}
${color #000000}${alignr}${texeci 1800 ~/.scripts/gmail.pl e}

The gmail.pl script

#!/usr/bin/perl

use Switch;
use Text::Wrap;

my $what=$ARGV[0];

$user="youremail"; #username for gmail account (Does not need '@gmail....')
$pass="yourpassword"; #password for gmail account
$file="/tmp/gmail.html"; #temporary file to store gmail

#wrap format for subject
$Text::Wrap::columns=65; #Number of columns to wrap subject at
$initial_tab=""; #Tab for first line of subject
$subsequent_tab="\t"; #tab for wrapped lines
$quote="\""; #put quotes around subject

#limit the number of emails to be displayed
$emails=4; #if -1 display all emails

&passwd; #give password the proper url character encoding

switch($what){ #determine what the user wants
	case "n" {&gmail; print "$new\n";} #print number of new emails
	case "s" { #print $from and $subj for new email
		&gmail;
		if ($new>0){
			my $size=@from;
			if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
			for(my $i=0; $i<$size; ++$i){
				print "From: $from[$i]\n"; #print from line
				$text=$quote.$subj[$i].$quote."\n";
				print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
			}
			$size=@from;
			if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
		}
	} 	
	case "e" { #print number of new emails, $from, and $subj
		&gmail;
		if($new==0){print "You have no new emails\n";}
		else{
			print "You have $new new email(s)";
			my $size=@from;
			if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
			for(my $i=0; $i<$size; ++$i){
				print "\nFrom: $from[$i]\n"; #print from line
				$text=$quote.$subj[$i].$quote;
				print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
			}
			$size=@from;
			if ($emails!=-1 && $size >$emails){print "\n$emails out of $size new emails displayed\n";}
		}
	}
	else {
		print "Usage Error: gmail.pl <option>\n";
		print "\tn displays number of new emails\n";
		print "\ts displays from line and subject line for each new email.\n";
		print "\te displays the number of new emails and from line plus \n";
		print "\t\tsubject line for each new email.\n";
	} #didn't give proper option
}

sub gmail{
	if(!(-e $file)){ #create file if it does not exists
		`touch $file`;
	} 

	#get new emails
	`wget -O - https://$user:$pass\@mail.google.com/mail/feed/atom --no-check-certificate> $file`;

	open(IN, $file); #open $file

	my $i=0; #initialize count
	$new=0; #initialize new emails to 0

	my $flag=0;

	while(<IN>){ #cycle through $file
		if(/<entry>/){$flag=1;}
		elsif(/<fullcount>(\d+)<\/fullcount>/){$new=$1;} #grab number of new emails
		elsif($flag==1){ 
			if(/<title>.+<\/title>/){push(@subj, &msg);} #grab new email titles
			elsif(/<name>(.+)<\/name>/){push(@from, $1); $flag=0;} #grab new email from lines
		}
	}

	close(IN); #close $file
}

sub passwd{ #change to url escape codes in password
	#URL ESCAPE CODES
	$_=$pass;
	s/\%/\%25/g;
	s/\#/\%23/g;
	s/\$/\%24/g;
	s/\&/\%26/g;
	s/\//\%2F/g;
	s/\:/\%3A/g;
	s/\;/\%3B/g;
	s/\</\%3C/g;
	s/\=/\%3D/g;
	s/\>/\%3E/g;
	s/\?/\%3F/g;
	s/\@/\%40/g;
	s/\[/\%5B/g;
	s/\\/\%5C/g;
	s/\]/\%5D/g;
	s/\^/\%5E/g;
	s/\`/\%60/g;
	s/\{/\%7B/g;
	s/\|/\%7C/g;
	s/\}/\%7D/g;
	s/\~/\%7E/g;
	$pass=$_;
}

sub msg{
	#THE HTML CODED CHARACTER SET [ISO-8859-1]
	chomp; s/<title>(.+)<\/title>/$1/; #get just the subject
	#now replace any special characters
	s/\&\#33\;/!/g;        #Exclamation mark
	s/\&\#34\;/"/g; s/\&quot\;/"/g;      #Quotation mark
	s/\&\#35\;/#/g;        #Number sign
	s/\&\#36\;/\$/g;        #Dollar sign
	s/\&\#37\;/%/g;        #Percent sign
	s/\&\#38\;/&/g; s/\&amp\;/&/g;        #Ampersand
	s/\&\#39\;/'/g;        #Apostrophe
	s/\&\#40\;/(/g;        #Left parenthesis
	s/\&\#41\;/)/g;        #Right parenthesis
	s/\&\#42\;/*/g;        #Asterisk
	s/\&\#43\;/+/g;        #Plus sign
	s/\&\#44\;/,/g;        #Comma
	s/\&\#45\;/-/g;        #Hyphen
	s/\&\#46\;/./g;        #Period (fullstop)
	s/\&\#47\;/\//g;        #Solidus (slash)
	s/\&\#58\;/:/g;        #Colon
	s/\&\#59\;/\;/g;        #Semi-colon
	s/\&\#60\;/</g; s/\&lt\;/</g;        #Less than
	s/\&\#61\;/=/g;        #Equals sign
	s/\&\#62\;/>/g; s/\&gt\;/>/g;        #Greater than
	s/\&\#63\;/\?/g;        #Question mark
	s/\&\#64\;/\@/g;        #Commercial at
	s/\&\#91\;/\[/g;        #Left square bracket
	s/\&\#92\;/\\/g;        #Reverse solidus (backslash)
	s/\&\#93\;/\]/g;        #Right square bracket
	s/\&\#94\;/\^/g;        #Caret
	s/\&\#95\;/_/g;        #Horizontal bar (underscore)
	s/\&\#96\;/\`/g;        #Acute accent
	s/\&\#123\;/\{/g;        #Left curly brace
	s/\&\#124\;/|/g;        #Vertical bar
	s/\&\#125\;/\}/g;        #Right curly brace
	s/\&\#126\;/~/g;        #Tilde
	s/\&\#161\;/¡/g;        #Inverted exclamation
	s/\&\#162\;/¢/g;        #Cent sign
	s/\&\#163\;/£/g;        #Pound sterling
	s/\&\#164\;/¤/g;        #General currency sign
	s/\&\#165\;/¥/g;        #Yen sign
	s/\&\#166\;/¦/g;        #Broken vertical bar
	s/\&\#167\;/§/g;        #Section sign
	s/\&\#168\;/¨/g;        #Umlaut (dieresis)
	s/\&\#169\;/©/g; s/\&copy\;/©/g;        #Copyright
	s/\&\#170\;/ª/g;        #Feminine ordinal
	s/\&\#171\;/«/g;        #Left angle quote, guillemotleft
	s/\&\#172\;/¬/g;        #Not sign
	s/\&\#174\;/®/g;        #Registered trademark
	s/\&\#175\;/¯/g;        #Macron accent
	s/\&\#176\;/°/g;        #Degree sign
	s/\&\#177\;/±/g;        #Plus or minus
	s/\&\#178\;/²/g;        #Superscript two
	s/\&\#179\;/³/g;        #Superscript three
	s/\&\#180\;/´/g;        #Acute accent
	s/\&\#181\;/µ/g;        #Micro sign
	s/\&\#182\;/¶/g;        #Paragraph sign
	s/\&\#183\;/·/g;        #Middle dot
	s/\&\#184\;/¸/g;        #Cedilla
	s/\&\#185\;/¹/g;        #Superscript one
	s/\&\#186\;/º/g;        #Masculine ordinal
	s/\&\#187\;/»/g;        #Right angle quote, guillemotright
	s/\&\#188\;/¼/g; s/\&frac14\;/¼/g;       # Fraction one-fourth
	s/\&\#189\;/½/g; s/\&frac12\;/½/g;       # Fraction one-half
	s/\&\#190\;/¾/g; s/\&frac34\;/¾/g;       # Fraction three-fourths
	s/\&\#191\;/¿/g;        #Inverted question mark
	s/\&\#192\;/À/g;        #Capital A, grave accent
	s/\&\#193\;/Á/g;        #Capital A, acute accent
	s/\&\#194\;/Â/g;        #Capital A, circumflex accent
	s/\&\#195\;/Ã/g;        #Capital A, tilde
	s/\&\#196\;/Ä/g;        #Capital A, dieresis or umlaut mark
	s/\&\#197\;/Å/g;        #Capital A, ring
	s/\&\#198\;/Æ/g;        #Capital AE dipthong (ligature)
	s/\&\#199\;/Ç/g;        #Capital C, cedilla
	s/\&\#200\;/È/g;        #Capital E, grave accent
	s/\&\#201\;/É/g;        #Capital E, acute accent
	s/\&\#202\;/Ê/g;        #Capital E, circumflex accent
	s/\&\#203\;/Ë/g;        #Capital E, dieresis or umlaut mark
	s/\&\#204\;/Ì/g;        #Capital I, grave accent
	s/\&\#205\;/Í/g;        #Capital I, acute accent
	s/\&\#206\;/Î/g;        #Capital I, circumflex accent
	s/\&\#207\;/Ï/g;        #Capital I, dieresis or umlaut mark   
	s/\&\#208\;/Ð/g;        #Capital Eth, Icelandic
	s/\&\#209\;/Ñ/g;        #Capital N, tilde
	s/\&\#210\;/Ò/g;        #Capital O, grave accent
	s/\&\#211\;/Ó/g;        #Capital O, acute accent
	s/\&\#212\;/Ô/g;        #Capital O, circumflex accent
	s/\&\#213\;/Õ/g;        #Capital O, tilde
	s/\&\#214\;/Ö/g;        #Capital O, dieresis or umlaut mark
	s/\&\#215\;/×/g;        #Multiply sign
	s/\&\#216\;/Ø/g;        #Capital O, slash
	s/\&\#217\;/Ù/g;        #Capital U, grave accent
	s/\&\#218\;/Ú/g;        #Capital U, acute accent
	s/\&\#219\;/Û/g;        #Capital U, circumflex accent
	s/\&\#220\;/Ü/g;        #Capital U, dieresis or umlaut mark
	s/\&\#221\;/Ý/g;        #Capital Y, acute accent
	s/\&\#222\;/Þ/g;        #Capital THORN, Icelandic
	s/\&\#223\;/ß/g;        #Small sharp s, German (sz ligature)
	s/\&\#224\;/à/g;        #Small a, grave accent
	s/\&\#225\;/á/g;        #Small a, acute accent
	s/\&\#226\;/â/g;        #Small a, circumflex accent
	s/\&\#227\;/ã/g;        #Small a, tilde
	s/\&\#228\;/ä/g;        #Small a, dieresis or umlaut mark
	s/\&\#229\;/å/g;        #Small a, ring
	s/\&\#230\;/æ/g;        #Small ae dipthong (ligature)
	s/\&\#231\;/ç/g;        #Small c, cedilla
	s/\&\#232\;/è/g;        #Small e, grave accent
	s/\&\#233\;/é/g;        #Small e, acute accent
	s/\&\#234\;/ê/g;        #Small e, circumflex accent
	s/\&\#235\;/ë/g;        #Small e, dieresis or umlaut mark
	s/\&\#236\;/ì/g;        #Small i, grave accent
	s/\&\#237\;/í/g;        #Small i, acute accent
	s/\&\#238\;/î/g;        #Small i, circumflex accent
	s/\&\#239\;/ï/g;        #Small i, dieresis or umlaut mark
	s/\&\#240\;/ð/g;        #Small eth, Icelandic
	s/\&\#241\;/ñ/g;        #Small n, tilde
	s/\&\#242\;/ò/g;        #Small o, grave accent
	s/\&\#243\;/ó/g;        #Small o, acute accent
	s/\&\#244\;/ô/g;        #Small o, circumflex accent
	s/\&\#245\;/õ/g;        #Small o, tilde
	s/\&\#246\;/ö/g;        #Small o, dieresis or umlaut mark
	s/\&\#247\;/÷/g;        #Division sign
	s/\&\#248\;/ø/g;        #Small o, slash
	s/\&\#249\;/ù/g;        #Small u, grave accent
	s/\&\#250\;/ú/g;        #Small u, acute accent
	s/\&\#251\;/û/g;        #Small u, circumflex accent
	s/\&\#252\;/ü/g;        #Small u, dieresis or umlaut mark
	s/\&\#253\;/ý/g;        #Small y, acute accent
	s/\&\#254\;/þ/g;        #Small thorn, Icelandic
	s/\&\#255\;/ÿ/g;        #Small y, dieresis or umlaut mark
	s/^\s+//;
	return $_;
}

The archupdate.py script:

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Description: Python script for notifying archlinux updates.
# Usage: Put shell script with command 'pacman -Sy' into /etc/cron.hourly/
# Conky: e.g. put in conky '${texeci 1800 python path/to/this/file}'
# Author: Michal Orlik <thror.fw@gmail.com>, sabooky <sabooky@yahoo.com>

################################################################################
# SETTINGS - main settings
# set this to True if you just want one summary line (True/False)
brief = False
# number of packages to display (0 = display all)
num_of_pkgs = 5
#show only important packages
onlyImportant = False
########################################

# OPTIONAL SETTINGS
# PACKAGE RATING - prioritize packages by rating
# pkgs will be sorted by rating. pkg rating = ratePkg + rateRepo for that pkg
# pkg (default=0, wildcards accepted)
ratePkg = {
        'kernel*':10,
        'pacman':9,
        'nvidia*':8,
        }
# repo (default=0, wildcards accepted)
rateRepo = {
        'core':5,
        'extra':4,
        'community':3,
        'testing':2,
        'unstable':1,
        }
# at what point is a pkg considered "important"
iThresh = 5
########################################

# OUTPUT SETINGS - configure the output format
# change width of output
width = 52

# if you would use horizontal you possibly want to disable 'block'
horizontally = False
# separator of horizontal layout
separator = ' ---'
# pkg template - this is how individual pkg info is displayed ('' = disabled)
# valid keywords - %(name)s, %(repo)s, %(size).2f, %(ver)s, %(rate)s
pkgTemplate = " %(repo)s/%(name)s %(ver)s"
# important pkg tempalte - same as above but for "important" pkgs
ipkgTemplate = " *!* %(repo)s/%(name)s %(ver)s"
# summary template - this is the summary line at the end
# valid keywords - %(numpkg)d, %(size).2f, %(inumpkg), %(isize).2f, %(pkgstring)s
summaryTemplate = " %(numpkg)d %(pkgstring)s"
# important summary template - same as above if "important" pkgs are found
isummaryTemplate = summaryTemplate + " (%(inumpkg)d important %(isize).2f MB)"
# pkg right column template - individual pkg right column
# valid keywords - same as pkgTemplate
pkgrightcolTemplate = "%(size).2f MB"
# important pkg right column template - same as above but for important pkgs
ipkgrightcolTemplate = pkgrightcolTemplate
# summary right column template - summay line right column
# valid keywords - same as summaryTemplate
summaryrightcolTemplate = "%(size).2f MB"
# important summary right column template - same as above if "important" pkgs are found
isummaryrightcolTemplate = summaryrightcolTemplate
# seperator before summary ('' = disabled)
block = '-' * 12
# up to date msg
u2d = ' Your system is up to date'
################################################################################

import subprocess
import re

from time import sleep
from glob import glob
from fnmatch import fnmatch

program = []
pkgs = []
url = None

def runpacman():
    """runs pacman returning the popen object"""
    p = subprocess.Popen(['pacman','-Qu'],
            stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    return p

def cmpPkgs(x, y):
        """Compares packages for sorting"""
        if x['rate']==y['rate']:
                return cmp(x['size'], y['size'])
        else:
                return x['rate']-y['rate']

if onlyImportant:
        pkgTemplate, pkgrightcolTemplate = '',''

p = runpacman()
#parse pacmans output
for line in p.stdout:
    if re.match('(Cíle|Pakete|Targets|Se procesará|Cibles|Pacchetti|'
            'Celuje|Pacotes|Цели):', line):
                program = line.split()[1:]
                for line in p.stdout:
                        if not line.strip():
                                break
                        program += line.split()

for item in program:
    pkg = {}
    desc_path = False
    desc_paths =  glob('/var/lib/pacman/sync/*/%s'%item)

    if not desc_path:
            desc_path = desc_paths[0] + '/desc'

    pkg['repo'] = desc_path.split('/')[-3]
    desc = open(desc_path).readlines()
    checkName = 0
    checkSize = 0
    checkVersion = 0
    for index, line in enumerate(desc):
        if line=='%NAME%\n' and checkName == 0:
            pkgName = desc[index+1].strip()
            pkg['name'] = pkgName
            checkName = 1
        if line=='%CSIZE%\n' and checkSize == 0:
            pkgSize = int(desc[index+1].strip())
            pkg['size'] = pkgSize / 1024.0 / 1024
            checkSize = 1
        if line=='%VERSION%\n' and checkVersion == 0:
            pkgVersion = desc[index+1].strip()
            pkg['ver'] = pkgVersion
            checkVersion = 1

    pkgRate = [v for x, v  in ratePkg.iteritems()
            if fnmatch(pkg['name'], x)]
    repoRate = [v for x, v in rateRepo.iteritems()
            if fnmatch(pkg['repo'], x)]
    pkg['rate'] = sum(pkgRate + repoRate)

    pkgs.append(pkg)

# echo list of pkgs
if pkgs:
    summary = {}
    summary['numpkg'] = len(pkgs)
    summary['size'] = sum([x['size'] for x in pkgs])
    if summary['numpkg'] == 1:
        summary['pkgstring'] = 'package'
    else:
        summary['pkgstring'] = 'packages'
    summary['inumpkg'] = 0
    summary['isize'] = 0
    lines = []
    pkgs.sort(cmpPkgs, reverse=True)
    for pkg in pkgs:
        important = False

        if pkg['rate'] >= iThresh:
            summary['isize'] += pkg['size']
            summary['inumpkg'] += 1
            pkgString = ipkgTemplate % pkg
            sizeValueString = ipkgrightcolTemplate % pkg
        else:
            pkgString = pkgTemplate % pkg
            sizeValueString = pkgrightcolTemplate % pkg

        if len(pkgString)+len(sizeValueString)>width-1:
                pkgString = pkgString[:width-len(sizeValueString)-4]+'...'

        line = pkgString.ljust(width - len(sizeValueString)) + sizeValueString
        if line.strip():
            lines.append(line)

    if not horizontally:
        separator = '\n'

    if not brief:
        if num_of_pkgs:
            print separator.join(lines[:num_of_pkgs])
        else:
            print separator.join(lines)
        if block:
            print block.rjust(width)


    if summary['inumpkg']:
        overallString = isummaryTemplate % summary
        overallMBString = summaryrightcolTemplate % summary
    else:
        overallString = summaryTemplate % summary
        overallMBString = isummaryrightcolTemplate % summary
    summaryline =  overallString.ljust(width - len(overallMBString)) \
                       + overallMBString
    if summaryline and not horizontally:
        print summaryline
else:
    print u2d

and finally the externalIp.sh:

#!/bin/bash
wget -O - -q icanhazip.com
exit 0

The scripts were all found in various places long ago, so I can not give credit to the creators. Also if anyone has any better ways of accomplishing what is done here please let me know.

Offline

#955 2012-03-27 09:57:30

Nesousx
Member
Registered: 2012-03-27
Posts: 46
Website

Re: conky configs and screenshots!

Hi  all,

I am trying to set up some "specific" conky config, but I can't find a way to do it. I wish to display a small country flag depending on my IP.  What I am trying now, is to run a script in cron that grabs the source from the following page : http://aruljohn.com/details.php. Then it checks for specific string "lu.gif"; "us.guf" or "fr.gif", since my IP can be one of those 3 possibilities.

Here is my "flag.sh" script (but it is not working yet, and a big WIP, just checking if my IP is located in Luxembourg or not) :

#/bin/bash
curl -A firefox http://aruljohn.com/details.php > source.html &
if grep -q "^[^#]*lu.gif" source.html ; then rsync -av lu.gif flag.gif ; 
else rsync -av fr.gif flag.gif ; fi

The goal would be to get the country flag corresponding to the current WAN IP saved as flag.gif.

Then in my conkyflag conky config file, I have the following :

# .conkyrc by fabsh <fabsh@lamerk.org>
# Based on ideas and code from the CunchBang Linux forums at http://crunchbanglinux.org
# v. 1.0

# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 0

# Update interval in seconds
update_interval 4

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

own_window yes
own_window_transparent yes
#own_window_type override
own_window_type desktop
#own_window_type normal #use this if you want a nice shadow to appear around conky

# If own_window is yes, these window manager hints may be used
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

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

# Minimum size of text area
minimum_size 180 0
#maximum_width 200

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
#border_margin 5

# border width
border_width 1

# Default colors and also border colors
default_color white
#default_shade_color black
#default_outline_color grey
own_window_colour grey

# Text alignment, other possible values are commented
#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 8
gap_y 8

# 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

# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none

TEXT
${image /home/nesousx/.config/conky/flag/flag.gif -p 0,5 -s 18x12}

Expected result would be to display the country flag in a corner of my screen, next to my tray icons (see screenshot).
Right now, the flag is correctly displayed at the desired location, however if I manually change the flag.gif after conky has been started it doesn't update it. I am thinking maybe the image is cached somehow/somewhere.

So my questions are. Has anyone done something similar, or do you have any idea on how to achieve this (fixing the 1st script and/or conky loading the update flag.gif image). Maybe it can be done with lua?

My current desktop :

eb764cf073fd9baa0363e41b4f983ee5f8dd664e.png

Last edited by Nesousx (2012-03-27 10:01:42)

Offline

#956 2012-03-29 12:32:08

distrohopperarched
Member
Registered: 2012-02-06
Posts: 45

Re: conky configs and screenshots!

A call for all conky configurators. Let's play "nicer". https://bbs.archlinux.org/viewtopic.php?id=138580
Since my thread has just been moved to Try this, I hope it's ok if I mention it here.

By the way, here's something simple, just a clock - and a way to "format" that stupid uptime...
vZDZ0Mw

background no
###
font Terminal dosis:size=8
use_xft yes
xftalpha 0.9
update_interval 1.0
total_run_times 0
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 120
maximum_width 300
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color 00C4FF
default_shade_color black
default_outline_color blue
alignment top_right
gap_x 10
gap_y -5
no_buffers yes
cpu_avg_samples 2
override_utf8_locale no
uppercase no

TEXT

${font Comfortaa:bold:size=13}${offset 100}${time %A}
${color #0087B0}${font Comfortaa:bold:size=36}${time %H}${font}${color}${font Comfortaa:bold:size=28}${voffset -27}${time :%M:%S}${font}
${font Comfortaa:bold:size=8}${offset 100}${time %d %b %Y}

${offset 200}${font Terminal dosis:bold:size=13}Uptime: $uptime
${offset 198}${voffset -120}${font ConkySymbols:regular:size=72}T

Last edited by distrohopperarched (2012-03-29 12:32:39)

Offline

#957 2012-03-29 13:04:05

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,606
Website

Re: conky configs and screenshots!

distrohopperarched wrote:

By the way, here's something simple, just a clock - and a way to "format" that stupid uptime...
http://ompldr.org/vZDZ0Mw

Gorgeous!


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#958 2012-04-06 18:31:37

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

Nesousx wrote:

Hi  all,

I am trying to set up some "specific" conky config, but I can't find a way to do it. I wish to display a small country flag depending on my IP.  What I am trying now, is to run a script in cron that grabs the source from the following page : http://aruljohn.com/details.php. Then it checks for specific string "lu.gif"; "us.guf" or "fr.gif", since my IP can be one of those 3 possibilities.

I don't do any script writing but if your IP's are static why not use ${if_match} and your own images/icons:

${if_match "${addr eth0}"=="000.000.000.00"}${image ~/Conky/images/lu.png -p 0,0 -s 30x10}${else}\
${if_match "${addr eth0}"=="111.111.111.11"}${image ~/Conky/images/us.png -p 0,0 -s 30x10}${else}\
${if_match "${addr eth0}"=="222.222.222.22"}${image ~/Conky/images/fr.png -p 0,0 -s 30x10}${else}\
${image ~/Conky/images/UN.png -p 0,0 -s 10x10}${endif}${endif}${endif}

UN.png would be an unknown IP.

Grab some really nice flag icons
http://www.famfamfam.com/lab/icons/flags/  (very small though)
or
http://www.veryicon.com/icons/flag/

I grabbed my country code here but hated the flag:

wget -O $HOME/IP_C.txt "http://www.phptutorial.info/iptocountry/"

aaq7GmuO.jpg

Just an opinion but I would be more inclined to search for my "country" on the net and then based on the results use an archived image on my HDD.  You could wrap that whole ${if_match} code inside an ${if_up} command:

if_up
 	(interface)
 	if INTERFACE exists and is up, display everything between $if_up and the matching $endif
${if_up wlan0\
  ${if_match "${addr eth0}"=="000.000.000.00"}${image ~/Conky/images/lu.png -p 0,0 -s 30x10}${else}\
  ${if_match "${addr eth0}"=="111.111.111.11"}${image ~/Conky/images/us.png -p 0,0 -s 30x10}${else}\
  ${if_match "${addr eth0}"=="222.222.222.22"}${image ~/Conky/images/fr.png -p 0,0 -s 30x10}${else}\
  ${image ~/Conky/images/UN.png -p 0,0 -s 10x10}${endif}${endif}${endif}}\
${else}${image ~/Conky/images/NOT.png -p 0,0 -s 10x10}${endif}

NOT.png is "not connected"

Offline

#959 2012-04-09 08:53:55

lowph
Member
From: NL
Registered: 2011-10-14
Posts: 23

Re: conky configs and screenshots!

conky20120409_arch.jpg
Still a bit bit WIP but I'm quite happy with it. Now to figure out how to auto start it in XFCE as the wiki way doesn't work for me.

.conkyrc

#-- Process --
background              no
double_buffer           yes
update_interval         2
cpu_avg_samples         5
net_avg_samples         5
no_buffers              yes
#-- Window base --
own_window              no
own_window_colour       393939
own_window_type         override
own_window_transparent  yes
#-- Window looks --
alignment               top_left
gap_x                   20
gap_y                   20
minimum_size            250 5
border_width            0
draw_shades             no
draw_outline            no
draw_borders            no
draw_graph_borders      yes
stippled_borders        0
default_color           white
default_outline_color   white
border_inner_margin     5
border_outer_margin     5
border_width            5
#default_shade_color     black
#-- Font --
use_xft                 yes
xftalpha                1
xftfont                 Droid Sans:size=8

# stuff after 'TEXT' will be formatted on screen
TEXT
#${font OpenLogos:size=190}A${font}
# SYSTEM
${goto 25}${voffset 5}${font Droid Sans Bold:size=8}SYSTEM${font} ${hr 1}
${goto 90}Hostname:${alignr}$nodename
${goto 90}Kernel:${alignr}$kernel ($machine)
#${goto 90}User:${alignr}${uid_name 1000}



# LOAD
${goto 25}${font Droid Sans Bold:size=8}LOAD${font} ${hr 1}
${goto 90}${cpugraph 38,172 fef7b2 e18522 -t}
${goto 30}${voffset 5}Core1${goto 60}: ${hwmon 1 temp 2}°C @ ${freq_g 1}GHz ${cpu cpu1}% ${alignr}${cpubar cpu1 6,80}
${goto 30}Core2${goto 60}: ${hwmon 1 temp 3}°C @ ${freq_g 2}GHz ${cpu cpu2}% ${alignr}${cpubar cpu2 6,80}
${goto 30}Core3${goto 60}: ${hwmon 1 temp 4}°C @ ${freq_g 3}GHz ${cpu cpu3}% ${alignr}${cpubar cpu3 6,80}
${goto 30}Core4${goto 60}: ${hwmon 1 temp 5}°C @ ${freq_g 4}GHz ${cpu cpu4}% ${alignr}${cpubar cpu4 6,80}
${goto 30}RAM${goto 60}: $memmax $memperc% ${alignr}${membar 6,80}
${goto 30}Swap${goto 60}: $swapmax $swapperc% ${alignr}${swapbar 6,80}
${goto 30}HDD${goto 60}: $hddtemp°C${goto 120}M/B: ${hwmon 2 temp 3}°C${goto 200}GPU:${alignr}${hwmon 0 temp 1}°C
${goto 30}CPU${goto 60}: ${hwmon 2 fan 1} rpm${goto 120}M/B: ${hwmon 2 fan 3} rpm${goto 200}GPU:${alignr}${hwmon 2 fan 2} rpm

# DISK
${goto 25}${font Droid Sans Bold:size=8}DISK${font} ${hr 1}
${goto 90}${diskiograph 38,172 fef7b2 e18522}
${goto 30}${voffset 5}/${goto 82}: ${fs_size /}   ${fs_used_perc /} % ${alignr}${fs_bar 6,80 /}
${goto 30}/home${goto 82}: ${fs_size /home}   ${fs_used_perc /home} % ${alignr}${fs_bar 6,80 /home}
${goto 30}/mnt/data${goto 82}: ${fs_size /mnt/data}   ${fs_used_perc /mnt/data} % ${alignr}${fs_bar 6,80 /mnt/data}
${goto 30}/dev/sda${goto 100}Read: ${diskio_read /dev/sda}${goto 200}Write: ${diskio_write /dev/sda}
${goto 30}/dev/sdb${goto 100}Read: ${diskio_read /dev/sdb}${goto 200}Write: ${diskio_write /dev/sdb}

# SERVER
${goto 25}${font Droid Sans Bold:size=8}SERVER${font} ${hr 1}
#${offset 60}${texeci 10 ~/.conky/server.sh}
${goto 30}${voffset 52}storage${goto 69}: ${fs_size /mnt/wodan/storage} ${fs_used_perc /mnt/wodan/storage}% ${alignr}${fs_bar 6,80 /mnt/wodan/storage}
${goto 30}data${goto 69}: ${fs_size /mnt/wodan/data} ${fs_used_perc /mnt/wodan/data}%${alignr}${fs_bar 6,80 /mnt/wodan/data}
${goto 30}scratch${goto 69}: ${fs_size /mnt/scratch} ${fs_used_perc /mnt/scratch}%${alignr}${fs_bar 6,80 /mnt/scratch}

# NETWORK
${goto 25}${font Droid Sans Bold:size=8}NETWORK${font} ${hr 1}
${goto 85}${downspeedgraph bond0 24,88 fef7b2 e18522}${goto 185}${upspeedgraph bond0 24,88 fef7b2 e18522}
${goto 85}Down: ${downspeed bond0}${goto 185}Up: ${upspeed bond0}
#
#-- background & images --
${image ~/.conky/background.png -p 0,0 -s 282x605}${image ~/.conky/system48.png -p 5,20}${image ~/.conky/load48.png -p 5,98}${image ~/.conky/disk48.png -p 5,284}${image ~/.conky/server48.png -p 5,432}${image ~/.conky/network48.png -p 5,550}

Offline

#960 2012-04-09 14:23:09

ghost
Member
Registered: 2011-11-10
Posts: 34

Re: conky configs and screenshots!

Just set up my first conky config

20120409162038_1024x600_scrot.png

Offline

#961 2012-04-09 14:24:56

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

lowph wrote:

Still a bit bit WIP but I'm quite happy with it. Now to figure out how to auto start it in XFCE as the wiki way doesn't work for me.

I like that layout.  I have not used Xfce in years so this may not apply:

Have you tried: ~/.xsession

sleep 10; conky

Also, just as a side note, for info only;
- every one of your bars is: '6,80' - one command above TEXT can look after them all:

default_bar_size
     Specify a default width and height for bars. Example: 'default_bar_size 0 6'. This is particularly useful for execbar and execibar as they do not take size arguments.

Beware the command above TEXT uses the width and height in reverse to the bar commands below TEXT, and with a space not a comma:

default_bar_size 80 6
TEXT

Offline

#962 2012-04-09 14:46:13

lowph
Member
From: NL
Registered: 2011-10-14
Posts: 23

Re: conky configs and screenshots!

Sector11 wrote:

Have you tried: ~/.xsession

sleep 10; conky

I did, it doesn't start (same when putting it in ~/.xinitrc).
Made a .desktop according to the wiki, doesn't work (other .desktop autostarts do). Same .desktop file works fine when started once XFCE is running.

Also, just as a side note, for info only;
- every one of your bars is: '6,80' - one command above TEXT can look after them all:

default_bar_size
     Specify a default width and height for bars. Example: 'default_bar_size 0 6'. This is particularly useful for execbar and execibar as they do not take size arguments.

Beware the command above TEXT uses the width and height in reverse to the bar commands below TEXT, and with a space not a comma:

default_bar_size 80 6
TEXT

Good tip, thanks.

Offline

#963 2012-04-09 16:16:12

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

Ahhhhhhhhhhhhhh the elegance of a simple conky and the complexity of a robotic limb!
sehr gut!

Offline

#964 2012-04-09 17:09:41

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

lowph wrote:

Good tip, thanks.

You're welcome.

Well how about a bash script in 'autostart' and or attached to an icon you can click on:

#!/bin/sh
if [ "$(pidof conky)" ]; then
    killall conky
      sleep 5 && conky &
    exit
else
      sleep 5 && conky &
    exit
fi

This, as a startup will see no conky running and run conky, if conky is running it will kill the process and restart it.
Mine is a bit more complicated, it starts 8 conkys - some on all desktops others only on desktop 2 or 3.

One more tip if I may... a LUA background vs the "image" background.
I use to use the "square" image set at certain levels of transparency: bk_10.png, bk_20.png, bk_30.png .. etc etc.

Then londonali1010, mrpeachy and dk75 came to the rescue with "the ultimate background LUA script" (my words not theirs). I don't do scripts, just use them.  It can be used with or without a composite manager and all the "settings" are right there on the command line:

draw-bg.lua

--[[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 ~/path/to/draw_bg.lua
 TEXT
 ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}

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

 lua_load ~/path/to/draw_bg.lua
 lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
 TEXT

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

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

Set 2,3,4 & 5 to '0' to cover the whole window, will change if you change those settings.

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color  - make the background any colour you want.
7 = 0.4           alpha

]]

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

6 conkys using that LUA background on Desktop 3
aasMukgq.jpg

Someplace above TEXT use:

border_inner_margin 5

and the "background" will have a 5 pixel boarder around the conky.

Last edited by Sector11 (2012-04-09 17:10:05)

Offline

#965 2012-04-11 03:07:03

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

This is inspired by lowph's conky - with a few bits and pieces grabbed from here and there.

With trash: aauMdVZZ.jpg Took the trash out: aatE8vt2.jpg

The conky

# killall conky && conky -c ~/conky/ARCH.conky &
# Inspired by lowph on ARCH
## https://bbs.archlinux.org/viewtopic.php?pid=1084955#p1084955
###  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_colour brown
own_window_class lowph
own_window_title lowph

# 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 override
### own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 200

minimum_size 255 0     ## width, height
maximum_width 255       ## width, usually a good idea to equal minimum width

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

### alignment can be:
# top_left, top_right, top_middle
# bottom_left, bottom_right, bottom_middle
# middle_left, middle_middle, middle_right ######### or none
# can be abreviated as: tl, tr, tm, bl, br, bm, ml, mm, mr
alignment tl 
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont WenQuanYi Micro Hei Mono:bold:size=8

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

draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 9ACD32 #YellowGreen
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #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

##############################################  End Miscellaneous Section  ###
###  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 ~/Conky/LUA/draw-bg.lua
#lua_draw_hook_post draw_bg 10 0 0 0 0 0xBFBFBF 0.2
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
#
## Calling the weather script
#
# lua_load ~/v9000/v9000.lua
# lua_draw_hook_post weather
# lua_load ~/Conky/templates/S11_V9_R-template.lua
#
#starts the lua weather data gathering function, call once at top of conkyrc
##
#######################################################  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

default_bar_size 80 6

TEXT
${hr}
${font LCDMono2:size=56}${time %R}${font LCDMono2:size=10}:${time %S}${font}
${voffset -63}${font LCDMono2:size=20}${goto 210}${time %b}${font}
${font LCDMono2:size=20}${goto 220}${time %y}${font}

${hr}
${font LCDMono2:size=18}${goto 15}SU MO  ${color6}${time %b %y}${color}  FR SA
${goto 15}${execpi 3600 CPS=`date +%-d`; cal -h | sed '2d' | sed -e '1d' -e 's/\<'"$CPS"'\>/${color6}&${color}/'}${font}
${voffset -20}SYSTEM ${hr} ${image /home/sector11/conky/ARCH/user.png -p 5,273 -s 50x50}
        Hostname: ${nodename}
            User: ${uid_name 1000}
           Group: ${gid_name 1000}
         Machine: ${machine}
          Kernel:
${kernel}

STRESS ${hr} ${image /home/sector11/conky/ARCH/ordinateur.png -p 5,375 -s 50x50}
        ${cpugraph cpu1 49,172 fef7b2 e18522 -t -l}
CPU1: ${cpubar cpu1} ${cpu cpu1}%${goto 180}HDD: ${execpi 15 hddtemp -n /dev/sda}°
CPU2: ${cpubar cpu2} ${cpu cpu2}%${goto 180}M/B: ${hwmon 2 temp 1}°
CPU3: ${cpubar cpu3} ${cpu cpu3}%${goto 180}GPU: ${nvidia temp}°
CPU0: ${cpubar cpu0} ${cpu cpu0}%${goto 180}CPU: ${hwmon 1 temp 1}°
 Fan: ${hwmon 2 fan 1} rpm
 RAM: ${membar} ${memmax} @ ${memperc}%
Swap: ${swapbar} ${swapmax} @ ${swapperc}%

DISK ${hr} ${image /home/sector11/conky/ARCH/HDD.png -p 5,553 -s 50x50}
        ${diskiograph 49,172 fef7b2 e18522}
  SDA: R: ${diskio_read /dev/sda}${goto 160}W: ${diskio_write /dev/sda}
/Root: ${fs_bar /} ${fs_size /}   ${fs_used_perc /} %
/Home: ${fs_bar /home} ${fs_size /home}   ${fs_used_perc /home} %
  M/5: ${fs_bar /media/5} ${fs_size /media/5}   ${fs_used_perc /media/5} %
  M/6: ${fs_bar /media/6} ${fs_size /media/6}   ${fs_used_perc /media/6} %

NETWORK ${hr} ${image /home/sector11/conky/ARCH/recherche_internet.png -p 5,705 -s 50x50}
${goto 68}${downspeedgraph eth0 24,88 fef7b2 e18522 -t -l}${goto 165}${upspeedgraph eth0 24,88 fef7b2 e18522 -t -l}
${goto 68}Down: ${downspeedf eth0}${goto 165}Up: ${upspeedf eth0}

TRANSFER TOTALS ${hr}
YESTERDAY:
${execi 300 vnstat | grep "yesterday" | awk '{print $2 $3}'}\
${goto 90}${execi 300 vnstat | grep "yesterday" | awk '{print $5 $6}'}\
${goto 190}${execi 300 vnstat | grep "yesterday" | awk '{print $8 $9}'}

TODAY:
${execi 300 vnstat | grep "today" | awk '{print $2 $3}'}\
${goto 90}${execi 300 vnstat | grep "today" | awk '{print $5 $6}'}\
${goto 190}${execi 300 vnstat | grep "today" | awk '{print $8 $9}'}

LAST WEEK:
${execi 300 vnstat -w | grep "current week" | awk '{print $3 $4}'}\
${goto 90}${execi 300 vnstat -w | grep "current week" | awk '{print $6 $7}'}\
${goto 190}${execi 300 vnstat -w | grep "current week" | awk '{print $9 $10}'}

LAST MONTH:
${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $3 $4}'}\
${goto 90}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}\
${goto 190}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $9 $10}'}${font}

${color6}${execi 15 du -sh ~/.local/share/Trash/files/ | awk '{print $1}' | sed '/^4.0K/ d'  | sed 's/$/ in the TRASH /'}${color} ${hr}

Thanks lowph.

Last edited by Sector11 (2012-04-11 16:55:58)

Offline

#966 2012-04-11 16:13:38

xorgx3
Member
From: Poland
Registered: 2011-11-29
Posts: 197

Re: conky configs and screenshots!

Finally, I can be proud of my conky smile

2012_04_11_180957_1366x768_scrot.jpg

Offline

#967 2012-04-11 16:25:08

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

xorgx3 wrote:

Well YEA!  Nice.
Is that a TeoBigusGeekus weather script?
Love the layout.

Offline

#968 2012-04-11 16:28:54

xorgx3
Member
From: Poland
Registered: 2011-11-29
Posts: 197

Re: conky configs and screenshots!

No, weather script is mrpeachy (http://crunchbanglinux.org/forums/topic … r-in-conky), with simple modifications smile

I'm glad that you like this smile

Last edited by xorgx3 (2012-04-11 17:17:28)

Offline

#969 2012-04-11 17:18:52

xorgx3
Member
From: Poland
Registered: 2011-11-29
Posts: 197

Re: conky configs and screenshots!

Sorry, I wrote this too fast tongue
Ofcourse mrpeachy smile

Offline

#970 2012-04-14 21:06:03

vaidotas203
Member
Registered: 2012-04-03
Posts: 31

Re: conky configs and screenshots!

Small conky at bottom right, with all info I need:
EvfMUl.jpg
Bigger resolution :-> http://i.imgur.com/EvfMU.jpg

Offline

#971 2012-04-14 21:07:33

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: conky configs and screenshots!

@viadotas could you post a link to your wallpaper. haha kinda fun.

Offline

#972 2012-04-14 21:18:05

vaidotas203
Member
Registered: 2012-04-03
Posts: 31

Re: conky configs and screenshots!

donniezazen wrote:

@viadotas could you post a link to your wallpaper. haha kinda fun.

http://i.imgur.com/b29MO.jpg

Offline

#973 2012-04-14 22:07:32

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: conky configs and screenshots!

@viadotas203 thanks.

Offline

#974 2012-04-16 15:37:53

linda02
Member
Registered: 2012-04-15
Posts: 13

Re: conky configs and screenshots!

Simple Conky

1d29e196502b.png

#####################
# Settings
#####################
background yes
use_xft yes
xftfont Sans:size=11
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type window
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 250 250
maximum_width 250
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 12
gap_y 12
uppercase no
cpu_avg_samples 2
override_utf8_locale no
#####################
#  Output
#####################
TEXT
SYSTEM INFO
${hr}
Host:$alignr$nodename
Uptime:$alignr$uptime
RAM:$alignr$mem/$memmax
Swap usage:$alignr$swap/$swapmax
Disk usage:$alignr${fs_used /}/${fs_size /}
CPU usage:$alignr${cpu cpu0}%
${font sans-serif:normal:size=11}${cpugraph cpu1}

PROCESSES $alignr PID    CPU
${hr}
${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}
${top name 4} $alignr ${top pid 4} ${top cpu 4}
${top name 5} $alignr ${top pid 5} ${top cpu 5}
${top name 6} $alignr ${top pid 6} ${top cpu 6}
${top name 7} $alignr ${top pid 7} ${top cpu 7}
${top name 8} $alignr ${top pid 8} ${top cpu 8}
${top name 9} $alignr ${top pid 9} ${top cpu 9}

BATTERY
${hr}
${font sans-serif:normal:size=11} Status: $battery
$battery_bar

Last edited by linda02 (2013-11-20 21:06:23)

Offline

#975 2012-04-16 19:37:31

VoidBit
Member
Registered: 2012-04-16
Posts: 1

Re: conky configs and screenshots!

Another simple config. All I need is included.
conky.png

background yes
draw_borders no
draw_shades no

default_color 636162
#default_color orange

own_window no
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated, sticky, below, skip_pager, skip_taskbar

use_xft yes
xftfont Sans:size=16
xftalpha 0.5

update_interval 1
double_buffer yes

alignment top_right
gap_x 1000
gap_y 12

TEXT

#${color 000}${font :size=11}Time$color $hr$font
${color 9bcff2}${font :size=11}Time$color $hr$font
${font :size=25}$alignc${time %l:%M %p}$font
$alignc${time %A, %B %d, %Y}

#${color 000}${font :size=11}System$color $hr$font
${color 9bcff2}${font :size=11}System$color $hr$font
Uptime:$alignr$uptime
Kernel:$alignr$kernel

#${color 000}${font :size=11}Processor$color $hr$font
${color 9bcff2}${font :size=11}Processor$color $hr$font
CPU:$alignr${freq_g cpu1}Ghz
${cpu}% ${cpubar 7, }

#${color 000}${font :size=11}Memory$color $hr$font
${color 9bcff2}${font :size=11}Memory$color $hr$font
Memory:$alignr${mem} / ${memmax}
${memperc}% ${membar 7, }
Cached:$alignr${cached}
Swap:$alignr${swap} / ${swapmax}

#${color 000}${font :size=11}HDD$color $hr$font
${color 9bcff2}${font :size=11}HDD$color $hr$font

Nothing fancy but I still like it :)

Offline

Board footer

Powered by FluxBB