topic title: Conky configuration
Posts: 630
Eino
Joined: 12 Oct 2012
#76
This is a simple conky but it gets the job done.

Code: Select all

alignment top_right
background yes
cpu_avg_samples 2
default_color 000000        
default_outline_color 000000     
default_shade_color 000000    
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
gap_x 20
gap_y 10
max_specials 1024
max_user_text 10000
maximum_width 120
minimum_size 1000 5000
net_avg_samples 2
no_buffers yes
override_utf8_locale yes
own_window yes
own_window_colour 000000
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class Conky
own_window_transparent yes
own_window_type conky
pad_percents 2            
short_units yes    
stippled_borders 3
show_graph_scale no
show_graph_range no
text_buffer_size 8000
update_interval 1.0
uppercase no
use_spacer no
use_xft yes
xftalpha 1
TEXT
${color #FFFB39}${font Liberation Sans:size=11}
${nodename}
${pre_exec cat /etc/issue.net}
${kernel}
${machine}
${time %A}${offset 04}${time %e}
${time %B}${offset 06}${time %Y}
Time ${time %I}:${time %M}:${time %S} ${time %p}
                 

cpu usage:   ${cpu cpu0}%
mem usage:  ${memperc}%
processes:  ${processes}
hdd size:  ${fs_size}
free space:  ${fs_free_perc /home}%
root:  ${fs_used_perc /root}%
swap:  ${swapperc}%
cpu active:${top cpu 1}%
ram usage:  ${mem}
${top_mem name 1}
${top name 1}
Connection Speed
dnl:  ${downspeed eth0}
upl:  ${upspeed eth0}
Posts: 325
male
Joined: 04 Nov 2011
#77
Hi,

there is a conky-manager:

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://teejeetech.blogspot.ro/p/conky-manager.html"
linktext was:"http://teejeetech.blogspot.ro/p/conky-manager.html"
====================================


Theme:
conky8 (slightly modified)
Alanarchy
Posts 0
Alanarchy
#78
Conyrc using hwmon for temps and fan speeds.

Code: Select all

# Conky settings #
background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048

temperature_unit fahrenheit

# Window specifications #

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

border_inner_margin 0
border_outer_margin 0

minimum_size 200 250
maximum_width 400

alignment tl
gap_x 35
gap_y 35

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

# Text settings #
use_xft yes
xftfont caviar dreams:size=9
xftalpha 0.5
text_buffer_size 2048

uppercase no

temperature_unit celsius
default_color FFFFFF

# Lua Load  #
lua_load ~/.conky/clock_rings.lua
lua_draw_hook_pre clock_rings

TEXT
${voffset 8}${color FF6600}${font caviar dreams:size=16}${time %A}${font}${voffset -8}${alignr 50}${color FFFFFF}${font caviar dreams:size=38}${time %e}${font}
${color FFFFFF}${voffset -30}${color FFFFFF}${font caviar dreams:size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font caviar dreams:size=20}${time %Y}${font}${color FF6600}${hr}
${voffset 140}${font caviar dreams:size=12}${alignr}${time %H:%M}${font}${color}
${font caviar dreams:size=10}${color FF6600}${execi 3600 curl -s http://weather.noaa.gov/pub/data/observations/metar/decoded/(your metar station code here).TXT | sed -n 3,9p}${font}

AntiX 13 ${color FF6600}${hr}${color}

Kernel: ${alignr}${kernel}
Uptime: ${alignr}${uptime}

CPU1: ${cpu cpu1}% ${alignr}${color FF6600}${cpugraph cpu1 8,60 FF6600 FFFFFF}${color}
CPU2: ${cpu cpu2}% ${alignr}${color FF6600}${cpugraph cpu2 8,60 FF6600 FFFFFF}${color}
CPU3: ${cpu cpu3}% ${alignr}${color FF6600}${cpugraph cpu3 8,60 FF6600 FFFFFF}${color}
CPU4: ${cpu cpu4}% ${alignr}${color FF6600}${cpugraph cpu4 8,60 FF6600 FFFFFF}${color}
CPU5: ${cpu cpu5}% ${alignr}${color FF6600}${cpugraph cpu5 8,60 FF6600 FFFFFF}${color}
CPU6: ${cpu cpu6}% ${alignr}${color FF6600}${cpugraph cpu6 8,60 FF6600 FFFFFF}${color}
CPU7: ${cpu cpu7}% ${alignr}${color FF6600}${cpugraph cpu7 8,60 FF6600 FFFFFF}${color}
CPU8: ${cpu cpu8}% ${alignr}${color FF6600}${cpugraph cpu8 8,60 FF6600 FFFFFF}${color}
RAM : $memperc% ${alignr}${color FF6600}${memgraph 8,60 FF6600 FFFFFF}${color}

Temps & Fan Speeds ${color FF6600}${hr}${color}

CPU    ${hwmon 2 temp 1} °C
MOBO    ${hwmon 2 temp 2} °C
GPU    ${hwmon 2 temp 3} °C
Fan1    ${hwmon 2 fan 1} RPM
Fan2    ${hwmon 2 fan 2} RPM

Top Processes ${color FF6600}${hr}${color}

${top_mem name 1}$alignr${color FF6600}${top_mem cpu 1}${color}${top_mem mem 1}
${top_mem name 2}$alignr${color FF6600}${top_mem cpu 2}${color}${top_mem mem 2}
${top_mem name 3}$alignr${color FF6600}${top_mem cpu 3}${color}${top_mem mem 3}

${color ffffff}Free Space:
${color b555b2}/root:${color b555b2} ${fs_free /} ${color ffffff}= ${fs_free_perc /}%
${color b555b2}$fs_bar_free /home
#${color 4ab1ab}/home:${color 4ab1ab} ${fs_free /home} ${color ffffff}= ${fs_free_perc /home}%
#${color 4ab1ab}${fs_bar_free /home}

${font caviar dreams:bold:size=9}Up:${upspeed eth0} - Down:${downspeed eth0}

${font caviar dreams:size=8}${color ffffff}Running processes: ${color ffffff}$running_processes$font
${font caviar dreams:size=8}${color ffffff}Name                ${color red}CPU%    ${color 7091c1}MEM%$font
  ${font caviar dreams:size=8}${color ffffff} ${top name 1}  ${color red}${top cpu 1}  ${color 7091c1}${top mem 1}$font

${font caviar dreams}${color 0B8904}Conky ${color 0B8904}$conky_version$font
${color 0B8904}${font caviar dreams}${alignr}${nodename}
${color 0B8904}${font caviar dreams}${alignr}${pre_exec cat etc/issue.net}  $machine
Posts: 75
equimanthorn
Joined: 28 Sep 2008
#79
Image

This is the original configuration I find on the net (All credit must go to the original creator, I don't remember who is ):

Code: Select all

alignment tl
background no
border_inner_margin 0
border_width 0
default_color FFFFFF
default_outline_color black
default_shade_color black
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
gap_x 10 # left-right
gap_y 3 # up-down
minimum_size 250 0
no_buffers yes
override_utf8_locale yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window yes
pad_percents 2
short_units yes
stippled_borders 0
top_name_width 5
update_interval 1
uppercase no
use_spacer right
use_xft yes
xftalpha 1.0 #0.2
xftfont Sans Mono:size=8

TEXT
${goto 12}+----${nodename}
${goto 15}|${goto 40}|
${goto 15}|${goto 38}+-- OS${goto 125}${sysname}
${goto 15}|${goto 38}+-- Kernel ${goto 125}${kernel}
${goto 15}|${goto 38}+-- Machine${goto 125}${machine}
${goto 15}|
${goto 12}+----Memory
${goto 15}|${goto 38}+-- Total${goto 125}${memmax}
${goto 15}|${goto 38}+-- In Use${goto 125}${mem} (${memperc}%)
${goto 15}|${goto 38}+-- Free${goto 125}${memfree}
${goto 15}|${goto 38}+-- Up to${goto 125}${memeasyfree} freed easily
${goto 15}|${goto 38}+-- Swap
${goto 15}|${goto 60}+-- Total${goto 125}${swapmax}
${goto 15}|${goto 60}+-- Used${goto 125}${swap} - ${swapperc}%
${goto 15}|${goto 60}+-- Free${goto 125}${swapfree}
${goto 15}|
${goto 12}+----Status
${goto 15}|${goto 40}|
${goto 15}|${goto 38}+-- CPU${goto 125}${cpu cpu0}% - ${freq_g}GHz
${goto 15}|${goto 38}+-- Ram${goto 125}${memperc}%
${goto 15}|${goto 38}+-- LoadAvg${goto 125}${loadavg}
${goto 15}|${goto 38}+-- Disk${goto 125}${fs_used_perc /}% Used
${goto 15}|${goto 38}+-- Diskio ${goto 125}${diskio}
${goto 15}|${goto 60}+-- Read${goto 125}${diskio_read}
${goto 15}|${goto 60}+-- Write${goto 125}${diskio_write}
${goto 15}|
${goto 12}+----Storage
${goto 15}|${goto 40}|
${goto 15}|${goto 38}+-- /ROOT${goto 125}${fs_free /} / ${fs_size /}
${goto 15}|${goto 38}+-- /HOME${goto 125}${fs_free /home} / ${fs_size /home}
${goto 15}|
${goto 12}+----Processes
${goto 15}|${goto 40}|
${goto 15}|${goto 38}+-- Total${goto 125}${processes}
${goto 15}|${goto 38}+-- Running${goto 125}${running_processes}
${goto 15}|${goto 40}|
${goto 15}|${goto 38}+-- CPU
${goto 15}|${goto 40}|${goto 60}+-- ${top name 1}${goto 125}${top cpu 1}${top mem 1}
${goto 15}|${goto 40}|${goto 60}+-- ${top name 2}${goto 125}${top cpu 2}${top mem 2}
${goto 15}|${goto 40}|${goto 60}+-- ${top name 3}${goto 125}${top cpu 3}${top mem 3}
${goto 15}|${goto 40}|
${goto 15}|${goto 38}+-- MEM
${goto 15}|${goto 60}+-- ${top_mem name 1}${goto 125}${top_mem cpu 1}${top_mem mem 1}
${goto 15}|${goto 60}+-- ${top_mem name 2}${goto 125}${top_mem cpu 2}${top_mem mem 2}
${goto 15}|${goto 60}+-- ${top_mem name 3}${goto 125}${top_mem cpu 3}${top_mem mem 3}
${goto 15}|
${goto 12}+----Net
${goto 15}|${goto 40}|
${goto 15}|${goto 38}+-- eth0${goto 125}${addr eth0}
${goto 15}|${goto 38}+-- Up
${goto 15}|${goto 40}|${goto 60}+-- Speed${goto 125}${upspeedf eth0}KiB
${goto 15}|${goto 40}|${goto 60}+-- Total${goto 125}${totalup eth0}KiB
${goto 15}|${goto 40}|
${goto 15}|${goto 38}+-- Down
${goto 15}|${goto 40}|${goto 60}+-- Speed${goto 125}${downspeedf eth0}KiB
${goto 15}|${goto 40}|${goto 60}+-- Total${goto 125}${totaldown eth0}KiB
The upper white line is the battery indicator, if you need you can add:

Code: Select all

"${goto 12}${battery_bar 10,0}
For my laptop I only traslated this file in italian __{{emoticon}}__

Happy Con(ky)figuration ! Enjoy ! __{{emoticon}}__
Posts: 630
Eino
Joined: 12 Oct 2012
#80
One thing I added to my conky was"if_up wlan0" This way when the wifi is not being used it is not shown on the conky.

Code: Select all

${if_up wlan0}
${color FFC200}Wifi Quality 
${color}IP:${color} ${addr wlan0}
${color}${wireless_link_qual_perc wlan0}%${alignr}${color}${wireless_link_bar 7,90 wlan0}
${color}Upload:$color  ${upspeed wlan0}
${color}Download:$color  ${downspeed wlan0}
${endif} 
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#81
For you eye candy users.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.noobslab.com/2012/06/install-conky-lua-in-ubuntulinux.html"
linktext was:"http://www.noobslab.com/2012/06/install ... linux.html"
====================================
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#82
Image

Code: Select all

# set to yes if you want Conky to be forked in the background
background yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
#font 8x12
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont gentium:size=15

own_window_transparent yes
own_window_colour black
own_window_type desktop
#own_window_type normal
#own_window_type override
#own_window_argb_visual yes
# Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops)
own_window yes

# Text alpha when using Xft
xftalpha 0.8

#on_bottom no

# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 1

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

# Minimum size of text area
minimum_size 10 10
maximum_width 800
max_user_text 100000

# 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 10

# border width
border_width 2

# Default colors and also border colors
#default_color firebrick
#default_color darkgoldenrod
#default_color slategrey
#default_color white
#default_color red
#default_color black
#default_color grey
#default_color green
default_color snow
#fault_shade_color white
default_outline_color white

# 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 50
gap_y 30

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

# Subtract file system buffers from used memory?
no_buffers yes

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

# boinc (seti) dir
# seti_dir /opt/seti

# Possible variables to be used:
#
#      Variable         Arguments                  Description                
#  acpiacadapter                     ACPI ac adapter state.                   
#  acpifan                           ACPI fan state                           
#  acpitemp                          ACPI temperature.                        
#  adt746xcpu                        CPU temperature from therm_adt746x       
#  adt746xfan                        Fan speed from therm_adt746x             
#  battery           (num)           Remaining capasity in ACPI or APM        
#                                    battery. ACPI battery number can be      
#                                    given as argument (default is BAT0).     
#  buffers                           Amount of memory buffered                
#  cached                            Amount of memory cached                  
#  color             (color)         Change drawing color to color            
#  cpu                               CPU usage in percents                    
#  cpubar            (height)        Bar that shows CPU usage, height is      
#                                    bar's height in pixels                   
#  downspeed         net             Download speed in kilobytes              
#  downspeedf        net             Download speed in kilobytes with one     
#                                    decimal                                  
#  exec              shell command   Executes a shell command and displays    
#                                    the output in torsmo. warning: this      
#                                    takes a lot more resources than other    
#                                    variables. I'd recommend coding wanted   
#                                    behaviour in C and posting a patch :-).  
#  execi             interval, shell Same as exec but with specific interval. 
#                    command         Interval can't be less than              
#                                    update_interval in configuration.        
#  fs_bar            (height), (fs)  Bar that shows how much space is used on 
#                                    a file system. height is the height in   
#                                    pixels. fs is any file on that file      
#                                    system.                                  
#  fs_free           (fs)            Free space on a file system available    
#                                    for users.                               
#  fs_free_perc      (fs)            Free percentage of space on a file       
#                                    system available for users.              
#  fs_size           (fs)            File system size                         
#  fs_used           (fs)            File system used space                   
#  hr                (height)        Horizontal line, height is the height in 
#                                    pixels                                   
#  i2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev   
#                                    may be omitted if you have only one I2C  
#                                    device. type is either in (or vol)       
#                                    meaning voltage, fan meaning fan or temp 
#                                    meaning temperature. n is number of the  
#                                    sensor. See /sys/bus/i2c/devices/ on     
#                                    your local computer.                     
#  kernel                            Kernel version                           
#  loadavg           (1), (2), (3)   System load average, 1 is for past 1     
#                                    minute, 2 for past 5 minutes and 3 for   
#                                    past 15 minutes.                         
#  machine                           Machine, i686 for example                
#  mails                             Mail count in mail spool. You can use    
#                                    program like fetchmail to get mails from 
#                                    some server using your favourite         
#                                    protocol. See also new_mails.            
#  mem                               Amount of memory in use                  
#  membar            (height)        Bar that shows amount of memory in use   
#  memmax                            Total amount of memory                   
#  memperc                           Percentage of memory in use              
#  new_mails                         Unread mail count in mail spool.         
#  nodename                          Hostname                                 
#  outlinecolor      (color)         Change outline color                     
#  pre_exec          shell command   Executes a shell command one time before 
#                                    torsmo displays anything and puts output 
#                                    as text.                                 
#  processes                         Total processes (sleeping and running)   
#  running_processes                 Running processes (not sleeping),        
#                                    requires Linux 2.6                       
#  shadecolor        (color)         Change shading color                     
#  stippled_hr       (space),        Stippled (dashed) horizontal line        
#                    (height)        
#  swapbar           (height)        Bar that shows amount of swap in use     
#  swap                              Amount of swap in use                    
#  swapmax                           Total amount of swap                     
#  swapperc                          Percentage of swap in use                
#  sysname                           System name, Linux for example           
#  time              (format)        Local time, see man strftime to get more 
#                                    information about format                 
#  totaldown         net             Total download, overflows at 4 GB on     
#                                    Linux with 32-bit arch and there doesn't 
#                                    seem to be a way to know how many times  
#                                    it has already done that before torsmo   
#                                    has started.                             
#  totalup           net             Total upload, this one too, may overflow 
#  updates                           Number of updates (for debugging)        
#  upspeed           net             Upload speed in kilobytes                
#  upspeedf          net             Upload speed in kilobytes with one       
#                                    decimal                                  
#  uptime                            Uptime                                   
#  uptime_short                      Uptime in a shorter format               
#
#  seti_prog                         Seti@home current progress
#  seti_progbar      (height)        Seti@home current progress bar
#  seti_credit                       Seti@hoome total user credit
## antiX additives examples. Add below Text##
##${color cccccc}battery: ${color cccccc}$acpiacadapter, ${battery_percent BAT1}% 
##${color}battery:${color} ${battery}
##Witeless example##
#${color cccccc}Wireless:
#${color cccccc}essid: ${wireless_essid wlan0}
#${color cccccc}IP:${color cccccc} ${addr wlan0}
#${color cccccc}speed: ${color cccccc} ${wireless_bitrate wlan0}
#${color cccccc}link strength: ${color cccccc} ${wireless_link_bar 7,50 wlan0}

# stuff after 'TEXT' will be formatted on screen

TEXT
${image /home/harry/Icons/antix-logo.png 105x85}
#${image /home/harry/Icons/antixx3.jpg 105x85}
${color}AntiX-M11-base-686 Fluxbox 
${color}$sysname $kernel
${color}Kernel:${exec /home/harry/Documents/kernelname.sh}
${color}Uptime: $uptime
${color}${time %a %d %b %k:%M}
${color}Monitors:
${color}Cpu: ${color}${cpu}%
${color}Fan: ${color}${hwmon fan 1}
${color}Temp: ${color} ${hwmon temp 1}C
${color}Ram : ${color}$mem${color}/${color}$memmax ${color}- ${color}$memperc%
${color}Swap: ${color}$swap${color}/${color}$swapmax ${color}- ${color}$swapperc%
${exec df -h | grep"/dev/sd" | awk '{ printf"%s of %s \t : %s\n", $5, $2, $6 }' }
${color}Processes: ${color}$processes  ${color}running: ${color}$running_processes
${if_existing /proc/net/route eth0}
Down: ${downspeed eth0}Up: ${upspeed eth0}
Dtot: ${totaldown eth0} Utot: ${totalup eth0}
#${color}Link Strength: ${color} ${wireless_link_bar 7,50 wlan0}
${color}Root:${color} ${fs_free /} ${color}= ${fs_free_perc /}%
${execi 300 /home/harry/.weather.sh 79772}
${exec echo $(cmus-remote -Q | grep -m 1 artist | cut -d"" -f 3-)}
${exec echo $(cmus-remote -Q | grep title | cut -d"" -f 3-)}
${execpi 10 python /home/harry/.mocpdata.py}
my mocpdata.py file. Yoiu will need python installed.

Code: Select all

harry@biker:~$ apt-cache policy python
python:
  Installed: 2.7.5-5
  Candidate: 2.7.5-5
  Version table:
 *** 2.7.5-5 0
        500 http://ftp.us.debian.org/debian/ testing/main i386 Packages
        100 /var/lib/dpkg/status
My file

Code: Select all

import commands

info = commands.getoutput("mocp --info").splitlines()

if info == ["State: STOP"]:
    print"Music: Not playing"
    exit()

print info[4].replace('SongTitle','Title')
print info[3]
print info[5]
print"Time:", info[9][13:],"/", info[6][11:]
My weather.sh again for refresher (curl needs to be installed for it to work as well as perl)

Code: Select all

#!/bin/sh
#AccuWeather (r) RSS weather tool for conky
#Requires curl and perl.
#USAGE: weather.sh <locationcode>
#
#(c) Michael Seiler 2007

METRIC=0 #Should be 0 or 1; 0 for F, 1 for C

if [ -z $1 ]; then
    echo
    echo"USAGE: weather.sh <79772>"
    echo
    exit 0;
fi

curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print"$1"; }'
and kernelname.sh for refresher

Code: Select all

#! /bin/bash
#
[ -h /usr/src/linux ] && namesource=`readlink /usr/src/linux`
name=`grep NAME /usr/src/$namesource/Makefile | cut -c 8-`
echo $name
exit
Posts: 325
male
Joined: 04 Nov 2011
#83
Still unbeatable on this unit:

x40
ssd
antiX-M11
fluxbox
conky

Code: Select all

~$ inxi -F
System:    Host antiX1 Kernel 3.9-8.dmz.1-liquorix-686 i686 (32 bit) Distro antiX-M11-686 Jayaben Desai 01 May 2011
CPU:       Single core Intel Pentium M (-UP-) cache 2048 KB flags (sse sse2) bmips 2791.14 clocked at 1400.00 MHz 
Graphics:  Card: Intel 82852/855GM Integrated Graphics Device bus-ID: 00:02.0 X.Org 1.14.3 Res: 1024x768@50.0hz 
           GLX Renderer Mesa DRI Intel 852GM/855GM x86/MMX/SSE2 GLX Version 1.3 Mesa 9.1.7 Direct Rendering Yes
Audio:     Card Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller driver snd_intel8x0 ports 1c00 18c0 bus-ID: 00:1f.5
           Sound: Advanced Linux Sound Architecture Version k3.9-8.dmz.1-liquorix-686
Network:   Card-1 3Com 3cCFE575CT CardBus [Cyclone] driver 3c59x port 3000 bus-ID: 03:00.0
           Card-2 Intel PRO/Wireless 2200BG [Calexico2] Network Connection driver ipw2200 v: 1.2.2kmprq bus-ID: 02:02.0
Disks:     HDD Total Size: 60.1GB (11.1% used) 1: /dev/sda MXSSD1MNANO 60.1GB 
Partition: ID:/ size: 15G used: 5.9G (43%) fs: ext4 ID:swap-1 size: 3.22GB used: 0.00GB (0%) fs: swap 
Info:      Processes 103 Uptime 51 min Memory 205.5/1506.6MB Runlevel 5 Client Shell inxi 1.4.95 
Idea from here:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://blog.brixandersen.dk/2007/09/23/system-monitoring-wallpaper/"
linktext was:"http://blog.brixandersen.dk/2007/09/23/ ... wallpaper/"
====================================

Code: Select all

# -*- conf -*-
#
# ~/.conkyrc - Conky configuration file
#
# By Henrik Brix Andersen <henrik@brixandersen.dk>
#

# do not fork to background
background no

# font settings
use_xft yes
font monospace-9
uppercase no

# update every 3 secs
update_interval 3

# stay running forever
total_run_times 0

# draw to root window
own_window no

# avoid flickering
double_buffer yes

# size
minimum_size 1024 768
maximum_width 1024

# position
alignment top_left
gap_x 0
gap_y 0

# colors
default_color white
default_shade_color black
default_outline_color black
color0 ffffff
color1 144556
color2 33b0dc

# borders
draw_borders no
stippled_borders 8
border_margin 4
border_width 1

# shades
draw_shades yes

# outline
draw_outline no

# spacer
use_spacer no

# buffers
no_buffers yes

# sampling
cpu_avg_samples 2
net_avg_samples 2

# configuration
TEXT
${image /home/male/Downloads/AntiXfile.png -p 25,35 -s 138x111}
${voffset 50}${offset 150}${color2}System
${offset 150}$color0 $nodename $kernel
${offset 150}$color0 Uptime:$color2 $uptime $color0 Load:$color2 $loadavg
${offset 155}$color0${cpubar cpu9 2,300}

#${voffset -50}${offset 900}${color2}FAN
#${offset 900}$color0 ${ibm_fan} rpm 

${voffset 40}${offset 15}${color2}CPU
${offset 15}$color0 Frequency: $color2$freq MHz   $color0 Temp:$color2 $acpitemp°C
${offset 15}$color0 Load: $color2$cpu% $color0${cpubar cpu0 6,170}
${offset 15}$color0 ${cpugraph cpu0 24,232 000000 33b0dc}

${voffset -50}${offset 900}${color2}FAN
${offset 900}$color2 ${ibm_fan} ${color0}rpm

#${voffset 25}${offset 40}${color2}Network (eth2)
#${offset 40}$color0 IPv4: $color2${addr eth2} ${color #144556}
#${offset 40}$color0 Down: $color2${downspeed eth2} k/s $color0 Up:$color2 ${upspeed eth2} k/s
#${offset 40}$color0 ${downspeedgraph eth2 12,300 000000 33b0dc}
#${offset 40}${voffset -3}$color0 ${upspeedgraph eth2 12,300 000000 33b0dc}

${voffset 0}${offset 775}${color2}   Power
${offset 775}$color0    Battery: ${alignr 15}${if_match ${battery_percent BAT0} >= 90}${color white}${battery_bar 10,130 BAT0}${else}${if_match ${battery_percent BAT0} < 90}${color green}${battery_bar 10,130 BAT0}${else}${if_match ${battery_percent BAT0} < 50}${color yellow}${battery_bar 10,130 BAT0}${else}${if_match ${battery_percent BAT0} <= 30}${color red}${battery_bar 10,130 BAT0}${endif}${endif}${endif}${endif}
${voffset -14}${alignr 47}${font :size=7}${color black}${battery_percent BAT0}%${font} #$acpiacadapter ${battery_percent BAT0}%
${offset 775}$color0 #$battery $battery_time

${voffset 0}${offset 700}${color2}Disk
${offset 700}$color0 I/O:$color2 $diskio    ${alignr 15}${color0}root:${color2} ${fs_free /}${color2} = ${fs_free_perc /}%
${offset 700}$color0 ${diskiograph 24,300 000000 33b0dc}

${voffset 155}${offset 40}${color2}Network (eth2)
${offset 40}$color0 IPv4: $color2${addr eth2} ${color #144556}
${offset 40}$color0 Down: $color2${downspeed eth2} k/s $color0 Up:$color2 ${upspeed eth2} k/s
${offset 40}$color0 ${downspeedgraph eth2 12,300 000000 33b0dc}
${offset 40}${voffset -3}$color0 ${upspeedgraph eth2 12,300 000000 33b0dc}

${voffset 0}${offset 75}${color2}Network (eth1)
${offset 75}$color0 IPv4: $color2${addr eth1} ${color #144556}
${offset 75}$color0 Down: $color2${downspeedf eth1} K/s $color0 Up:$color2 ${upspeedf eth1} K/s
${offset 75}$color0 ${downspeedgraph eth1 12,300 000000 33b0dc}
${offset 75}${voffset -3}$color0 ${upspeedgraph eth1 12,300 000000 33b0dc}

${voffset -30}${offset 670}${color2}Memory
${offset 670}$color0 RAM: $color2$mem ($memperc%) $color0${membar 6,200}
${offset 670}$color0 Swap: $color2$swap ($swapperc%) $color0${swapbar 6,200}
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#84
For my quick reference. My pastebin account


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://pastebin.com/u/rokytnji"
linktext was:"http://pastebin.com/u/rokytnji"
====================================
Posts: 347
Silent Observer
Joined: 08 Aug 2013
#85
I have a fairly small screen on my ca. 1997 Pentium II laptop -- 1024x768 is all she'll do on the built-in screen. As a result, I need to keep things a little simple, but I also needed a monitor to warn if the battery is getting low and shut the system down before an unclean shutdown causes potential data corruption. A nice CPU monitor is pretty useful, too, since some software bugs seem to manifest as CPU usage going to 100% -- and, with only a little over 12 GiB available for root and /home (16 GB total storage, but most of 4 GB taken up by Windows 98), I need to also keep an eye on storage space. Here's what I wound up with...

Code: Select all

us# set to yes if you want Conky to be forked in the background
background yes

short_units yes

cpu_avg_samples 2
net_avg_samples 2

out_to_console no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
 font 8x12
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont gentium:size=10

# Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops)
own_window yes
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar

# Text alpha when using Xft
xftalpha 0.8

#on_bottom no

# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 1

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

# Minimum size of text area
minimum_size 5 5
maximum_width 350

# 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 10

# border width
border_width 2

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white

color3 cyan

# 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 20
gap_y 10

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

# Subtract file system buffers from used memory?
no_buffers yes

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

# boinc (seti) dir
# seti_dir /opt/seti

# Possible variables to be used:
#
#      Variable         Arguments                  Description                
#  acpiacadapter                     ACPI ac adapter state.                   
#  acpifan                           ACPI fan state                           
#  acpitemp                          ACPI temperature.                        
#  adt746xcpu                        CPU temperature from therm_adt746x       
#  adt746xfan                        Fan speed from therm_adt746x             
#  battery           (num)           Remaining capasity in ACPI or APM        
#                                    battery. ACPI battery number can be      
#                                    given as argument (default is BAT0).     
#  buffers                           Amount of memory buffered                
#  cached                            Amount of memory cached                  
#  color             (color)         Change drawing color to color            
#  cpu                               CPU usage in percents                    
#  cpubar            (height)        Bar that shows CPU usage, height is      
#                                    bar's height in pixels                   
#  downspeed         net             Download speed in kilobytes              
#  downspeedf        net             Download speed in kilobytes with one     
#                                    decimal                                  
#  exec              shell command   Executes a shell command and displays    
#                                    the output in torsmo. warning: this      
#                                    takes a lot more resources than other    
#                                    variables. I'd recommend coding wanted   
#                                    behaviour in C and posting a patch :-).  
#  execi             interval, shell Same as exec but with specific interval. 
#                    command         Interval can't be less than              
#                                    update_interval in configuration.        
#  fs_bar            (height), (fs)  Bar that shows how much space is used on 
#                                    a file system. height is the height in   
#                                    pixels. fs is any file on that file      
#                                    system.                                  
#  fs_free           (fs)            Free space on a file system available    
#                                    for users.                               
#  fs_free_perc      (fs)            Free percentage of space on a file       
#                                    system available for users.              
#  fs_size           (fs)            File system size                         
#  fs_used           (fs)            File system used space                   
#  hr                (height)        Horizontal line, height is the height in 
#                                    pixels                                   
#  i2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev   
#                                    may be omitted if you have only one I2C  
#                                    device. type is either in (or vol)       
#                                    meaning voltage, fan meaning fan or temp 
#                                    meaning temperature. n is number of the  
#                                    sensor. See /sys/bus/i2c/devices/ on     
#                                    your local computer.                     
#  kernel                            Kernel version                           
#  loadavg           (1), (2), (3)   System load average, 1 is for past 1     
#                                    minute, 2 for past 5 minutes and 3 for   
#                                    past 15 minutes.                         
#  machine                           Machine, i686 for example                
#  mails                             Mail count in mail spool. You can use    
#                                    program like fetchmail to get mails from 
#                                    some server using your favourite         
#                                    protocol. See also new_mails.            
#  mem                               Amount of memory in use                  
#  membar            (height)        Bar that shows amount of memory in use   
#  memmax                            Total amount of memory                   
#  memperc                           Percentage of memory in use              
#  new_mails                         Unread mail count in mail spool.         
#  nodename                          Hostname                                 
#  outlinecolor      (color)         Change outline color                     
#  pre_exec          shell command   Executes a shell command one time before 
#                                    torsmo displays anything and puts output 
#                                    as text.                                 
#  processes                         Total processes (sleeping and running)   
#  running_processes                 Running processes (not sleeping),        
#                                    requires Linux 2.6                       
#  shadecolor        (color)         Change shading color                     
#  stippled_hr       (space),        Stippled (dashed) horizontal line        
#                    (height)        
#  swapbar           (height)        Bar that shows amount of swap in use     
#  swap                              Amount of swap in use                    
#  swapmax                           Total amount of swap                     
#  swapperc                          Percentage of swap in use                
#  sysname                           System name, Linux for example           
#  time              (format)        Local time, see man strftime to get more 
#                                    information about format                 
#  totaldown         net             Total download, overflows at 4 GB on     
#                                    Linux with 32-bit arch and there doesn't 
#                                    seem to be a way to know how many times  
#                                    it has already done that before torsmo   
#                                    has started.                             
#  totalup           net             Total upload, this one too, may overflow 
#  updates                           Number of updates (for debugging)        
#  upspeed           net             Upload speed in kilobytes                
#  upspeedf          net             Upload speed in kilobytes with one       
#                                    decimal                                  
#  uptime                            Uptime                                   
#  uptime_short                      Uptime in a shorter format               
#
#  seti_prog                         Seti@home current progress
#  seti_progbar      (height)        Seti@home current progress bar
#  seti_credit                       Seti@hoome total user credit
## antiX additives examples. Add below Text##
##Battery examples##
##${color}battery: ${color}$acpiacadapter, ${battery_percent BAT1}% 
##${color}battery:${color} ${battery}
####Wireless example##
#${color}Wireless:
#${color}essid: ${wireless_essid wlan0}
#${color}IP:${color} ${addr wlan0}
#${color}speed: ${color} ${wireless_bitrate wlan0}
#${color}link strength: ${color} ${wireless_link_bar 7,50 wlan0}

# stuff after 'TEXT' will be formatted on screen

TEXT
${color}$nodename
${color}Desktop: ${color}${exec cat ~/.antix-session/desktop-code$DISPLAY}
${color}$sysname $kernel
${color}Uptime: $uptime
${color}${time %c}
${color}CPU: ${color}${cpu}${color}%
${color}${cpugraph 12,180}
${color}RAM :$mem${color}/$memmax
${color}${membar 4}
${color}Swap: $swap${color}/$swapmax
${color}${swapbar 4}
${color}Processes: ${color}$processes  ${color}Running: ${color}$running_processes
${color}Power: ${color}$acpiacadapter ${color}Battery: ${battery_percent CMB1}%${if_existing /sys/class/power_supply/AC/online 0}${if_match ${battery_percent CMB1} <= 50}${if_match ${battery_percent CMB1} <= 25}${if_match ${battery_percent CMB1} <= 10}${if_match ${battery_percent CMB1} <= 3}${if_match ${battery_percent CMB1} <= 1}${exec /usr/local/bin/hardshutdown.sh}$else${exec /usr/local/bin/shutdown.sh}$endif$else${color red}${texeci 60 /usr/local/bin/verylowbat.sh}$endif$else${color orange}${texeci 120 /usr/local/bin/lowbat.sh}$endif$else${color yellow}$endif$else${color green}$endif$else${color green}$endif
${battery_bar 4,180 CMB1}
${color}Root Space:${color} ${fs_free /}/${fs_size /} ${color}= ${fs_free_perc /}%
${color}Home Space:${color} ${fs_free /home}/${fs_size /home} ${color}= ${fs_free_perc /home}%
${color3}${execi 10 persist-enabled}
The battery safeguard depends on four scripts, three of which use yad for an interactive notification, while the fourth produces a hard shutdown, without further warning at 1% battery life remaining (which is just barely more than it takes to actually run through an orderly shutdown).

First, appearing at 25% battery, is lowbat.sh:

Code: Select all

#!/bin/bash
yad --image="info" --text="The battery is low. Connect to power or shut down soon." --button="gtk-ok:0"
ans="$?"
case $ans in
0)
    # exit
    exit;
;;
esac
Second, invoked at 10% energy remaining, is verylowbat.sh:

Code: Select all

#!/bin/bash
yad --image="info" --text="The battery is VERY low. Connect to power or shut down ASAP." --button="gtk-ok:0"
ans="$?"
case $ans in
0)
    # exit
    exit;
;;
esac
At 3% battery (about two minutes of full operation) we'll meet shutdown.sh:

Code: Select all

#!/bin/bash
yad --image="info" --text="The battery is critically low! Connect to power and press cancel or save your work (quickly!) and press OK to shutdown." --button="gtk-ok:0" --button="gtk-cancel:1"
ans="$?"
case $ans in
0)
    # shutdown
    sudo -S < ~/.passwordfile &> ~/dumpfile shutdown -hP 1"Shutting down due to critical low battery!"
;;
1)
    #exit
    exit;
