You are not logged in.

#1001 2012-06-29 03:51:38

Joshmotron
Member
Registered: 2009-03-04
Posts: 21

Re: conky configs and screenshots!

After using Arch for quite some time then going to <cough> for about 1.5 years, I'm back on Arch since last Saturday and have been basically tweaking it almost non-stop to look pretty, but subtle. Before I usually just outright took people's conky's that I really enjoyed. But this time I decided not to be lazy and built my own (even though there are ass load of settings, the conky website if quite useful once you figure out the minimal syntax). While this is nothing special and has no Lua (the code I've scares me not only in it's seeming exactitude (I'd never sleep/can't imagine Atromch's pain) but also its length), it does however nicely tie in with the look of everything I've done so far. Everything's kinda low key, color wise, cause I'm usually always in near dark or total dark and anything blindingly blue, cyan, white, or green hurts after a while.

Plus, I totally whipped together a nice Python script to display what video I'm playing. It works whether playing a single file, a playlist, from the directory itself or from outside of it; it also knows when you're not watching (bwahaha).

I'm not entirely happy with the ram usage and hdd stats, but without those it looks a little too plain.
tZWpzNA

Code for creating the necessary mplayer.log. Removing the log file is necessary for when we close the player.

function mplayer() {
    /usr/bin/mplayer -quiet -msglevel all=0 -identify "$@" > $HOME/.mplayer/mplayer.log
    pid=$!
    wait $pid
    rm $HOME/.mplayer/mplayer.log
}

Code for Python script.

#!/usr/bin/python

import os
import sys
import getopt

class Log(object):
    def __init__(self, log):
        self.log = log
        self.opts = {}

    def readfile(self):
        """Python3 is weird about encoding, hence that line.
        If there's no log file, the playing function assumes
        nothing is playing and displays it as such.
        """
        try:
            with open(self.log, 'rb') as fd:
                for line in fd:
                    line_str = str(line, encoding='utf8')
                    key, value = line_str.strip().split('=')
                    self.opts[key] = value
        except IOError:
            pass
        return self

    def playing(self):
        """ID_FILENAME is specific to the logfile mplayer2 spits out.
        The split will grab the last part of a multi-element list if you
        play your videos from a parent directory.
            e.g., ~/tv/arrested_development/season_2/episode_16_meat_the_veals.mkv
            returns "episode_16_meat_the_veals.mkv"
        Otherwise it just returns the filename if you play it from the location
        of the file.
        """
        try:
            return self.opts['ID_FILENAME'].split('/')[-1]
        except KeyError:
            return '<Currently no video playing.>'

def main(_log):
    """The print statement is picked up by conky."""
    log = Log(_log)
    print(log.readfile().playing())

if __name__ == "__main__":
    """Will display ID_FILENAME from mplayer logfile. For use in Conky."""

    logfile = os.path.join(os.getenv('HOME'), '.mplayer', 'mplayer.log')
    main(logfile)

Last edited by Joshmotron (2012-06-29 04:13:13)

Offline

#1002 2012-06-29 15:28:41

switch10
Member
Registered: 2011-10-10
Posts: 11

Re: conky configs and screenshots!

This is my conky setup on my 10 inch netbook.

screenshot1ho.jpg

background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 100 100
maximum_width 300
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 12
gap_y 5
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no

TEXT
${color FF9900}${font sans-serif:bold:size=8:}SYSTEM${hr 2}
${color FFFF00}${font sans-serif:normal:size=8}$sysname $kernel $alignr $machine
Host:$alignr$nodename
Uptime:$alignr$uptime
File System: $alignr${fs_type}
Battery: $alignr${battery_percent BAT1}%
Battery Time: $alignr${battery_time BAT1}

${font sans-serif:bold:size=8}${color FF9900}PROCESSORS ${hr 2}${font sans-serif:normal:size=8}${color 
FFFF00}
CPU0: ${cpu cpu0}% ${cpubar cpu0}
CPU1: ${cpu cpu1}% ${cpubar cpu1}

${font sans-serif:bold:size=8}${color FF9900}MEMORY ${hr 2}
${font sans-serif:normal:size=8}${color FFFF00}RAM $alignc $mem / $memmax $alignr $memperc%
$membar

${font sans-serif:bold:size=8}${color FF9900}DISKS ${hr 2} 
${font sans-serif:normal:size=8}${color FFFF00}/ $alignc ${fs_used /} / ${fs_size /} $alignr${fs_used_perc /}%
${fs_bar /}
Home $alignc ${fs_used /home/dave} / ${fs_size /home/dave} $alignr ${fs_used_perc /home/dave}%
${fs_bar /home/dave}

${font sans-serif:bold:size=8}${color FF9900}TOP PROCESSES ${hr 2}
${font sans-serif:normal:size=8}${color FFFF00}${top_mem name 1}${alignr}${top mem 1} %
${top_mem name 2}${alignr}${top mem 2} %
$font${top_mem name 3}${alignr}${top mem 3} %
$font${top_mem name 4}${alignr}${top mem 4} %
$font${top_mem name 5}${alignr}${top mem 5} %

${font sans-serif:bold:size=8}${color FF9900}NETWORK ${hr 2}
${font sans-serif:normal:size=8}${color FFFF00}IP address: $alignr ${addr wlan0}
ESSID: $alignr ${wireless_essid wlan0}
Connection Quality: $alignr ${wireless_link_qual_perc wlan0}%

$alignr Download
${downspeedgraph wlan0}
${downspeed wlan0}/s $alignr ${totaldown wlan0}

$alignr Upload
${upspeedgraph wlan0}
${upspeed wlan0}/s $alignr ${totalup wlan0}

This is the bar on the right.  The bar on the top use python scripts to display my currently playing song in pianobar, and I used conkywx https://bbs.archlinux.org/viewtopic.php?id=142640 to display the weather info.

Offline

#1003 2012-07-06 17:23:33

TimorLee
Member
Registered: 2012-07-05
Posts: 48

Re: conky configs and screenshots!

Heres mine! It's stolen together from a lot of other people's and constantly evolves over time (Just saw a major redesign).

screenal.png

And the conkyrc:

 
# Conky, a system monitor, based on torsmo
# RootWin Conkyrc

alignment top_right
background yes
border_width 1
cpu_avg_samples 2
net_avg_samples 2
default_color white
default_outline_color black
default_shade_color black
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
use_xft yes
xftfont Bitstream Vera Sans Mono:size=10
xftalpha 0.8
gap_x 20
gap_y 30
minimum_size 5 5
maximum_width 460
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window no
own_window_class Conky
own_window_type desktop
own_window_transparent yes
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
double_buffer yes
minimum_size 200 
text_buffer_size 1024

