1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

doc updates; $voffset

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@122 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2005-08-21 05:04:22 +00:00
parent 3b184eeb1d
commit abd6fb4e02
6 changed files with 92 additions and 205 deletions

View File

@ -3,6 +3,7 @@
2005-08-20
* Applied patch from zimba-tm, closes patch 1260225
* Fixed ugly gradient bug. closes bug 1255608
* Added $voffset
2005-08-12
* Multiple unit additions and modifications

29
conky.c
View File

@ -356,6 +356,7 @@ enum {
ALIGNC,
GRAPH,
OFFSET,
VOFFSET,
FONT,
};
@ -575,7 +576,12 @@ static inline void new_outline(char *buf, long c)
static inline void new_offset(char *buf, long c)
{
new_special(buf, OFFSET)->arg = c;
new_special(buf, OFFSET)->arg = c;
}
static inline void new_voffset(char *buf, long c)
{
new_special(buf, VOFFSET)->arg = c;
}
static inline void new_alignr(char *buf, long c)
@ -685,6 +691,7 @@ enum text_object_type {
OBJ_fs_used_perc,
OBJ_hr,
OBJ_offset,
OBJ_voffset,
OBJ_alignr,
OBJ_alignc,
OBJ_i2c,
@ -1067,6 +1074,7 @@ if (s[0] == '#') {
obj->data.fs = prepare_fs_stat(arg);
END OBJ(hr, 0) obj->data.i = arg ? atoi(arg) : 1;
END OBJ(offset, 0) obj->data.i = arg ? atoi(arg) : 1;
END OBJ(voffset, 0) obj->data.i = arg ? atoi(arg) : 1;
END OBJ(i2c, INFO_I2C) char buf1[64], buf2[64];
int n;
@ -1908,10 +1916,13 @@ static void generate_text()
OBJ(hr) {
new_hr(p, obj->data.i);
}
OBJ(offset) {
OBJ(offset) {
new_offset(p, obj->data.i);
}
OBJ(i2c) {
OBJ(voffset) {
new_voffset(p, obj->data.i);
}
OBJ(i2c) {
double r;
r = get_i2c_info(&obj->data.i2c.fd,
@ -2679,6 +2690,9 @@ static void text_size_updater(char *s)
else if (specials[special_index].type == OFFSET) {
w += specials[special_index].arg + get_string_width("a"); /* filthy, but works */
}
else if (specials[special_index].type == VOFFSET) {
h += specials[special_index].arg;
}
else if (specials[special_index].type == FONT) {
fontchange = specials[special_index].font_added;
selected_font = specials[special_index].font_added;
@ -3203,11 +3217,16 @@ static void draw_line(char *s)
arg);
break;
case OFFSET:
case OFFSET:
{
w += specials[special_index].arg;
}
break;
break;
case VOFFSET:
{
cur_y += specials[special_index].arg;
}
break;
case ALIGNR:
{

View File

@ -1,4 +1,8 @@
# conky configuration
# Conky sample configuration
#
# the list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
# set to yes if you want Conky to be forked in the background
background no
@ -129,187 +133,6 @@ metar_station CYBW
# boinc (seti) dir
# seti_dir /opt/seti
# Possible variables to be used:
#
# Variable Arguments Description
# addr (interface) IP address for an interface
# acpiacadapter ACPI ac adapter state.
# acpifan ACPI fan state
# acpitemp ACPI temperature.
# adt746xcpu CPU temperature from therm_adt746x
# adt746xfan Fan speed from therm_adt746x
# alignr (num) Right-justify text, with space of N
# alignc Align text to centre
# 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
# cpugraph (height),(width) (gradient colour 1) (gradient colour 2)
# CPU usage graph, with optional colours in hex,
# minus the #.
# downspeed net Download speed in kilobytes
# downspeedf net Download speed in kilobytes with one
# decimal
# downspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
# Download speed graph, colours defined in
# hex, minus the #.
# exec shell command Executes a shell command and displays
# the output in conky. warning: this
# takes a lot more resources than other
# variables. I'd recommend coding wanted
# behaviour in C and posting a patch :-).
# execbar shell command Same as exec, except if the first value
# return is a value between 0-100, it
# will use that number for a bar.
# The size for the bar is currently fixed,
# but that may change in the future.
# execgraph shell command Same as execbar, but graphs values
# execi interval, shell command
# Same as exec but with specific interval.
# Interval can't be less than
# update_interval in configuration.
# font font Specify a different font. Only applies
# to one line.
# 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/tempf (first in C, second in F)
# meaning temperature. n is number of the
# sensor. See /sys/bus/i2c/devices/ on
# your local computer.
# if_running (process) if PROCESS is running, display
# everything if_running and the matching $endif
# if_existing (file) if FILE exists, display everything between
# if_existing and the matching $endif
# if_mounted (mountpoint) if MOUNTPOINT is mounted, display everything between
# if_mounted and the matching $endif
# else Text to show if any of the above are not true
# kernel Kernel version
# linkstatus (interface) Get the link status for wireless connections
# 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
#
# metar_ob_time
# metar_temp
# metar_tempf Temp in F
# metar_windchill
# metar_dew_point There are a bunch of these
# metar_rh and they are self-explanatory
# metar_windspeed
# metar_winddir
# metar_swinddir
# metar_cloud
# metar_u2d_time
#
# ml_upload_counter total session upload in mb
# ml_download_counter total session download in mb
# ml_nshared_files number of shared files
# ml_shared_counter total session shared in mb, buggy
# in some mldonkey versions
# ml_tcp_upload_rate tcp upload rate in kb/s
# ml_tcp_download_rate tcp download rate in kb/s
# ml_udp_upload_rate udp upload rate in kb/s
# ml_udp_download_rate udp download rate in kb/s
# ml_ndownloaded_files number of completed files
# ml_ndownloading_files number of downloading files
#
# mpd_artist Artist in current MPD song
# (must be enabled at compile)
# mpd_album Album in current MPD song
# mpd_bar (height) Bar of mpd's progress
# mpd_bitrate Bitrate of current song
# mpd_status Playing, stopped, et cetera.
# mpd_title Title of current MPD song
# mpd_vol MPD's volume
# mpd_elapsed Song's elapsed time
# mpd_length Song's length
# mpd_percent Percent of song's progress
# 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
# conky 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
# offset pixels Move text over by N pixels
# tail logfile, lines (interval)
# Displays last N lines of supplied text
# text file. If interval is not supplied,
# Conky assumes 2x Conky's interval.
# Max of 30 lines.
# Max of 30 lines can be displayed.
# 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 conky
# has started.
# top type, num This takes arguments in the form:
# top <name> <number>
# Basically, processes are ranked from
# highest to lowest in terms of cpu
# usage, which is what <num> represents.
# The types are: "name", "pid", "cpu", and
# "mem".
# There can be a max of 10 processes listed.
# top_mem type, num Same as top, except sorted by mem usage
# instead of cpu
# 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
# upspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
# Upload speed graph, colours defined in
# hex, minus the #.
# 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
# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument

View File

@ -9,7 +9,7 @@
<varlistentry>
<term><command><option>-a </option></command><option>ALIGNMENT</option></term>
<listitem>
Text alignment on screen, {top,bottom}_{left,right}
Text alignment on screen, {top,bottom}_{left,right} or none
<para></para></listitem>
</varlistentry>

View File

@ -2,7 +2,7 @@
<varlistentry>
<term><command><option>alignment</option></command></term>
<listitem>
Aligned position on screen, may be top_left, top_right, bottom_left, bottom_right
Aligned position on screen, may be top_left, top_right, bottom_left, bottom_right, or none
<para></para></listitem>
</varlistentry>

View File

@ -124,7 +124,7 @@
<varlistentry>
<term>
<command><option>cpubar</option></command>
<option>(height)</option>
<option>(height),(width)</option>
</term>
<listitem>
Bar that shows CPU usage, height is bar's height in pixels
@ -134,7 +134,7 @@
<varlistentry>
<term>
<command><option>cpugraph</option></command>
<option>(height, width, gradient colour 1, gradient colour 2)</option>
<option>(height),(width) (gradient colour 1) (gradient colour 2)</option>
</term>
<listitem>
CPU usage graph, with optional colours in hex, minus the #.
@ -164,7 +164,7 @@
<varlistentry>
<term>
<command><option>downspeedgraph</option></command>
<option>net, (height, width, gradient colour 1, gradient colour 2)</option>
<option>net, (height),(width) (gradient colour 1) (gradient colour 2)</option>
</term>
<listitem>
Download speed graph, colours defined in hex, minus the #.
@ -230,10 +230,28 @@
<para></para></listitem>
</varlistentry>
<varlistentry>
<varlistentry>
<term>
<command><option>freq</option></command>
</term>
<listitem>
Returns CPU frequency in MHz
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>freq_g</option></command>
</term>
<listitem>
Returns CPU frequency in GHz
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>fs_bar</option></command>
<option>(height, fs)</option>
<option>(height),(width) fs</option>
</term>
<listitem>
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.
@ -388,7 +406,7 @@
<varlistentry>
<term>
<command><option>membar</option></command>
<option>(height)</option>
<option>(height),(width)</option>
</term>
<listitem>
Bar that shows amount of memory in use
@ -472,8 +490,24 @@
<command><option>metar_windspeed</option></command>
</term>
<listitem>
self-explanatory
<para></para></listitem>
Windspeed in knots
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_windspeed_km</option></command>
</term>
<listitem>
Windspeed in kph
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>metar_windspeed_mph</option></command>
</term>
<listitem>
Windspeed in mph
<para></para></listitem>
</varlistentry>
<varlistentry>
@ -623,7 +657,7 @@
<varlistentry>
<term>
<command><option>mpd_bar</option></command>
<option>height</option>
<option>(height),(width)</option>
</term>
<listitem>
Bar of mpd's progress
@ -772,7 +806,7 @@
<varlistentry>
<term>
<command><option>swapbar</option></command>
<option>(height)</option>
<option>(height),(width)</option>
</term>
<listitem>
Bar that shows amount of swap in use
@ -817,12 +851,12 @@
<varlistentry>
<term>
<command><option>offse</option></command>
<option>pixels</option>
<command><option>offset</option></command>
<option>(pixels)</option>
</term>
<listitem>
Move text over by N pixels
<para></para></listitem>
Move text over by N pixels. See also $voffset.
<para></para></listitem>
</varlistentry>
<varlistentry>
@ -917,7 +951,7 @@
<varlistentry>
<term>
<command><option>upspeedgraph</option></command>
<option>net, (height, width, gradient colour 1, gradient colour 2)</option>
<option>net, (height),(width) (gradient colour 1) (gradient colour 2)</option>
</term>
<listitem>
Upload speed graph, colours defined in hex, minus the #.
@ -954,7 +988,7 @@
<varlistentry>
<term>
<command><option>seti_progbar</option></command>
<option>(height)</option>
<option>(height),(width)</option>
</term>
<listitem>
Seti@home current progress bar
@ -969,5 +1003,15 @@
Seti@home total user credit
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>voffset</option></command>
<option>(pixels)</option>
</term>
<listitem>
Change verticle offset by N pixels. Negative values will cause text to overlap. See also $offset.
<para></para></listitem>
</varlistentry>
</variablelist>