;;
esac
Finally, if the user doesn't initiate a shutdown or connect external power by the time battery capcity reaches 1%, we'll invoke hardshutdown.sh:

Code: Select all

sudo -S /home/dqualls/.passwordfile &> /home/dqualls/.dumpfile shutdown -hP now"Shutting down: Battery empty!"
Edit: there's still a minor bug in the battery monitor code; the low battery warning keeps coming up (for a long time) after reconnecting power. Working on it...
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#86
Edit; All credit goes to Bitjam who gave me this conkyrc in place of my earlier clumsy attempt at making mine a custom one.

Code: Select all

# set to yes if you want Conky to be forked in the background
background yes

short_units yes

cpu_avg_samples 1
net_avg_samples 1

out_to_console no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
font 8x12
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
#xftfont gentium:size=12
#ftfont DejaVu Sans:size=10
xftfont DejaVu Sans:bold:size=9
#xftfont DejaVu Sans:size=9

# Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops)
own_window yes
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar

# Text alpha when using Xft
xftalpha 1.0

#on_bottom no

# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 1

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

# Minimum size of text area
#minimum_size 5 5
minimum_size 240
#maximum_width 180
maximum_width 250
conky_window.height 768
# 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 10

# border width
border_width 2

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white

color2 ffffff
color3 ffffff
color4 yellow
color8 77ccff
color9 5599cc