TEXT
${color #1793d1}${offset 60}${font Bitstream Vera Sans Mono:size=40}${time %H}${font Bitstream Vera Sans Mono:size=25}${voffset -22}${time :%M:%S}${font Bitstream Vera Sans Mono:size=12}${offset -145}${voffset 30}${time %a, %d %b, %Y}${color white}${font Bitstream Vera Sans Mono:size=10}

${image /home/timor/.config/icons/arch_a.png -p 0,135 -s 60x60}${font Bitstream Vera Sans Mono:size=15}${color #1793d1}=======[${color white}${exec whoami}${color #dd0000}@${color #1793d1}${nodename}]=======${color white}${font Bitstream Vera Sans Mono:size=10}

${offset 60}${sysname} ${color #1793d1}$kernel${color white} (${machine})
${offset 60} ${color white}Users: ${color #dd0000}${user_number}${color white}
${color #0000dd}${stippled_hr space}${color white}
${image /home/timor/.config/icons/vol7.png -p 0,208 -s 13x13}${offset 18}Volume: ${color #1793d1}${mixer Vol}%${color white}
${image /home/timor/.config/icons/batt4full.png -p 0,230 -s 13x13}${offset 18}Battery: ${color #1793d1}${acpiacadapter}${color white} [${color green}${if_match ${battery_percent BAT0} <= 25}${color red}${endif}${battery_percent}%${color white}]
${color #0000dd}${stippled_hr space}${color white}
Uptime:${color #1793d1} $uptime${color white}  Load:${color #1793d1} $loadavg
${color white}CPU 1: ${color #dd0000}${cpu cpu1}% ${color #1793d1}(${freq 1} Mhz)    
${color white}CPU 2: ${color #dd0000}${cpu cpu2}% ${color #1793d1}(${freq 2} Mhz)
${color black}${cpugraph 000000 5000a0}
${color white}RAM Usage:${color #1793d1} $mem/$memmax - $memperc% $membar
${color white}Swap Usage:${color #1793d1} $swap/$swapmax - $swapperc% ${swapbar}
${color white}Processes:$color $processes  ${color white}Running:$color $running_processes
${color #0000dd}${stippled_hr space}${color white}
${color white}${image /home/timor/.config/icons/wireless8.png -p 0,455 -s 13x13}${offset 18}Network:
 Connections: ${color #1793d1}${tcp_portmon 1 65535 count}
 ${color white}${if_up wlan0}${wireless_essid wlan0}:${color #dd0000} ${addr wlan0} ${color white}(${color green}${if_match ${wireless_link_qual_perc wlan0} <= 50}${color red}${endif}${wireless_link_qual_perc wlan0}%${color white})
 ${color white}Down:${color #dd0000} ${downspeed wlan0} ${color white}Up: ${color #dd0000}${upspeed wlan0}${else}${if_up eth0}${wireless_essid eth0}$:${color #dd0000} ${addr eth0}  
 ${color white}Down:${color #dd0000} ${downspeed etho0} ${color white}Up: ${color #dd0000}${upspeed etho0}${endif}${endif}

${image /home/timor/.config/icons/file4.png -p 0,555 -s 13x13}${offset 18}${color white}Disks:
  Archlinux (/dev/sda4) $color${fs_used /}/${fs_size /}
  ${if_mounted /mnt/windows7}Windows7  (/dev/sda3) $color${fs_used /mnt/windows7}/${fs_size /mnt/windows7}${else}Windows Partition not mounted${endif}
  ${if_mounted /mnt/extHD}External HDD          $color${fs_used /mnt/extHD/}/${fs_size /mnt/extHD/}${else}Externel HDD not mounted${endif}

${color white}${image /home/timor/.config/icons/temp2.png -p 0,655 -s 13x13}${offset 18}Temperature:  
  CPU: ${hwmon 1 temp 2}°C|${hwmon 0 temp 1}°C		ACPI: ${acpitemp}°C
  GPU: ${nvidia temp}°C	${color #dd0000}(${nvidia threshold}°C)${color white}
${color #0000dd}${stippled_hr space}${color white}
${image /home/timor/.config/icons/note6.png -p 0,735 -s 13x13}${offset 18}${color #1793d1}MPD: ${alignc}$mpd_artist - $mpd_title
${color #1793d1}$mpd_bar
${color #1793d1}${alignc}$mpd_status
${color blue}${stippled_hr space}${color white}
Name              PID     CPU%   MEM%
${color #dd0000} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color #dd7700} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color #dddd00} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color white} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color white} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
 

Nothing special, all default Conky stuff. big_smile The icons are from one of the arch packages.

Offline

#1004 2012-07-09 09:41:01

grindcore
Member
Registered: 2012-02-27
Posts: 7

Re: conky configs and screenshots!

Here is the one, I am using on my notebook smile. It is originally based on Conky Colors.

AOSua.png
(transparent background)

######################
# - Conky settings - #
######################
update_interval 2
total_run_times 0
net_avg_samples 1
cpu_avg_samples 2

imlib_cache_size 0
double_buffer yes
no_buffers yes

format_human_readable

#####################
# - Text settings - #
#####################
use_xft yes
xftfont Droid Sans:size=8
override_utf8_locale yes
text_buffer_size 2048

#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type normal
own_window_argb_visual yes
own_window_argb_value 150
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment top_left
gap_y 25
gap_x 25
border_inner_margin 8

minimum_size 180 500
maximum_width 180
maximum_height 560

default_bar_size 92 6

#########################
# - Graphics settings - #
#########################
draw_shades yes
default_shade_color 000000
default_color FFFFFF

TEXT
${font Droid Sans:style=Bold:size=8}SYSTEM $stippled_hr${font}
##############
# - SYSTEM - #
##############
${voffset 6}${font OpenLogos:size=19}B${font}${goto 40}${voffset -15}Kernel:  ${alignr}${kernel}
${goto 40}Uptime: ${alignr}${uptime}
# |--UPDATES
${goto 40}Updates: ${alignr}${font Droid Sans:style=Bold:size=8}${execi 10800 pacman -Qu | wc -l}${font} Packages
# |--CPU
${voffset 6}${font Droid Sans:style=Bold:size=8}CPU${font}${offset -20}${voffset 10}${cpubar cpu0 4,18}
${voffset -23}${goto 40}Core 1: ${font Droid Sans:style=Bold:size=8}${cpu cpu1}%${font} ${alignr}${cpubar cpu1 7,70 EEEEEE}
${voffset 1}${goto 40}Core 2: ${font Droid Sans:style=Bold:size=8}${cpu cpu2}%${font} ${alignr}${cpubar cpu2 7,70 EEEEEE}
${voffset 1}${goto 40}Core 3: ${font Droid Sans:style=Bold:size=8}${cpu cpu3}%${font} ${alignr}${cpubar cpu3 7,70 EEEEEE}
${voffset 1}${goto 40}Core 4: ${font Droid Sans:style=Bold:size=8}${cpu cpu4}%${font} ${alignr}${cpubar cpu4 7,70 EEEEEE}
# |--MEM
${voffset 6}${font Droid Sans:style=Bold:size=8}RAM${font}${goto 40}RAM: ${font Droid Sans:style=Bold:size=8}$memperc%${font}
${voffset 6}${offset 1}${voffset -8}${membar 4,18}${voffset 4}${goto 40}${voffset -2}Free: ${font Droid Sans:style=Bold:size=8}${memeasyfree}${font} ${goto 110}Used: ${font Droid Sans:style=Bold:size=8}${mem}${font}
# |--SWAP
${voffset 5}${font Droid Sans:style=Bold:size=8}SWP${font}${goto 40}Swap: ${font Droid Sans:style=Bold:size=8}${swapperc}%${font}
${voffset 4}${offset 1}${voffset -7}${swapbar 4,18}${voffset 4}${goto 40}Free: ${font Droid Sans:style=Bold:size=8}$swapmax${font} ${goto 110}Used: ${font Droid Sans:style=Bold:size=8}$swap${font}
# |--PROC
${voffset 4}${font Droid Sans:style=Bold:size=8}TOP${font}${voffset 0}${goto 126}CPU${alignr}RAM
${voffset -1}${goto 40}${top name 1}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 1}${alignr }${top mem 1}${font}
${voffset -1}${goto 40}${top name 2}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 2}${alignr }${top mem 2}${font}
${voffset -1}${goto 40}${top name 3}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 3}${alignr }${top mem 3}${font}
${voffset -1}${goto 40}${top name 4}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 4}${alignr }${top mem 4}${font}
${voffset -1}${goto 40}${top name 5}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 5}${alignr }${top mem 5}${font}
${voffset -1}${goto 40}${top name 6}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 6}${alignr }${top mem 6}${font}
${voffset -1}${goto 40}${top name 7}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 7}${alignr }${top mem 7}${font}
${voffset -1}${goto 40}${top name 8}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 8}${alignr }${top mem 8}${font}
${voffset -1}${goto 40}${top name 9}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 9}${alignr }${top mem 9}${font}
${voffset -1}${goto 40}${top name 10}${font Droid Sans:style=Bold:size=8} ${goto 120}${top cpu 10}${alignr }${top mem 10}${font}
#############
# - CLOCK - #
#############
${voffset 6}${font Droid Sans:style=Bold:size=8}DATE $stippled_hr${font}
${font Droid Sans:size=20}${alignc}${time %H:%M}${font}
${alignc}${time %d %B %Y}
###############
# - NETWORK - #
###############
${voffset 4}${font Droid Sans:style=Bold:size=8}NETWORK $stippled_hr${font}
${voffset 4}${goto 20}Upload: ${font Droid Sans:style=Bold:size=8}${upspeed wlan0}${font} ${alignr}${upspeedgraph wlan0 8,50 EEEEEE}
${goto 20}Overall: ${font Droid Sans:style=Bold:size=8}${totalup eth0}${font}
${voffset 4}${goto 20}Download: ${font Droid Sans:style=Bold:size=8}${downspeed wlan0}${font} ${alignr}${downspeedgraph wlan0 8,50 EEEEEE}
${goto 20}Overall: ${font Droid Sans:style=Bold:size=8}${totaldown wlan0}${font}
${voffset 4}${goto 20}Local IP: ${alignr}${font Droid Sans:style=Bold:size=8}${addr wlan0}${font}
${goto 20}Public IP: ${alignr}${font Droid Sans:style=Bold:size=8}${execi 10800 ~/.public_ip}${font}
##########
# - HD - #
##########
${voffset 4}${font Droid Sans:style=Bold:size=8}HD $stippled_hr${font}
# |--HD default
  ${voffset 4}${goto 20}Root: ${font Droid Sans:style=Bold:size=8}${fs_used_perc /}%${font}${goto 100}${alignr}${fs_bar 6,68 /}
  ${offset 7}Free: ${font Droid Sans:style=Bold:size=8}${fs_free /}${font} ${alignr 1}Used: ${font Droid Sans:style=Bold:size=8}${fs_used /}${font}
  ${voffset 4}${goto 20}Home: ${font Droid Sans:style=Bold:size=8}${fs_used_perc /home}%${font}${goto 100}${alignr}${fs_bar 6,68 /home}
  ${offset 7}Free: ${font Droid Sans:style=Bold:size=8}${fs_free /home}${font} ${alignr 1}Used: ${font Droid Sans:style=Bold:size=8}${fs_used /home}${font}
# |--HDTEMP1
  ${voffset 7}${goto 20}${voffset -4}Temperature: ${font Droid Sans:style=Bold:size=8}${execi 120 sudo hddtemp /dev/sda -n --unit=C}°C${font}${alignr}/dev/sda

Last edited by grindcore (2012-07-09 09:49:52)

Offline

#1005 2012-07-17 09:40:50

HungGarTiger
Member
From: nz/auckland/
Registered: 2012-06-27
Posts: 187

Re: conky configs and screenshots!

Problem Solved, will edit a screenshot into my post in a few minutes

Here are my .conkyrc and lua scripts

Conkyrc

#Create own window instead of using desktop
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
 
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
 
# fiddle with window
use_spacer right

# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048
 
# Update interval in seconds
update_interval 3.0
 
# Minimum size of text area
# minimum_size 250 5
 
# Draw shades?
draw_shades no
 
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
uppercase no # set to yes if you want all text to be in uppercase
 
# Stippled borders?
stippled_borders 3
 
# border margins
border_margin 9
 
# border width
border_width 10
 
# Default colors and also border colors, grey90 == #e5e5e5
default_color grey
 
own_window_colour brown
own_window_transparent yes
 
# 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
gap_x 10
gap_y 20

# Draw BackGround
lua_load /home/aled/.conky/draw_bg.lua
lua_draw_hook_pre draw_bg

#Draw Bargraphs
lua_load /home/aled/.conky/bargraph_small.lua
lua_draw_hook_post main_bars
 
# stuff after 'TEXT' will be formatted on screen

TEXT
$color
##################
##     TIME     ##
##################
${voffset -4}${font RadioSpace:size=32}${color3}${if_match ${time %l}<=9}${alignc 7}${time %l:%M%p}${else}${if_match ${time %l}>=10}${alignc -1}${time %l:%M%p}${endif}${endif}${font}
#${voffset 0}${font DroidSansFallback:bold:size=6.85}${color4}${alignc 2}Sunrise${offset 1}${execi 1800 conkyForecast -d SR}${color3}${offset 2}|${offset 2}${color4}#Sunset${offset 1}${execi 1800 conkyForecast -d SS}${font}
##################
##    SYSTEM    ##
##################
${voffset 6}${font DroidSans:bold:size=8}${color blue}SYSTEM${offset 8}${voffset -2}${hr 2}${font}
${voffset 4}${font OpenLogos:size=10}${color2}u${voffset -4}${font DroidSans:size=8.65}${color3}${offset 5}${sysname}${offset 5}${kernel}${alignr}${font DroidSans:size=8.45}${machine}${font}
${voffset 2}${font StyleBats:size=10}${color2}A${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}Intel${offset 3}P4${offset 3}Extreme${offset 3}Edition${alignr}${font DroidSans:size=8.3}${freq_g cpu0}${offset 1}GHz${font}
${voffset 2}${font StyleBats:size=10}${color2}q${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}System${offset 3}Uptime${alignr}${font DroidSans:size=8.4}${uptime_short}${font}
${voffset 2}${font StyleBats:size=10}${color2}o${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}File${offset 3}System${alignr}${font DroidSans:size=8.5}${fs_type}${font}
##################
##    WEATHER   ##
##################
#${color blue}WEATHER - ${execpi 1800 conkyForecast --datatype=CN}, ${execpi 1800 conkyForecast --datatype=CO} ${hr 2}$color
#${execpi 1800 conkyForecast --template=/home/administator/conkyForecast.template}
##################
##  PROCESSORS  ##
##################
${voffset 6}${font DroidSans:bold:size=8}${color blue}PROCESSORS${offset 8}${voffset -2}${hr 2}${font}
${voffset 4}${font StyleBats:size=9.9}${color2}k${voffset -2}${font DroidSansFallback:size=8.39}${color3}${offset 2}CPU1${offset 5}${font DroidSans:size=8.3}${cpu cpu1}%${font}
${voffset 2}${font StyleBats:size=9.9}${color2}k${voffset -2}${font DroidSansFallback:size=8.39}${color3}${offset 2}CPU2${offset 5}${font DroidSans:size=8.3}${cpu cpu2}%${font}

${font DroidSans:bold:size=8}NAME          ${goto 110}PID            ${goto 160}CPU%            ${goto 210}MEM%${font}
${top name 1} ${goto 110}${top pid 1}   ${goto 160}${top cpu 1}    ${goto 210}${top mem 1}
${top name 2} ${goto 110}${top pid 2}   ${goto 160}${top cpu 2}    ${goto 210}${top mem 2}
${top name 3} ${goto 110}${top pid 3}   ${goto 160}${top cpu 3}    ${goto 210}${top mem 3}
${top name 4} ${goto 110}${top pid 4}   ${goto 160}${top cpu 4}    ${goto 210}${top mem 4}
##################
##    MEMORY    ##
##################
${voffset 6}${font DroidSans:bold:size=8}${color blue}MEMORY${offset 8}${color blue}${voffset -2}${hr 2}${font}
${voffset 4}${font StyleBats:size=10}${color2}l${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 3}RAM${goto 97}${font DroidSans:size=8.3}${mem}${goto 145}/${offset 5}${memmax}${alignr}${memperc}%${font}
##################
##     HDD      ##
##################
${voffset 16}${font DroidSans:bold:size=8}${color blue}HDD${offset 8}${color blue}${voffset -2}${hr 2}${font}
${voffset 5}${font StyleBats:size=9.9}${color2}x${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 4}ROOT${goto 95}${font DroidSans:size=8.3}${fs_used /}${goto 145}/${offset 5}${fs_size /}${alignr}${fs_free_perc /}%${font}
${voffset 15}${font StyleBats:size=9.9}${color2}x${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 4}HOME${goto 95}${font DroidSans:size=8.3}${fs_used /home}${goto 145}/${offset 5}${fs_size /home}${alignr}${fs_free_perc /home}%${font}
${voffset 15}${font StyleBats:size=9.9}${color2}4${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 4}SWAP${goto 95}${font DroidSans:size=8.3}${swap}${goto 145}/${offset 5}${swapmax}${alignr}${swapperc}%${font}
##################
##   NETWORK    ##
################## 
${voffset 16}${font DroidSans:bold:size=8}${color blue}NETWORK (${addrs wlan0} / ${texeci 1800 wget 
-q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}) ${hr 2}$color$font
Down: $color${downspeed wlan0} k/s ${alignr}Up: ${upspeed wlan0} k/s
${downspeedgraph wlan0 25,140 000000 ff0000} ${alignr}${upspeedgraph wlan0 
25,140 000000 00ff00}$color
Total: ${totaldown wlan0} ${alignr}Total: ${totalup wlan0}
${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr}

draw_bg.lua

--[[
Background by londonali1010 (2009)

This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish.

To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
	lua_load ~/scripts/draw_bg.lua
	lua_draw_hook_pre draw_bg

Changelog:
+ v1.0 -- Original release (07.10.2009)
]]

-- Change these settings to affect your background.
-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.

corner_r=45

-- Set the colour and transparency (alpha) of your background.

bg_colour=0x000000
bg_alpha=0.5

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 conky_draw_bg()
	if conky_window==nil then return end
	local w=conky_window.width
	local h=conky_window.height
	local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
	cr=cairo_create(cs)
	
	cairo_move_to(cr,corner_r,0)
	cairo_line_to(cr,w-corner_r,0)
	cairo_curve_to(cr,w,0,w,0,w,corner_r)
	cairo_line_to(cr,w,h-corner_r)
	cairo_curve_to(cr,w,h,w,h,w-corner_r,h)
	cairo_line_to(cr,corner_r,h)
	cairo_curve_to(cr,0,h,0,h,0,h-corner_r)
	cairo_line_to(cr,0,corner_r)
	cairo_curve_to(cr,0,0,0,0,corner_r,0)
	cairo_close_path(cr)
	
	cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
	cairo_fill(cr)
end

bargraph_small.lua

--[[
BARGRAPH WIDGET
v2.1 by wlourf (07 Jan. 2011)
this widget draws a bargraph with different effects 
http://u-scripts.blogspot.com/2010/07/bargraph-widget.html
	
To call the script in a conky, use, before TEXT
	lua_load /path/to/the/script/bargraph.lua
	lua_draw_hook_pre main_rings
and add one line (blank or not) after TEXT
	
Parameters are :
3 parameters are mandatory
name - the name of the conky variable to display, for example for {$cpu cpu0}, just write name="cpu"
arg  - the argument of the above variable, for example for {$cpu cpu0}, just write arg="cpu0"
       arg can be a numerical value if name=""
max  - the maximum value the above variable can reach, for example, for {$cpu cpu0}, just write max=100
	
Optional parameters:
x,y	  - coordinates of the starting point of the bar, default = middle of the conky window
cap	  - end of cap line, ossibles values are r,b,s (for round, butt, square), default="b"
	    http://www.cairographics.org/samples/set_line_cap/
angle	  - angle of rotation of the bar in degress, default = 0 (i.e. a vertical bar)
	    set to 90 for an horizontal bar
skew_x	  - skew bar around x axis, default = 0
skew_y	  - skew bar around y axis, default = 0
blocks    - number of blocks to display for a bar (values >0) , default= 10
height	  - height of a block, default=10 pixels
width	  - width of a block, default=20 pixels
space	  - space between 2 blocks, default=2 pixels
angle_bar - this angle is used to draw a bar on a circular way (ok, this is no more a bar !) default=0
radius	  - for cicular bars, internal radius, default=0
	    with radius, parameter width has no more effect.

Colours below are defined into braces {colour in hexadecimal, alpha}
fg_colour    - colour of a block ON, default= {0x00FF00,1}
bg_colour    - colour of a block OFF, default = {0x00FF00,0.5}
alarm	     - threshold, values after this threshold will use alarm_colour colour , default=max
alarm_colour - colour of a block greater than alarm, default=fg_colour
smooth	     - (true or false), create a gradient from fg_colour to bg_colour, default=false 
mid_colour   - colours to add to gradient, with this syntax {position into the gradient (0 to1), colour hexa, alpha}
	       for example, this table {{0.25,0xff0000,1},{0.5,0x00ff00,1},{0.75,0x0000ff,1}} will add
	       3 colours to gradient created by fg_colour and alarm_colour, default=no mid_colour
led_effect   - add LED effects to each block, default=no led_effect
	       if smooth=true, led_effect is not used
	       possibles values : "r","a","e" for radial, parallel, perdendicular to the bar (just try!)
	       led_effect has to be used with theses colours :
fg_led	     - middle colour of a block ON, default = fg_colour
bg_led	     - middle colour of a block OFF, default = bg_colour
alarm_led    - middle colour of a block > ALARM,  default = alarm_colour

reflection parameters, not available for circular bars
reflection_alpha  - add a reflection effect (values from 0 to 1) default = 0 = no reflection
		    other values = starting opacity
reflection_scale  - scale of the reflection (default = 1 = height of text)
reflection_length - length of reflection, define where the opacity will be set to zero
		    values from 0 to 1, default =1
reflection	  - position of reflection, relative to a vertical bar, default="b"
		    possibles values are : "b","t","l","r" for bottom, top, left, right
draw_me     	  - if set to false, text is not drawn (default = true or 1)
		    it can be used with a conky string, if the string returns 1, the text is drawn :
		    example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",

v1.0 (10 Feb. 2010) original release
v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value	
v1.2 (28 Feb. 2010) just renamed the widget to bargraph
v1.3 (03 Mar. 2010) added parameters radius & angle_bar to draw the bar in a circular way
v2.0 (12 Jul. 2010) rewrite script + add reflection effects and parameters are now set into tables
v2.1 (07 Jan. 2011) Add draw_me parameter and correct memory leaks, thanks to "Creamy Goodness"

--      This program is free software; you can redistribute it and/or modify
--      it under the terms of the GNU General Public License as published by
--      the Free Software Foundation version 3 (GPLv3)
--     
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warranty of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
--     
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--      MA 02110-1301, USA.		

]]

require 'cairo'

----------------START OF PARAMETERS ----------

function conky_main_bars()
	local bars_settings={
		{	--[ Graph for CPU1 ]--
			name="cpu",
			arg="cpu1",
			max=100,
			alarm=50,
			alarm_colour={0xFF0000,0.72},
			bg_colour={0xFFFFFF,0.25},
			fg_colour={0x00FF00,0.55},
			mid_colour={{0.45,0xFFFF00,0.70}},
			x=90,y=168,
			blocks=65,
			space=1,
			height=2,width=5,
			angle=90,
			smooth=true
			},
		{	--[ Graph for CPU2 ]--
			name="cpu",
			arg="cpu2",
			max=100,
			alarm=50,
			alarm_colour={0xFF0000,0.72},
			bg_colour={0xFFFFFF,0.25},
			fg_colour={0x00FF00,0.55},
			mid_colour={{0.45,0xFFFF00,0.70}},
			x=90,y=182,
			blocks=65,
			space=1,
			height=2,width=5,
			angle=90,
			smooth=true
			},
		{	--[ Graph for Memory ]--
			name="memperc",
			arg="",
			max=100,
			alarm=50,
			alarm_colour={0xFF0000,0.72},
			bg_colour={0xFFFFFF,0.25},
			fg_colour={0x00FF00,0.55},
			mid_colour={{0.45,0xFFFF00,0.70}},
			x=20,y=307,
			blocks=90,
			space=1,
			height=2,width=5,
			angle=90,
			smooth=true
			},
		{	--[ Graph for Root ]--
                        name="fs_used_perc",
			arg="/",
			max=100,
			alarm=50,
			alarm_colour={0xFF0000,0.72},
			bg_colour={0xFFFFFF,0.25},
			fg_colour={0x00FF00,0.55},
			mid_colour={{0.45,0xFFFF00,0.70}},
			x=20,y=352,
			blocks=90,
			space=1,
			height=2,width=5,
			angle=90,
			smooth=true
			},	
		{	--[ Graph for Home ]--
			name="fs_used_perc",
			arg="/home",
			max=100,
			alarm=50,
			alarm_colour={0xFF0000,0.72},
			bg_colour={0xFFFFFF,0.25},
			fg_colour={0x00FF00,0.55},
			mid_colour={{0.45,0xFFFF00,0.70}},
			x=20,y=379,
			blocks=90,
			space=1,
			height=2,width=5,
			angle=90,
			smooth=true
			},	
	        {	--[ Graph for Swap ]--
                        name="swapperc",
			arg="",
			max=100,
			alarm=50,
			alarm_colour={0xFF0000,0.72},
			bg_colour={0xFFFFFF,0.25},
			fg_colour={0x00FF00,0.55},
			mid_colour={{0.45,0xFFFF00,0.70}},
			x=20,y=406,
			blocks=90,
			space=1,
			height=2,width=5,
			angle=90,
			smooth=true
			},
		 }	
	
-----------END OF PARAMETERS--------------


    
	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)    
	--prevent segmentation error when reading cpu state
    if tonumber(conky_parse('${updates}'))>3 then
        for i in pairs(bars_settings) do
        	
        	draw_multi_bar_graph(bars_settings[i])
        	
        end
    end
	cairo_destroy(cr)
	cairo_surface_destroy(cs)
	cr=nil

end



function draw_multi_bar_graph(t)
	cairo_save(cr)
	--check values
	if t.draw_me == true then t.draw_me = nil end
	if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end	
	if t.name==nil and t.arg==nil then 
		print ("No input values ... use parameters 'name' with 'arg' or only parameter 'arg' ") 
		return
	end
	if t.max==nil then
		print ("No maximum value defined, use 'max'")
		return
	end
	if t.name==nil then t.name="" end
	if t.arg==nil then t.arg="" end

	--set default values	
	if t.x == nil		then t.x = conky_window.width/2 end
	if t.y == nil		then t.y = conky_window.height/2 end
	if t.blocks == nil	then t.blocks=10 end
	if t.height == nil	then t.height=10 end
	if t.angle == nil 	then t.angle=0 end
	t.angle = t.angle*math.pi/180
	--line cap style
	if t.cap==nil		then t.cap = "b" end
	local cap="b"
	for i,v in ipairs({"s","r","b"}) do 
		if v==t.cap then cap=v end
	end
	local delta=0
	if t.cap=="r" or t.cap=="s" then delta = t.height end
	if cap=="s" then 	cap = CAIRO_LINE_CAP_SQUARE
	elseif cap=="r" then
		cap = CAIRO_LINE_CAP_ROUND
	elseif cap=="b" then
		cap = CAIRO_LINE_CAP_BUTT
	end
	--end line cap style
	--if t.led_effect == nil	then t.led_effect="r" end
	if t.width == nil	then t.width=20 end
	if t.space == nil	then t.space=2 end
	if t.radius == nil	then t.radius=0 end
	if t.angle_bar == nil	then t.angle_bar=0 end
	t.angle_bar = t.angle_bar*math.pi/360 --halt angle
	
	--colours
	if t.bg_colour == nil 	then t.bg_colour = {0x00FF00,0.5} end
	if #t.bg_colour~=2 		then t.bg_colour = {0x00FF00,0.5} end
	if t.fg_colour == nil 	then t.fg_colour = {0x00FF00,1} end
	if #t.fg_colour~=2 		then t.fg_colour = {0x00FF00,1} end
	if t.alarm_colour == nil 	then t.alarm_colour = t.fg_colour end
	if #t.alarm_colour~=2 		then t.alarm_colour = t.fg_colour end

	if t.mid_colour ~= nil then	
		for i=1, #t.mid_colour do    
		    if #t.mid_colour[i]~=3 then 
		    	print ("error in mid_color table")
		    	t.mid_colour[i]={1,0xFFFFFF,1} 
		    end
		end
    end
    
	if t.bg_led ~= nil and #t.bg_led~=2	then t.bg_led = t.bg_colour end
	if t.fg_led ~= nil and #t.fg_led~=2	then t.fg_led = t.fg_colour end
	if t.alarm_led~= nil and #t.alarm_led~=2 then t.alarm_led = t.fg_led end
	
	if t.led_effect~=nil then
		if t.bg_led == nil then t.bg_led = t.bg_colour end
		if t.fg_led == nil 	then t.fg_led = t.fg_colour end
		if t.alarm_led == nil  then t.alarm_led = t.fg_led end
	end
	

	if t.alarm==nil then t.alarm = t.max end --0.8*t.max end
	if t.smooth == nil then t.smooth = false end

	if t.skew_x == nil then 
		t.skew_x=0 
	else
		t.skew_x = math.pi*t.skew_x/180	
	end
	if t.skew_y == nil then 
		t.skew_y=0
	else
		t.skew_y = math.pi*t.skew_y/180	
	end
	
	if t.reflection_alpha==nil then t.reflection_alpha=0 end
	if t.reflection_length==nil then t.reflection_length=1 end
	if t.reflection_scale==nil then t.reflection_scale=1 end
	
	--end of default values
	

 	local function rgb_to_r_g_b(col_a)
		return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
	end
	
	
	--functions used to create patterns

	local function create_smooth_linear_gradient(x0,y0,x1,y1)
		local pat = cairo_pattern_create_linear (x0,y0,x1,y1)
		cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
		cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
		if t.mid_colour ~=nil then
			for i=1, #t.mid_colour do
				cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
			end
		end
		return pat
	end

	local function create_smooth_radial_gradient(x0,y0,r0,x1,y1,r1)
		local pat =  cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
		cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
		cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
		if t.mid_colour ~=nil then
			for i=1, #t.mid_colour do
				cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
			end
		end
		return pat
	end
	
	local function create_led_linear_gradient(x0,y0,x1,y1,col_alp,col_led)
		local pat = cairo_pattern_create_linear (x0,y0,x1,y1) ---delta, 0,delta+ t.width,0)
		cairo_pattern_add_color_stop_rgba (pat, 0.0, rgb_to_r_g_b(col_alp))
		cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
		cairo_pattern_add_color_stop_rgba (pat, 1.0, rgb_to_r_g_b(col_alp))
		return pat
	end

	local function create_led_radial_gradient(x0,y0,r0,x1,y1,r1,col_alp,col_led,mode)
		local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
		if mode==3 then
			cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_alp))				
			cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
			cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))				
		else
			cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_led))
			cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))				
		end
		return pat
	end






	local function draw_single_bar()
		--this fucntion is used for bars with a single block (blocks=1) but 
		--the drawing is cut in 3 blocks : value/alarm/background
		--not zvzimzblr for circular bar
		local function create_pattern(col_alp,col_led,bg)
			local pat
			
			if not t.smooth then
				if t.led_effect=="e" then
					pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
				elseif t.led_effect=="a" then
					pat = create_led_linear_gradient (t.width/2, 0,t.width/2,-t.height,col_alp,col_led)
				elseif  t.led_effect=="r" then
					pat = create_led_radial_gradient (t.width/2, -t.height/2, 0, t.width/2,-t.height/2,t.height/1.5,col_alp,col_led,2)
				else
					pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
				end
			else
				if bg then
					pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
				else
					pat = create_smooth_linear_gradient(t.width/2, 0, t.width/2,-t.height)
				end
			end
			return pat
		end
		
		local y1=-t.height*pct/100
		local y2,y3
		if pct>(100*t.alarm/t.max) then 
			y1 = -t.height*t.alarm/100
			y2 = -t.height*pct/100
			if t.smooth then y1=y2 end
		end
		
		if t.angle_bar==0 then
		
			--block for fg value
			local pat = create_pattern(t.fg_colour,t.fg_led,false)
			cairo_set_source(cr,pat)
			cairo_rectangle(cr,0,0,t.width,y1)
			cairo_fill(cr)
			cairo_pattern_destroy(pat)
		
			-- block for alarm value			
			if not t.smooth and y2 ~=nil then 
				pat = create_pattern(t.alarm_colour,t.alarm_led,false)
				cairo_set_source(cr,pat)
				cairo_rectangle(cr,0,y1,t.width,y2-y1)
				cairo_fill(cr)
				y3=y2
				cairo_pattern_destroy(pat)
			else
				y2,y3=y1,y1
			end
			-- block for bg value
			cairo_rectangle(cr,0,y2,t.width,-t.height-y3)
			pat = create_pattern(t.bg_colour,t.bg_led,true)
			cairo_set_source(cr,pat)
			cairo_pattern_destroy(pat)
			cairo_fill(cr)
		end		
	end  --end single bar
	





	local function draw_multi_bar()
		--function used for bars with 2 or more blocks
		for pt = 1,t.blocks do 
			--set block y
			local y1 = -(pt-1)*(t.height+t.space)
			local light_on=false
			
			--set colors
			local col_alp = t.bg_colour
			local col_led = t.bg_led
			if pct>=(100/t.blocks) or pct>0 then --ligth on or not the block
				if pct>=(pcb*(pt-1))  then 
					light_on = true
					col_alp = t.fg_colour
					col_led = t.fg_led
					if pct>=(100*t.alarm/t.max) and (pcb*pt)>(100*t.alarm/t.max) then 
						col_alp = t.alarm_colour 
						col_led = t.alarm_led 
					end
				end
			end

			--set colors
			--have to try to create gradients outside the loop ?
			local pat 
			
			if not t.smooth then
				if t.angle_bar==0 then
					if t.led_effect=="e" then
						pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
					elseif t.led_effect=="a" then
						pat = create_led_linear_gradient (t.width/2, -t.height/2+y1,t.width/2,0+t.height/2+y1,col_alp,col_led)					
					elseif  t.led_effect=="r" then
						pat = create_led_radial_gradient (t.width/2, y1, 0, t.width/2,y1,t.width/1.5,col_alp,col_led,2)	
					else
						pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
					end
				else
					 if t.led_effect=="a"  then
						 pat = create_led_radial_gradient (0, 0, t.radius+(t.height+t.space)*(pt-1),
														 0, 0, t.radius+(t.height+t.space)*(pt),						 
											 col_alp,col_led,3)	
					else
						pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))					
					end
					
				end
			else
				
				if light_on then
					if t.angle_bar==0 then
						pat = create_smooth_linear_gradient(t.width/2, t.height/2, t.width/2,-(t.blocks-0.5)*(t.height+t.space))
					else
						pat = create_smooth_radial_gradient(0, 0, (t.height+t.space),  0,0,(t.blocks+1)*(t.height+t.space),2)
					end
				else		
					pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
				end
			end
			cairo_set_source (cr, pat)
			cairo_pattern_destroy(pat)

			--draw a block
			if t.angle_bar==0 then
				cairo_move_to(cr,0,y1)
				cairo_line_to(cr,t.width,y1)
			else		
				cairo_arc( cr,0,0,
					t.radius+(t.height+t.space)*(pt)-t.height/2,
					 -t.angle_bar -math.pi/2 ,
					 t.angle_bar -math.pi/2)
			end
			cairo_stroke(cr)
		end	
	end
	
	
	
	
	local function setup_bar_graph()
		--function used to retrieve the value to display and to set the cairo structure
		if t.blocks ~=1 then t.y=t.y-t.height/2 end
		
		local value = 0
		if t.name ~="" then
			value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
			--$to_bytes doesn't work when value has a decimal point,
			--https://garage.maemo.org/plugins/ggit/browse.php/?p=monky;a=commitdiff;h=174c256c81a027a2ea406f5f37dc036fac0a524b;hp=d75e2db5ed3fc788fb8514121f67316ac3e5f29f
			--http://sourceforge.net/tracker/index.php?func=detail&aid=3000865&group_id=143975&atid=757310
			--conky bug?
			--value = (conky_parse(string.format('${%s %s}', t.name, t.arg)))
			--if string.match(value,"%w") then
			--	value = conky_parse(string.format('${to_bytes %s}',value))
			--end
		else
			value = tonumber(t.arg)
		end

		if value==nil then value =0 end
		
		pct = 100*value/t.max
		pcb = 100/t.blocks
		
		cairo_set_line_width (cr, t.height)
		cairo_set_line_cap  (cr, cap)
		cairo_translate(cr,t.x,t.y)
		cairo_rotate(cr,t.angle)

		local matrix0 = cairo_matrix_t:create()
		tolua.takeownership(matrix0)
		cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
		cairo_transform(cr,matrix0)

	
		
		--call the drawing function for blocks
		if t.blocks==1 and t.angle_bar==0 then
			draw_single_bar()
			if t.reflection=="t" or t.reflection=="b" then cairo_translate(cr,0,-t.height) end
		else
			draw_multi_bar()
		end

		--dot for reminder
		--[[
		if t.blocks ~=1 then
			cairo_set_source_rgba(cr,1,0,0,1)
			cairo_arc(cr,0,t.height/2,3,0,2*math.pi)
			cairo_fill(cr)
		else
			cairo_set_source_rgba(cr,1,0,0,1)
			cairo_arc(cr,0,0,3,0,2*math.pi)
			cairo_fill(cr)
		end]]
		
		--call the drawing function for reflection and prepare the mask used		
		if t.reflection_alpha>0 and t.angle_bar==0 then
			local pat2
			local matrix1 = cairo_matrix_t:create()
			tolua.takeownership(matrix1)
			if t.angle_bar==0 then
				pts={-delta/2,(t.height+t.space)/2,t.width+delta,-(t.height+t.space)*(t.blocks)}
				if t.reflection=="t" then
					cairo_matrix_init (matrix1,1,0,0,-t.reflection_scale,0,-(t.height+t.space)*(t.blocks-0.5)*2*(t.reflection_scale+1)/2)
					pat2 = cairo_pattern_create_linear (t.width/2,-(t.height+t.space)*(t.blocks),t.width/2,(t.height+t.space)/2)
				elseif t.reflection=="r" then
					cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,delta+2*t.width,0)
					pat2 = cairo_pattern_create_linear (delta/2+t.width,0,-delta/2,0)
				elseif t.reflection=="l" then
					cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,-delta,0)
					pat2 = cairo_pattern_create_linear (-delta/2,0,delta/2+t.width,-0)
				else --bottom
					cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(t.height+t.space)*(t.reflection_scale+1)/2)
					pat2 = cairo_pattern_create_linear (t.width/2,(t.height+t.space)/2,t.width/2,-(t.height+t.space)*(t.blocks))
				end
			end
			cairo_transform(cr,matrix1)

			if t.blocks==1 and t.angle_bar==0 then
				draw_single_bar()
				cairo_translate(cr,0,-t.height/2) 
			else
				draw_multi_bar()
			end
			
			
			cairo_set_line_width(cr,0.01)
			cairo_pattern_add_color_stop_rgba (pat2, 0,0,0,0,1-t.reflection_alpha)
			cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
			if t.angle_bar==0 then
				cairo_rectangle(cr,pts[1],pts[2],pts[3],pts[4])
			end
			cairo_clip_preserve(cr)
			cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
			cairo_stroke(cr)
			cairo_mask(cr,pat2)
			cairo_pattern_destroy(pat2)
			cairo_set_operator(cr,CAIRO_OPERATOR_OVER)
			
		end --reflection
		pct,pcb=nil
	end --setup_bar_graph()
	
	--start here !
	setup_bar_graph()
	cairo_restore(cr)
end

Last edited by HungGarTiger (2012-07-18 01:44:27)


"No sympathy for the devil. If you buy the ticket, take the ride."
- Hunter S. Thompson

Offline

#1006 2012-07-19 10:11:22

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

Re: conky configs and screenshots!

CHGvR.png
osXpo.png

Is there a way to align minutes and day right without using a monospace font?

Offline

#1007 2012-07-19 12:13:02

Dustbin
Member
From: The Netherlands
Registered: 2011-12-07
Posts: 124

Re: conky configs and screenshots!

ghost wrote:

http://i.imgur.com/CHGvR.png
http://i.imgur.com/osXpo.png

Is there a way to align minutes and day right without using a monospace font?

You could try the ${goto x} command. That way you specify a hard coded position (x in pixels) where you want conky to print the info.

See http://conky.sourceforge.net/variables.html for a full list of conky settings


If the Matrix was real, it would run on Arch...

Offline

#1008 2012-07-19 15:39:56

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

Re: conky configs and screenshots!

Dustbin wrote:

You could try the ${goto x} command. That way you specify a hard coded position (x in pixels) where you want conky to print the info.

See http://conky.sourceforge.net/variables.html for a full list of conky settings

vlYLM.png

Thanks for your answer.

'goto' creates a fixed offset, but I need an offset which is relative to ${time %H}.