# 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 25
gap_y 20

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

# Subtract file system buffers from used memory?
no_buffers yes

# if_up_strictness link:  up | link | address
if_up_strictness address

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

# boinc (seti) dir
# seti_dir /opt/seti

# Possible variables to be used:
#
#      Variable         Arguments                  Description               
#  acpiacadapter                     ACPI ac adapter state.                   
#  acpifan                           ACPI fan state                           
#  acpitemp                          ACPI temperature.                       
#  adt746xcpu                        CPU temperature from therm_adt746x       
#  adt746xfan                        Fan speed from therm_adt746x             
#  battery           (num)           Remaining capasity in ACPI or APM       
#                                    battery. ACPI battery number can be     
#                                    given as argument (default is BAT0).     
#  buffers                           Amount of memory buffered               
#  cached                            Amount of memory cached                 
#  color             (color)         Change drawing color to color           
#  cpu                               CPU usage in percents                   
#  cpubar            (height)        Bar that shows CPU usage, height is     
#                                    bar's height in pixels                   
#  downspeed         net             Download speed in kilobytes             
#  downspeedf        net             Download speed in kilobytes with one     
#                                    decimal                                 
#  exec              shell command   Executes a shell command and displays   
#                                    the output in torsmo. warning: this     
#                                    takes a lot more resources than other   
#                                    variables. I'd recommend coding wanted   
#                                    behaviour in C and posting a patch :-). 
#  execi             interval, shell Same as exec but with specific interval.
#                    command         Interval can't be less than             
#                                    update_interval in configuration.       
#  fs_bar            (height), (fs)  Bar that shows how much space is used on
#                                    a file system. height is the height in   
#                                    pixels. fs is any file on that file     
#                                    system.                                 
#  fs_free           (fs)            Free space on a file system available   
#                                    for users.                               
#  fs_free_perc      (fs)            Free percentage of space on a file       
#                                    system available for users.             
#  fs_size           (fs)            File system size                         
#  fs_used           (fs)            File system used space                   
#  hr                (height)        Horizontal line, height is the height in
#                                    pixels                                   
#  i2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev   
#                                    may be omitted if you have only one I2C 
#                                    device. type is either in (or vol)       
#                                    meaning voltage, fan meaning fan or temp
#                                    meaning temperature. n is number of the 
#                                    sensor. See /sys/bus/i2c/devices/ on     
#                                    your local computer.                     
#  kernel                            Kernel version                           
#  loadavg           (1), (2), (3)   System load average, 1 is for past 1     
#                                    minute, 2 for past 5 minutes and 3 for   
#                                    past 15 minutes.                         
#  machine                           Machine, i686 for example               
#  mails                             Mail count in mail spool. You can use   
#                                    program like fetchmail to get mails from
#                                    some server using your favourite         
#                                    protocol. See also new_mails.           
#  mem                               Amount of memory in use                 
#  membar            (height)        Bar that shows amount of memory in use   
#  memmax                            Total amount of memory                   
#  memperc                           Percentage of memory in use             
#  new_mails                         Unread mail count in mail spool.         
#  nodename                          Hostname                                 
#  outlinecolor      (color)         Change outline color                     
#  pre_exec          shell command   Executes a shell command one time before
#                                    torsmo displays anything and puts output
#                                    as text.                                 
#  processes                         Total processes (sleeping and running)   
#  running_processes                 Running processes (not sleeping),       
#                                    requires Linux 2.6                       
#  shadecolor        (color)         Change shading color                     
#  stippled_hr       (space),        Stippled (dashed) horizontal line       
#                    (height)       
#  swapbar           (height)        Bar that shows amount of swap in use     
#  swap                              Amount of swap in use                   
#  swapmax                           Total amount of swap                     
#  swapperc                          Percentage of swap in use               
#  sysname                           System name, Linux for example           
#  time              (format)        Local time, see man strftime to get more
#                                    information about format                 
#  totaldown         net             Total download, overflows at 4 GB on     
#                                    Linux with 32-bit arch and there doesn't
#                                    seem to be a way to know how many times 
#                                    it has already done that before torsmo   
#                                    has started.                             
#  totalup           net             Total upload, this one too, may overflow
#  updates                           Number of updates (for debugging)       
#  upspeed           net             Upload speed in kilobytes               
#  upspeedf          net             Upload speed in kilobytes with one       
#                                    decimal                                 
#  uptime                            Uptime                                   
#  uptime_short                      Uptime in a shorter format               
#
#  seti_prog                         Seti@home current progress
#  seti_progbar      (height)        Seti@home current progress bar
#  seti_credit                       Seti@hoome total user credit
## antiX additives examples. Add below Text##
##Battery examples##
##${color}battery: ${color}$acpiacadapter, ${battery_percent BAT1}%
##${color}battery:${color} ${battery}
#${color}ACPI Battery: ${color}$battery
#${battery_bar 11,0}
##Wireless example##
#${color}Wireless:
#${color}essid: ${wireless_essid wlan0}
#${color}IP:${color} ${addr wlan0}
#${color}speed: ${color} ${wireless_bitrate wlan0}
#${color}link strength: ${color} ${wireless_link_bar 7,50 wlan0}