I'm not sure if this is possible with conky.

This is my code at the moment

${offset 170}${time %A}
${voffset -116}${font Neutraface 2 Display Thin:size=192}${time %H}${font Neutraface 2 Display Thin:size=128}:${time %M}$font

Offline

#1009 2012-07-19 17:24:09

JeSuisNerd
Member
From: /home/egon
Registered: 2012-03-06
Posts: 30

Re: conky configs and screenshots!

ghost wrote:
Dustbin wrote:

You could try the ${goto x} command. That way you specify a hard coded position (x in pixels) where you want conky to print the info.

See http://conky.sourceforge.net/variables.html for a full list of conky settings

http://i.imgur.com/vlYLM.png

Thanks for your answer.

'goto' creates a fixed offset, but I need an offset which is relative to ${time %H}.

I'm not sure if this is possible with conky.

This is my code at the moment

${offset 170}${time %A}
${voffset -116}${font Neutraface 2 Display Thin:size=192}${time %H}${font Neutraface 2 Display Thin:size=128}:${time %M}$font

I've not used it myself, but you can use "alignr" (align right) on variables.  I'd imagine you could fix the colon and right-align the minutes hours, giving you the ability to fix the position of everything on the right.


Edited for stupid mistake.

Last edited by JeSuisNerd (2012-07-19 17:25:02)

Offline

#1010 2012-07-23 10:52:40

lorizean
Member
Registered: 2012-07-23
Posts: 18

Re: conky configs and screenshots!

This is my conky, I tried to keep it simple and elegant, will probably tweak around a bit more.


-- mod edit: read the rules and only post thumbnails https://bbs.archlinux.org/viewtopic.php?id=61754  [jwr] --


alignment tl
background yes
border_width 1
cpu_avg_samples 2
default_bar_size 10 50
default_color white
default_outline_color white
default_shade_color red
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
use_xft yes
xftfont Comic Relief:size=12
xftalpha 0.1
gap_x 1100
gap_y 10
minimum_size 400 0
net_avg_samples 1
no_buffers no
override_utf8_locale yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
pad_percents 0
text_buffer_size 256
total_run_times 0
stippled_borders 0
update_interval 0.5
uppercase no
use_spacer yes

TEXT
${font GeoSansLight:size=20}${color #ae5d63}${exec date +'%A'}
${voffset -10}${goto 20}${font GeoSansLight:size=50}${exec date +'%d'}\
${font GeoSansLight:size=20}${exec date +'%B %y'}
${font GeoSansLight:size=30}${goto 50}${exec date +'%R:%S'}
${font GeoSansLight:size=20}${voffset -15}${goto 70}${execi 30 /home/lorizean/.conkyc/up2date.sh}

the up2date.sh is just

#!/bin/bash
pacout=`pacman -Qu | wc -l`
if [ "$pacout" == "0" ]; then
        echo no updates
elif [ "$pacout" == "1" ]; then
        echo 1 update
else
        echo "$pacout updates"
fi

and I have a cronjob for pacman -Sy every 30 minutes.
There is probably a more elegant way to achieve this, but ah well.

Offline

#1011 2012-08-18 01:33:14

jeffdn
Member
Registered: 2012-08-17
Posts: 1

Re: conky configs and screenshots!

Here's my desktop setup, with Xfce and conky.

b2ef7m.png

# ~/.conkyrc

double_buffer yes
background yes

use_xft yes
xftfont Droid Sans:size=11

update_interval 1.0
 
total_run_times 0

own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,sticky,skip_pager

minimum_size 240 240
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
border_width 1
default_color lightgrey
default_shade_color lightgrey
default_outline_color lightgrey
alignment bottom_left
gap_x 20
gap_y 20
no_buffers yes
uppercase no

TEXT

${color #74c2e1}${font Droid Sans:size=14}${uid_name 1000}@${nodename}
${image ~/.icons/calendar.png -p 0,30 -s 24x24}    ${tab 20,0}${voffset 4}${font}${color}${time %A}, ${time %B %e}, ${time %G}
${image ~/.icons/clock.png -p 0,51 -s 24x24}    ${tab 20,0}${voffset 7}${font}${color}${time %H:%M:%S}
${image ~/.icons/mail.png -p 0,72 -s 24x24}    ${tab 20,0}${voffset 8}${font}${color}${execpi 300 python ~/.scripts/gmail.py} message(s)
${image ~/.icons/settings.png -p 0,93 -s 24x24}  ${tab 20,0}${voffset 8}${font}${color}[vol:${ibm_volume}]  [lcd:${ibm_brightness}]  [pacman:${execpi 300 pacman -Qu | wc -l}]
${image ~/.icons/wifi.png -p 0,114 -s 24x24}   ${tab 20,0$}${voffset 8}${font}${color}${wireless_link_bar 6,40 eth0}  ${wireless_essid} - ${addr eth0}
${image ~/.icons/bat.png -p 0,135 -s 24x24} ${tab 20,0}${voffset 8}${font}${color}${battery_bar 6,40 BAT0}  ${battery_short} - ${battery_time}
${image ~/.icons/cpu.png -p 0,156 -s 24x24}     ${tab 20,0}${voffset 8}${font}${color}${cpubar 6,40}  ${ibm_temps 0}c - ${freq 1}mHz
${image ~/.icons/mem.png -p 0,177 -s 24x24}   ${tab 20,0}${voffset 8}${font}${color}${membar 6,40}  ${mem} / ${memmax}
${image ~/.icons/disk.png -p 0,198 -s 24x24}       ${tab 20,0}${voffset 8}${font}${color}${fs_bar 6,40 /}  ${fs_used /} / ${fs_size /}
${image ~/.icons/home.png -p 0,219 -s 24x24}   ${tab 20,0}${voffset 8}${font}${color}${fs_bar 6,40 /home}  ${fs_used /home} / ${fs_size /home}

EDIT: sorry, mods, for breaking the image size rule -- it won't happen again!

Last edited by jeffdn (2012-08-18 06:46:10)

Offline

#1012 2012-08-18 17:01:34

carnero
Member
From: Prague, CZ
Registered: 2010-04-15
Posts: 10
Website

Re: conky configs and screenshots!

Here is mine...

conky_thumb.png
Usually I'm using MacBook with external screen above the laptop. And conky with two configurations.

conky_1.png
Upper config is used to display notifications - two Gmail accounts, Pocket (read-it-later service) and Google Reader. As you probably noted, it's inspired by lock screen on Windows 8.

# conky configuration
# bar for secondary screen
# by carnero

use_xft yes
xftfont Aller:style=normal:size=22

update_interval 1.0
total_run_times 0
double_buffer yes

own_window yes
own_window_type dock
own_window_transparent yes
own_window_argb_visual yes
own_window_argb_value 0
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_class conky_top

minimum_size 0 0

default_color ffffff
default_shade_color 191919
default_outline_color 191919
default_graph_size 32 7
default_bar_size 32 7
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no

color0 ffffff
color1 cccccc
color2 aaaaaa
color3 ff0096

# alignment top_center
gap_y 0
gap_x 0

net_avg_samples 2
cpu_avg_samples 2

override_utf8_locale yes

# image: -p 0,0 leads to ~5 px margin on the top, any other number than zero works well

TEXT
${goto 48}\
${image ~/data/images/icons/conky/holo_email.png -p 0,0 -s 36x36}\
${voffset 12}\
${color0}${execi 5 cat ~/bin/conky/gmail_cc.cache}\
${voffset -12}\
\
${goto 128}\
${image ~/data/images/icons/conky/holo_email_inmite.png -p 80,0 -s 36x36}\
${voffset 12}\
${color0}${execi 5 cat ~/bin/conky/gmail_im.cache}\
${voffset -12}\
\
${goto 208}\
${image ~/data/images/icons/conky/holo_pocket.png -p 160,0 -s 36x36}\
${voffset 12}\
${color0}${execi 5 cat ~/bin/conky/pocket.cache}\
${voffset -12}\
\
${goto 288}\
${image ~/data/images/icons/conky/holo_rss.png -p 240,0 -s 36x36}\
${voffset 12}\
${color0}${execi 5 cat ~/bin/conky/greader.cache}\
${voffset -12}

conky_2.png
Bottom config is used for bit more things. From left to right you can see date&time, battery status, volume, current air temperature in my city, CPU load (graph per core and average as number), CPU frequency, CPU temperature (average for both physical cores), disk I/O and left capacity for /home, amount of data transferred for WiFi or LAN and upload/download graph for current connection.

# conky configuration
# bar for 1280 px wide screen
# by carnero

use_xft yes
xftfont Aller:style=normal:size=8

update_interval 1.0
total_run_times 0
double_buffer yes

own_window yes
own_window_type dock
own_window_transparent yes
own_window_argb_visual yes
own_window_argb_value 0
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_class conky

minimum_size 0 0

default_color ffffff
default_shade_color 191919
default_outline_color 191919
default_graph_size 32 7
default_bar_size 32 7
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no

color0 ffffff
color1 cccccc
color2 aaaaaa
color3 ff0096

# alignment top_center
gap_y 0
gap_x 0

net_avg_samples 2
cpu_avg_samples 2

override_utf8_locale yes

TEXT
${voffset 0}\
${goto 30}\
${image ~/data/images/icons/conky/clock.png -p 0,0 -s 21x12}\
${color0}\
${if_match ${time %H} >= 8}${if_match ${time %H} <= 17}${if_match ${time %M} >= 50}${color3}${endif}${endif}${endif}\
${time %H:%M}${color1} | ${color0}${time %m.%d}${color1}\
\
${goto 144}\
${image ~/data/images/icons/conky/battery.png -p 114,0 -s 21x12}\
${color0}${execi 10 ~/bin/conky/acpi-level.sh}\
${if_empty ${execi 10 ~/bin/conky/acpi-time.sh}}\
${else}\
${color1} | ${color0}${execi 10 ~/bin/conky/acpi-time.sh}\
${endif}\
\
${goto 258}\
${image ~/data/images/icons/conky/volume.png -p 228,0 -s 21x12}\
${color0}${exec ~/bin/conky/volume.sh}\
\
${goto 372}\
${image ~/data/images/icons/conky/weather.png -p 342,0 -s 21x12}\
${color0}${execi 120 ~/bin/conky/weather-temp.sh}°C\
\
${goto 486}\
${image ~/data/images/icons/conky/load.png -p 456,0 -s 21x12}\
${voffset 1}${cpugraph cpu1 8,40 cccccc ffffff} ${cpugraph cpu2 8,40 cccccc cccccc}${voffset -1} \
${voffset 1}${cpugraph cpu3 8,40 cccccc ffffff} ${cpugraph cpu4 8,40 cccccc cccccc}${voffset -1} \
${color0}${cpu cpu0}%\
\
${goto 716}\
${image ~/data/images/icons/conky/freq.png -p 686,0 -s 21x12}\
${color0}${freq_g cup0}GHz${color1}\
\
${goto 830}\
${image ~/data/images/icons/conky/temp.png -p 800,0 -s 21x12}\
${color0}${execi 10 ~/bin/conky/acpi-temp.sh}\
\
${goto 944}\
${image ~/data/images/icons/conky/disk.png -p 914,0 -s 21x12}\
${voffset 1}${diskiograph 8,20 cccccc ffffff -t}${voffset -1} \
${color0} | ${memfree}\
\
${if_empty ${exec cat /proc/net/wireless | grep wlan0}}\
\
${goto 1058}\
${image ~/data/images/icons/conky/lan.png -p 1028,0 -s 21x12}\
${color0}${totaldown eth0}\
${goto 1174}\
${image ~/data/images/icons/conky/lan.png -p 1144,0 -s 21x12}\
${voffset 1}${upspeedgraph eth0 8,30 cccccc ffcccc 64 -t} ${downspeedgraph eth0 8,30 cccccc ccffcc 1024 -t}${voffset -1}\
\
${else}\
\
${goto 1058}\
${image ~/data/images/icons/conky/wifi.png -p 1028,0 -s 21x12}\
${color0}${totaldown wlan0}\
${goto 1174}\
${image ~/data/images/icons/conky/wifi.png -p 1144,0 -s 21x12}\
${voffset 1}${upspeedgraph wlan0 8,30 cccccc ffcccc 64 -t} ${downspeedgraph wlan0 8,30 cccccc ccffcc 1024 -t}${voffset -1}\
\
${endif}

And some scripts:

acpi-level.sh - Displaying battery status. Positive number for charging/still and negative for discharging.

#!/bin/bash

# current charge level
data=`acpi -b`
data=`echo $data | tr "[:upper:]" "[:lower:]"`
values=(`echo $data | tr ',' ' '`)

state=`echo ${values[2]/ /}`
level=`echo ${values[3]/ /}`

if [ "$state" == "discharging" ];
then
    echo "-$level"
else
    if [ "$state" == "full" ];
    then
        echo "$level"
    else
        echo "+$level"
    fi
fi

acpi-time.sh - Addition to status; Displays time to empty

#!/bin/bash

data=`acpi -b`
data=`echo $data | tr "[:upper:]" "[:lower:]"`
values=(`echo $data | tr ',' ' '`)
timepre=(`echo ${values[4]} | tr ' ' ' '`)
time=`echo ${timepre/ /}`
if [ "$time" != "" ]; then
    timeparts=(`echo $time | tr ':' ' '`)
    echo "${timeparts[0]}:${timeparts[1]}"
else
    echo ""
fi

acpi-temp.sh - Average temperature for two physical cores of CPU

#!/bin/bash
# script requires bc and sed

sensors=$(sensors)

# average cpu temperature
data0=`echo $sensors | sed "s/.*Core 0:[^\+]*+\([0-9\.]*\).*$/\1/g"`
data1=`echo $sensors | sed "s/.*Core 1:[^\+]*+\([0-9\.]*\).*$/\1/g"`
cpu=$(echo "($data0+$data1)/2" | bc -l | xargs printf "%.1f")

echo $cpu"°C"

Notification scripts are run by cron every minute saving numbers to .cache files. From there are numbers read by conky. Scripts for downloading such numbers from Gmail and Google Reader are mostly on top positions in Google. Also available in AUR. Just Pocket uses only wget and their API. API key is free for all on their Pocket's website.

/usr/bin/wget -O /tmp/pocket.tmp https://readitlaterlist.com/v2/stats?username=USER\&password=PASS\&apikey=API_KEY &> /dev/null

If you noted low quality of scripts: I'm learning this stuff, but it's working pretty good.

Offline

#1013 2012-08-18 19:16:45

mrpeachy
Member
Registered: 2011-12-31
Posts: 4

Re: conky configs and screenshots!

ghost wrote:
Dustbin wrote:

You could try the ${goto x} command. That way you specify a hard coded position (x in pixels) where you want conky to print the info.

See http://conky.sourceforge.net/variables.html for a full list of conky settings

http://i.imgur.com/vlYLM.png

Thanks for your answer.

'goto' creates a fixed offset, but I need an offset which is relative to ${time %H}.

I'm not sure if this is possible with conky.

This is my code at the moment

${offset 170}${time %A}
${voffset -116}${font Neutraface 2 Display Thin:size=192}${time %H}${font Neutraface 2 Display Thin:size=128}:${time %M}$font

this reply might be a bit late, but you can do this kind of alignment using a lua script
here is the script, i called it align.lua

--align function by mrpeachy 8/18/2012
require 'cairo'
function conky_align(altab)
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=tonumber(conky_parse('${updates}'))
if updates>3 then --as this function may use conky_parse("${cpu}")
altab=loadstring("return" .. altab)()
--#######################################################
--### SET DEFAULTS BELOW, DEFAULTS FOLLOW or ############
--#######################################################
local t=altab.t			or "set text"
local f=altab.f			or "mono"
local fs=altab.fs		or 12
local st=altab.st		or "normal"
local go=altab.go		or 50
local al=altab.al		or "l"
--########################################################
local co1,co2=string.find (t,"${")
	if co1 == 1 and co2 == 2 then
	t=conky_parse(t)
	end
	if st=="normal" then
	cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
	elseif
	st=="bold" then
	cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
	elseif
	st=="italic" then
	cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL);
	elseif
	st=="bold:italic" then
	cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD);
	end