# stuff after 'TEXT' will be formatted on screen

TEXT
${color3}${alignc}antiX_15_beta2
${color8}$alignc${font DejaVu Sans:size=12}${time %I:%M}${color black} . $font
#${color}${alignc}${time %a %d %b}
${color}${alignc}${exec disp=${DISPLAY#:}; disp=${disp%.[0-9]}; cat $HOME/.desktop-session/desktop-code.$disp 2>/dev/null}
${color3}${alignc}${execi 60 xdpyinfo | sed -n -r"s/^\s*dimensions:.*\s([0-9]+x[0-9]+).*/\1/p"}
${color}${alignc}$kernel
${color}${alignc}Uptime: $uptime
${color}CPU:${alignr}${color3}${cpu}${color}%
${color2}$alignr${cpugraph cpu0 40, 240 5599cc 5599cc }
${color}Disk:${alignr}${color3}${diskio}
${color2}${alignr}${diskiograph 40,240 5599cc 5599cc }
${if_up eth0}${color}eth0 up: $alignr${color3} ${upspeed eth0}
${color2}$alignr${upspeedgraph   eth0 40,240 5599cc 5599cc 1000 -l}
${color}eth0 down: $alignr${color3} ${downspeed eth0}
${color2}$alignr${downspeedgraph eth0 40,240  5599cc 5599cc 1000 -l}${endif}
${if_up wlan0}${color}wlan0 up: $alignr${color3} ${upspeed wlan0}
${color2}$alignr${upspeedgraph   wlan0 40,240 5599cc 5599cc 1000 -l}
${color}wlan0 down: $alignr${color3} ${downspeed wlan0}
${color2}$alignr${downspeedgraph wlan0 40,240 5599cc 5599cc 1000 -l}${endif}
${color}${alignr}${color3}Used / Total
${color}RAM:${alignr}$mem ${color3} /${color} $memmax
${color}Swap:${alignr}$swap ${color3} /${color} $swapmax
${color}/ Disk:${alignr}${fs_used /} ${color3} /${color} ${fs_size /}
${color3}${alignc}${execi 1000 persist-enabled}
${execi 1000 acpi 2>/dev/null | grep -q . && echo"Batt:"}${execi 10 acpi -b 2>/dev/null | cut -d"" -f3,4 | sed 's/,$//'}
${color8}Key ${alignr} Command${color}
Alt+F2 ${alignr} gexec
Ctrl+Shift+Del ${alignr} Exit
Ctrl+Alt+e ${alignr} Claws
Ctrl+Alt+t ${alignr} Terminal
Ctrl+Shift+t ${alignr} Root Terminal
#Ctrl+Alt+u ${alignr} gftp
Ctrl+Alt+i ${alignr} Mirage
Ctrl+Alt+a ${alignr} XMMS
Ctrl+Alt+s${alignr}Screeny
Ctrl+Alt+d ${alignr} Synaptic
Ctrl+Alt+f ${alignr} File Manger
Ctrl+Alt+g ${alignr} Geany
Ctrl+Shift+g ${alignr} Root Geany
#Ctrl+Alt+h${alignr}Help Docs
#Ctrl+Alt+k${alignr}session-exit

Just a stock AntiX 15 conkyrc modified to show key combos.

Looks like this


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://postmyimage.com/img2/756_screenshot.jpg"
linktext was:"http://postmyimage.com/img2/756_screenshot.jpg"
====================================
Posts: 325
male
Joined: 04 Nov 2011
#87
...now then the 15

Code: Select all

...
TEXT
${color3}${alignc}antiX 15
${color8}$alignc${font DejaVu Sans:size=12}${execpi 1 TZ=Europe/Berlin date"+%a.%d.%b %H:%M"} $font
#${color}${alignc}${time %a. %d. %b}
${color}${alignc}${exec disp=${DISPLAY#:}; disp=${disp%.[0-9]}; cat $HOME/.desktop-session/desktop-code.$disp 2>/dev/null}
${color3}${alignc}${execi 60 xdpyinfo | sed -n -r"s/^\s*dimensions:.*\s([0-9]+x[0-9]+).*/\1/p"}
${color}${alignc}$kernel
${color}${alignc}Uptime: $uptime

${color}CPU: ${acpitemp}° Fan: ${execi 3 sensors | grep fan1 | cut -c 14-18} ${alignr}${color3}${cpu}${color}%
${color2}$alignr${cpugraph cpu0 30, 180 5599cc 5599cc }
${color}Disk:${alignr}${color3}${diskio}
${color2}${alignr}${diskiograph 30,180 5599cc 5599cc }
${if_up eth1}${color}eth1 up: $alignr${color3} ${upspeed eth1}
${color2}$alignr${upspeedgraph   eth1 30,180 5599cc 5599cc 1000 -l}
${color}eth1 down: $alignr${color3} ${downspeed eth1}
${color2}$alignr${downspeedgraph eth1 30,180  5599cc 5599cc 1000 -l}${endif}
${if_up eth0}${color}eth0 up: $alignr${color3} ${upspeed eth0}
${color2}$alignr${upspeedgraph   eth0 30,180 5599cc 5599cc 1000 -l}
${color}eth0 down: $alignr${color3} ${downspeed eth0}
${color2}$alignr${downspeedgraph eth0 30,180 5599cc 5599cc 1000 -l}${endif}
${color8}${font DejaVu Sans:bold:size=8}ThinkPad X40 ${font DejaVu Sans:bold:size=7}MXSSD1MNANO-60G ${font}
${color}${alignr}${color3}Used / Total
${color}RAM${alignr}$mem ${color3} /${color} $memmax
${color}Swap${alignr}$swap ${color3} /${color} $swapmax
${color}root${alignr}${fs_used /} ${color3} /${color} ${fs_size /}
${color}DATA${alignr}${fs_used /media/DATEN/} ${color3} /${color} ${fs_size /media/DATEN/}
${color3}${alignc}${execi 1000 persist-enabled}
${execi 1000 acpi 2>/dev/null | grep -q . && echo"Batt:"}${execi 10 acpi -b 2>/dev/null | cut -d"" -f3,4 | sed 's/,$//'}
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#88
Moving my thread here instead.

Ok. digging around on the net I found this

Code: Select all

harry@tramp:~
$ df -h | grep"/dev/sd" | awk 'BEGIN { print"free\ttotal\tfull" } { printf"%s\t%s\t%s\t%s\n", $4, $2, $5, $6 }'
free    total    full
4.0G    7.6G    45%    /
14G    16G    4%    /home
84G    120G    27%    /media/_data
Posting this for trying to edit the code to include a line in my AntiX 15 beta2 conkyrc file so it will display in conky. I know exec is involved but i am clueless in the head today. It also would be nice to show a used section also in that readout.

But I know beggars can't be choosey. __{{emoticon}}__

Now to delete that extra thread. I really need to keep things here cleaner than I do in my motorcycle shop.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#89
Making conky use aligned multi-line output like this can be tricky. IMO that awk code is never going to work correctly. The problem is that single tabs will rarely be enough to keep the columns aligned (as demonstrated in the output you posted).

We already have something like this in the default .conkyrc:

Code: Select all

${color}/ Disk:${alignr}${fs_used /} ${color3} /${color} ${fs_size /}
If you already know the mountpoints/partitions you want to see then this line can be modified. Here is an example for the /home partition:

Code: Select all

${color}/home:${alignr}${fs_used /home} ${color3} /${color} ${fs_size /home}
Of course, this won't work if you want it to display things mounted under /media which might show up with different mountpoint names.

I wrote a wrapper for the df command which runs in a loop and formats the output in a more sane way. I run it inside of a transparent borderless aterm window. I've attached a screen shot (dfh.png). This was my personal solution.

If your conky window is wide enough then I suggest you try something like:

Code: Select all

${font DejaVu Sans Mono:bold:size=9}${execi 60 df -h}${font DejaVu Sans:bold:size=9}
I've attached a screen shot of what this looks like (conky-df.png) but my conky window is too narrow so a lot of the text on the right got cut off.
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#90
If your conky window is wide enough then I suggest you try something like:

Code: Select all

${font DejaVu Sans Mono:bold:size=9}${execi 60 df -h}${font DejaVu Sans:bold:size=9}
My conkyrc size limits and config don't seem to handle that Bitjam so for /media/_data I decided to roll with this instead.

Code: Select all

# set to yes if you want Conky to be forked in the background
background yes

short_units yes

cpu_avg_samples 1
net_avg_samples 1

out_to_console no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
font 8x12
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
#xftfont gentium:size=12
#ftfont DejaVu Sans:size=10
xftfont DejaVu Sans:bold:size=9
#xftfont DejaVu Sans:size=9

# Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops)
own_window yes
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar

# Text alpha when using Xft
xftalpha 1.0

#on_bottom no

# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 1

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

# Minimum size of text area
#minimum_size 5 5
minimum_size 280
#maximum_width 180
maximum_width 300
conky_window.height 768
# 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 10

# border width
border_width 2

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

color2 ffffff
color3 ffffff
#color2 black
#color3 black
color4 yellow
color8 77ccff
color9 5599cc

# 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 25
gap_y 20

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

# Subtract file system buffers from used memory?
no_buffers yes

# if_up_strictness link:  up | link | address
if_up_strictness address

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

# boinc (seti) dir
# seti_dir /opt/seti

# Possible variables to be used:
#
#      Variable         Arguments                  Description               
#  acpiacadapter                     ACPI ac adapter state.                   
#  acpifan                           ACPI fan state                           
#  acpitemp                          ACPI temperature.                       
#  adt746xcpu                        CPU temperature from therm_adt746x       
#  adt746xfan                        Fan speed from therm_adt746x             
#  battery           (num)           Remaining capasity in ACPI or APM       
#                                    battery. ACPI battery number can be     
#                                    given as argument (default is BAT0).     
#  buffers                           Amount of memory buffered               
#  cached                            Amount of memory cached                 
#  color             (color)         Change drawing color to color           
#  cpu                               CPU usage in percents                   
#  cpubar            (height)        Bar that shows CPU usage, height is     
#                                    bar's height in pixels                   
#  downspeed         net             Download speed in kilobytes             
#  downspeedf        net             Download speed in kilobytes with one     
#                                    decimal                                 
#  exec              shell command   Executes a shell command and displays   
#                                    the output in torsmo. warning: this     
#                                    takes a lot more resources than other   
#                                    variables. I'd recommend coding wanted   
#                                    behaviour in C and posting a patch :-). 
#  execi             interval, shell Same as exec but with specific interval.
#                    command         Interval can't be less than             
#                                    update_interval in configuration.       
#  fs_bar            (height), (fs)  Bar that shows how much space is used on
#                                    a file system. height is the height in   
#                                    pixels. fs is any file on that file     
#                                    system.                                 
#  fs_free           (fs)            Free space on a file system available   
#                                    for users.                               
#  fs_free_perc      (fs)            Free percentage of space on a file       
#                                    system available for users.             
#  fs_size           (fs)            File system size                         
#  fs_used           (fs)            File system used space                   
#  hr                (height)        Horizontal line, height is the height in
#                                    pixels                                   
#  i2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev   
#                                    may be omitted if you have only one I2C 
#                                    device. type is either in (or vol)       
#                                    meaning voltage, fan meaning fan or temp
#                                    meaning temperature. n is number of the 
#                                    sensor. See /sys/bus/i2c/devices/ on     
#                                    your local computer.                     
#  kernel                            Kernel version                           
#  loadavg           (1), (2), (3)   System load average, 1 is for past 1     
#                                    minute, 2 for past 5 minutes and 3 for   
#                                    past 15 minutes.                         
#  machine                           Machine, i686 for example               
#  mails                             Mail count in mail spool. You can use   
#                                    program like fetchmail to get mails from
#                                    some server using your favourite         
#                                    protocol. See also new_mails.           
#  mem                               Amount of memory in use                 
#  membar            (height)        Bar that shows amount of memory in use   
#  memmax                            Total amount of memory                   
#  memperc                           Percentage of memory in use             
#  new_mails                         Unread mail count in mail spool.         
#  nodename                          Hostname                                 
#  outlinecolor      (color)         Change outline color                     
#  pre_exec          shell command   Executes a shell command one time before
#                                    torsmo displays anything and puts output
#                                    as text.                                 
#  processes                         Total processes (sleeping and running)   
#  running_processes                 Running processes (not sleeping),       
#                                    requires Linux 2.6                       
#  shadecolor        (color)         Change shading color                     
#  stippled_hr       (space),        Stippled (dashed) horizontal line       
#                    (height)       
#  swapbar           (height)        Bar that shows amount of swap in use     
#  swap                              Amount of swap in use                   
#  swapmax                           Total amount of swap                     
#  swapperc                          Percentage of swap in use               
#  sysname                           System name, Linux for example           
#  time              (format)        Local time, see man strftime to get more
#                                    information about format                 
#  totaldown         net             Total download, overflows at 4 GB on     
#                                    Linux with 32-bit arch and there doesn't
#                                    seem to be a way to know how many times 
#                                    it has already done that before torsmo   
#                                    has started.                             
#  totalup           net             Total upload, this one too, may overflow
#  updates                           Number of updates (for debugging)       
#  upspeed           net             Upload speed in kilobytes               
#  upspeedf          net             Upload speed in kilobytes with one       
#                                    decimal                                 
#  uptime                            Uptime                                   
#  uptime_short                      Uptime in a shorter format               
#
#  seti_prog                         Seti@home current progress
#  seti_progbar      (height)        Seti@home current progress bar
#  seti_credit                       Seti@hoome total user credit
## antiX additives examples. Add below Text##
##Battery examples##
##${color}battery: ${color}$acpiacadapter, ${battery_percent BAT1}%
##${color}battery:${color} ${battery}
#${color}ACPI Battery: ${color}$battery
#${battery_bar 11,0}
##Wireless example##
#${color}Wireless:
#${color}essid: ${wireless_essid wlan0}
#${color}IP:${color} ${addr wlan0}
#${color}speed: ${color} ${wireless_bitrate wlan0}
#${color}link strength: ${color} ${wireless_link_bar 7,50 wlan0}

# stuff after 'TEXT' will be formatted on screen

TEXT
${color3}${alignc}antiX_15_beta2
${color2}$alignc${font DejaVu Sans:size=12}${time %I:%M}${color black} . $font
#${color2}${alignc}${time %a %d %b}
${color2}${alignc}${exec disp=${DISPLAY#:}; disp=${disp%.[0-9]}; cat $HOME/.desktop-session/desktop-code.$disp 2>/dev/null}
${color3}${alignc}${execi 60 xdpyinfo | sed -n -r"s/^\s*dimensions:.*\s([0-9]+x[0-9]+).*/\1/p"}
${color2}${alignc}$kernel
${color2}${alignc}Uptime: $uptime
${color2}CPU:${alignr}${color3}${cpu}${color2}%
${color2}$alignr${cpugraph cpu0 40, 280 5599cc 5599cc }
${color2}Disk:${alignr}${color3}${diskio}
${color2}${alignr}${diskiograph 40,280 5599cc 5599cc }
${if_up eth0}${color}eth0 up: $alignr${color3} ${upspeed eth0}
${color2}$alignr${upspeedgraph   eth0 40,280 5599cc 5599cc 1000 -l}
${color}eth0 down: $alignr${color3} ${downspeed eth0}
${color2}$alignr${downspeedgraph eth0 40,280  5599cc 5599cc 1000 -l}${endif}
${if_up wlan0}${color2}wlan0 up: $alignr${color3} ${upspeed wlan0}
${color2}$alignr${upspeedgraph   wlan0 40,280 5599cc 5599cc 1000 -l}
${color2}wlan0 down: $alignr${color3} ${downspeed wlan0}
${color2}$alignr${downspeedgraph wlan0 40,280 5599cc 5599cc 1000 -l}${endif}
${color}${alignr}${color3}Used / Total
${color2}RAM:${alignr}$mem ${color3} /${color2} $memmax
${color2}Swap:${alignr}$swap ${color3} /${color2} $swapmax
${color2}/ Disk:${alignr}${fs_used /} ${color3} /${color2} ${fs_size /}
${color2}/home:${alignr}${fs_used /home} ${color3} /${color2} ${fs_size /home}
${color2}/data:${alignr}${fs_used /media/_data} ${color3} /${color2} ${fs_size /media/_data}
#${ df -h | grep"/dev/sd"} | awk 'BEGIN { print"free\ttotal\tfull"} { printf"%s\t%s\t%s\t%s\n", $4, $2, $5, $6 }'
${color3}${alignc}${execi 1000 persist-enabled}
${execi 1000 acpi 2>/dev/null | grep -q . && echo"Batt:"}${execi 10 acpi -b 2>/dev/null | cut -d"" -f3,4 | sed 's/,$//'}
${color2}Key ${alignr} Command${color2}      
Alt+F2 ${alignr} gexec      
Ctrl+Shift+Del ${alignr} Exit      
Ctrl+Alt+e ${alignr} Claws      
Ctrl+Alt+t ${alignr} Terminal      
Ctrl+Shift+t ${alignr} Root Terminal      
#Ctrl+Alt+u ${alignr} gftp      
Ctrl+Alt+i ${alignr} Mirage      
Ctrl+Alt+a ${alignr} XMMS      
Ctrl+Alt+s${alignr}Screeny      
Ctrl+Alt+d ${alignr} Synaptic      
Ctrl+Alt+f ${alignr} File Manger      
Ctrl+Alt+g ${alignr} Geany      
Ctrl+Shift+g ${alignr} Root Geany      
#Ctrl+Alt+h${alignr}Help Docs
#Ctrl+Alt+k${alignr}session-exit
Image