local fsl=tonumber(fs)*1.2
cairo_set_font_size (cr, fsl)
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,t,extents)
local w=extents.x_advance
	if al=="r" then
	goto=go-w
	elseif al=="c" then
	goto=go-(w/2)
	elseif al=="l" then
	goto=go	
	end
return "${goto "..goto.." }${font "..f..":"..st..":size="..fs.."}"..t
else
return ""
end --if updates>3 then--#######################################################################
goto=nil
co1=nil
co2=nil
altab=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end--end main function

EDIT - fixed a line so that default fontsize was measured correctly
EDIT2 - fixed another error with fontsize.  now working as advertised big_smile

in conkyrc, above TEXT you need to load the script like this

lua_load /path/to/script/align.lua

then to use it you call the function below TEXT like this

${lua_parse align {t="${time %H}",go=200,al="r",f="Zekton Rg",fs=36,st="bold"} }${lua_parse align {t=":",go=210,al="c",f="Zekton Rg",fs=36,st="normal"} }${lua_parse align {t="${time %M}",go=215,al="l",f="Zekton Rg",fs=36,st="bold:italic"} }

and here are some instructions

# using ${lua_parse align {t=,f=,fs=,st=,go=,al=}}
# eg: ${lua_parse align {t="${time %H}",f="Sans",fs=36,st="normal",go=100,al="r"}}
# settings explained
# t= this is the text to be displayed. Either type text directly t="hello world", or set a conky object t="${cpu cpu0}".  MUST be in quotes, default is "set text"
# f= font to be used, MUST be in quotes, default is "mono"
# fs= font size, NOT in quotes, default is 12
# st= font style MUST be in quotes, "normal", "bold", "italic" or "bold:italic" default is "normal"
# go= goto position, NOT in quotes, default is 50
# al= alignment type.  MUST be in quotes, default is "l"
#   al="l" left alignment, text appears to the left of go setting
#   al="c" center alignment, text is centered at go setting
#   al="r" right alignment, text appears to right of go setting
# settings are entered in a lua table {}, so be careful about getting the number of curly brackets correct in the setup
# note, settings do not need to be entered in any particular order BUT every entry MUST be followed by a comma ,
# note, if a setting is not given the default is used, you can edit the lua script to change the defaults where indicated

Last edited by mrpeachy (2012-08-19 07:35:07)

Offline

#1014 2012-08-19 01:56:54

guipaganini
Member
Registered: 2012-08-19
Posts: 1

Re: conky configs and screenshots!

Hi josh, how are you doing? I wanna know how did you put this frame around your conky... Can you send me your .conkyrc?
Thanks

Joshmotron wrote:

After using Arch for quite some time then going to <cough> for about 1.5 years, I'm back on Arch since last Saturday and have been basically tweaking it almost non-stop to look pretty, but subtle. Before I usually just outright took people's conky's that I really enjoyed. But this time I decided not to be lazy and built my own (even though there are ass load of settings, the conky website if quite useful once you figure out the minimal syntax). While this is nothing special and has no Lua (the code I've scares me not only in it's seeming exactitude (I'd never sleep/can't imagine Atromch's pain) but also its length), it does however nicely tie in with the look of everything I've done so far. Everything's kinda low key, color wise, cause I'm usually always in near dark or total dark and anything blindingly blue, cyan, white, or green hurts after a while.

Plus, I totally whipped together a nice Python script to display what video I'm playing. It works whether playing a single file, a playlist, from the directory itself or from outside of it; it also knows when you're not watching (bwahaha).

I'm not entirely happy with the ram usage and hdd stats, but without those it looks a little too plain.
http://ompldr.org/tZWpzNA

Code for creating the necessary mplayer.log. Removing the log file is necessary for when we close the player.

function mplayer() {
    /usr/bin/mplayer -quiet -msglevel all=0 -identify "$@" > $HOME/.mplayer/mplayer.log
    pid=$!
    wait $pid
    rm $HOME/.mplayer/mplayer.log
}

Code for Python script.

#!/usr/bin/python

import os
import sys
import getopt

class Log(object):
    def __init__(self, log):
        self.log = log
        self.opts = {}

    def readfile(self):
        """Python3 is weird about encoding, hence that line.
        If there's no log file, the playing function assumes
        nothing is playing and displays it as such.
        """
        try:
            with open(self.log, 'rb') as fd:
                for line in fd:
                    line_str = str(line, encoding='utf8')
                    key, value = line_str.strip().split('=')
                    self.opts[key] = value
        except IOError:
            pass
        return self

    def playing(self):
        """ID_FILENAME is specific to the logfile mplayer2 spits out.
        The split will grab the last part of a multi-element list if you
        play your videos from a parent directory.
            e.g., ~/tv/arrested_development/season_2/episode_16_meat_the_veals.mkv
            returns "episode_16_meat_the_veals.mkv"
        Otherwise it just returns the filename if you play it from the location
        of the file.
        """
        try:
            return self.opts['ID_FILENAME'].split('/')[-1]
        except KeyError:
            return '<Currently no video playing.>'

def main(_log):
    """The print statement is picked up by conky."""
    log = Log(_log)
    print(log.readfile().playing())

if __name__ == "__main__":
    """Will display ID_FILENAME from mplayer logfile. For use in Conky."""

    logfile = os.path.join(os.getenv('HOME'), '.mplayer', 'mplayer.log')
    main(logfile)

Offline

#1015 2012-08-24 06:50:15

greenxero
Member
Registered: 2012-08-24
Posts: 1

Re: conky configs and screenshots!

Greetings all. I am not an Arch user, but this forum has been an excellent resource for information.  I thought I would post my conky set up for others to see.  Please let me know what you think.

The on off indicators(top to bottom):
1. Bluetooth device connected(my PS3 controller)
2. Wired connection w/ IP
3. Wifi Connection w/ IP
4. OpenVPN running w/ external IP to verify

The script is ugly, it is my first conky setup after a long break.  I had issues with the pie_chart.lua loading font and other minor issues, so it may act strange when modified.

Items used/modified:

Wallpaper - http://kde-look.org/content/show.php?content=51146
Icons - IceGlass Http://kde-look.org/content/search.php
         - PS3 Sixaxis http://www.iconarchive.com/show/playsta … -icon.html
         - OPENVPN Icon - http://openvpn.net/index.php/miscellane … icons.html

Lua Script for pie chart - http://wlourf.deviantart.com/art/Pie-Ch … -166109474

Font - http://www.urbanfonts.com/fonts/monofur.htm

Download the zip with icons and scripts: http://dl.dropbox.com/u/88704846/green-conky.zip

screenshot

Last edited by greenxero (2012-08-24 14:16:22)

Offline

#1016 2012-08-25 10:26:42

Paramvir
Member
Registered: 2009-08-06
Posts: 135
Website

Re: conky configs and screenshots!

greenxero wrote:

Greetings all. I am not an Arch user, but this forum has been an excellent resource for information.  I thought I would post my conky set up for others to see.  Please let me know what you think.

That looks fantastic - just out of the Movies he he - make kids go stary eyed wink

Offline

#1017 2012-10-04 14:59:42

spupy
Member
Registered: 2009-08-12
Posts: 218

Re: conky configs and screenshots!

Anyone has an icon set with small and minimalistic icons for things like HDD, temperature, battery?

Could you share what icons are you using?

Last edited by spupy (2012-10-04 15:03:02)


There are two types of people in this world - those who can count to 10 by using their fingers, and those who can count to 1023.

Offline

#1018 2012-10-04 15:13:35

carnero
Member
From: Prague, CZ
Registered: 2010-04-15
Posts: 10
Website

Re: conky configs and screenshots!

spupy: I have my own, only those displayed on screenshot. Not complete icon-set.

Offline

#1019 2012-10-14 22:13:10

secondplanet
Member
Registered: 2012-09-23
Posts: 30

Re: conky configs and screenshots!

a

Last edited by secondplanet (2016-08-09 17:49:47)

Offline

#1020 2012-10-18 16:07:34

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 340
Website

Re: conky configs and screenshots!

click image for better view , this is just a simple .conkyrc without sensors and has audacious now playing  download it here  http://pastebin.com/00pzAKSv
link to the arch icons is in the script , hope someone finds it usefull

conky.jpg

cirrus

Offline

#1021 2012-10-20 15:28:25

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 340
Website

Re: conky configs and screenshots!

conky.jpg
click image to view
similar to above but with icons , link to icon .zip is in the .conkyrc here

http://pastebin.com/jxrhtLw7

Offline

#1022 2012-10-25 04:40:26

wildcat46734
Member
Registered: 2012-10-25
Posts: 1

Re: conky configs and screenshots!

I'm new to conky and working on trying to get all set up on a macbook pro running Ubuntu. I know this forum is dedicated to arch linux but I got some of the code to work on my computer anyways. I was wondering if someone could post a conky that would display the info for Pandora radio? I saw an example on a screenshot of this earlier but didn't see the code. If anyone could help me out that would be great! Thanks

Offline

#1023 2012-11-26 16:01:16

kentarch
Member
Registered: 2012-07-30
Posts: 16

Re: conky configs and screenshots!

cirrus wrote:

http://s19.postimage.org/ukwn12j6n/conky.jpg
click image to view
similar to above but with icons , link to icon .zip is in the .conkyrc here

http://pastebin.com/jxrhtLw7

I like a simple Conky configuration with icons, so I configured my Conky by referencing yours. Thank you, cirrus, for sharing your  Conky and icons.


Arch Linux x86_64 w/ MATE or Openbox

Offline

#1024 2012-12-04 06:17:08

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 324

Re: conky configs and screenshots!

getting some great ideas from this thread so I thought I would share what I have created thus far:
SS...
tZ2s0eg
arch logo (unsure why the preview is garbled!)
tZ2s1MQ

.conkyrc

lua script

Fonts used:
DroidSans
DroidSansFallback
Neuropolitical
Illustrate It
Stylebats
OpenLogos
GA Dings
GA Dings 1

Clock Rings explained: (starting from inner circle)
Hours, Minutes, Seconds, Day, Month

I still include the normal time so I can see it from other side of room!



as much as i like this config for some reason though it consumes relativly high cpu % this ss shows it is running at 2.50% !! any clues as to why this is, I'm just a beginner lol

Last edited by t0m5k1 (2012-12-04 06:21:24)


ROG Strix (GD30CI) - Intel Core i5-7400 CPU - 32Gb 2400Mhz - GTX1070 8GB - AwesomeWM (occasionally XFCE, i3)

If everything in life was easy, we would learn nothing!
Linux User: 401820  Steam-HearThis.at-Last FM-Reddit

Offline

#1025 2012-12-04 10:26:49

rix
Member
Registered: 2012-07-25
Posts: 238

Re: conky configs and screenshots!

ot: @ Joshmotron: what's the font in the screen?
Thanks.

Offline

Board footer

Powered by FluxBB