Wiki

Clone wiki

conkywx_pub / Conkywx_Lua

Go Back to Wiki Home


Table of Contents


USAGE

  • All options shown have to have a space a dash and a single small case character followed by a space and then the option value - for example -a 25 -p 2,25
  • In conkyrc file add a line Before TEXT -- lua_load path_to/conkywx.lua
  • Under TEXT or in conkywx template file use::
  • ${lua main -n wxgraph -p 188,170 -d [GT] -c 0xEE4000}

SYNTAX

example

  • ${lua main -n wxgraph -p 188,170 -d [GT] -c 0xEE4000}

explanation

  • see wxgraph below

Function calls


Go To Top of Page

music sort

example

  • ${lua main -n music_sort -f 14 -l 36 -s 5 -p 5,685 }

explanation

  • This is a generic music track title extractor. the progran has smplayer and vlc player support.
  • This line can be placed anywhere in the TEXT section.
  • No data needs to be input
  • Xlsclients is a utility for listing information about the client applications running on a display. It may be used to generate scripts representing a snapshot of the user's current session. [from man xlsclients] It is part of X installation.

options

OptionDescription
-nmusic_sort
-px,y co-ordinates use comma , as separator
-llength/width of scroll text
-sscroll text step +ve for left -ve for right scroll. Scroll text by step 's' characters showing. length 'l' number of characters at the same time.
Following are optional
-myou can specify your own player here
To get your player working here you need to check what name is being used by xlsclients. On the command line type xlsclients -l and see the output - test what you see if the name xlsclients -l | grep "your player" you should get a single line starting with "Name" - then you know the player name to use. pass it to player with -m option
-chex colour:alpha 0x00ff00:0.7
-wdirection of scroll "U" is up "D" is down "B" is up-down
-ivertical scroll increment Default 10
-ffont size:name:style. Use colon : as separator
-rrange of scroll y cood is middle, 0 default
-ofile path/name which has text to scroll. If the file has multiple lines then the lines are placed behind each other separated with a | character.

Go To Top of Page

scroller

example

  • ${lua main -n scroller -f 14 -l 36 -s 5 -p 170,20 -o ${template3}}
  • template3 looks like::
  • template3 /tmp/wx-username-conkywx-02.conf-pChA_r_27u0-m39/wxalert
  • conky template and path to wxalert file in conkywx temp folder

explanation

  • This line can be placed anywhere in the TEXT section.

options

-nscroller
-px,y co-ordinates "," separator
-llength/width of scroll text - Default is 36
-sscroll text step +ve for left -ve for right scroll. Default is 1
-dtext to scroll. Scroll text 'd' by step 's' characters showing length 'l' number of characters at the same time. OR use -o for file input
-ofile path/name which has text to scroll. If the file has multiple lines then the lines are placed behind each other separated with a pipe | character.
NoteFor data input use -d for text OR -o for file input
Following are optional
-ccolour is stated in hex e.g. Red is 0xff0000 alpha for transparency is a decimal number from 0 to 1. use notation 0x00ff00:0.7
-wdirection of scroll "U" is up - "D" is down - "B"is up and down
-ivertical scroll increment default 10
-ffont size:name:style etc use colon character : separator
-rrange of scroll y co-ord is middle, 0 default

Go To Top of Page

showcond

  • showcond - is short for show condition - condition includes present weather condition, wind direction and the moon - you can display images as well as font characters.

Condition - example

  • ${lua main -n showcond -p -5,90 -s 110 -w CI -t 1 -f [PIF] -c 0xFFD700 -i [PIC] -j 1 }

explanation

OptionDescription
-nshowcond (required lua widget)
-pposition x,y co-ordinates for the widget
-ssize of the widget
-wcan call Condition Image CI or Font CF
-tuse 1 for 3D thick font - (font to image) - if -t is missing or not set to 1 then flat regular font is shown with the colour specified with -c option
-f[PIF] conkywx element for present condition font character
-cfont colour format hex:alpha 0x000000:1
-i[PIC] conkywx element for present condition image
-juse 1 for instrument back ground image

Note::

if -w is CI then -i and optional -j can be used
if -w is CF then it, -f and -c are required.
the full line may also be used as shown -w will decide image of font is shown

Windvane - example

  • arrow colour option -l is blue
  • ${lua main -n showcond -p 204, 0 -s 200 -w wi -f [BF] -d [WDD] -t 1 -e [WS] -i 1 -a 4 -j 1 -c 0x00ff00:1 -l 0x4169E1:1}
  • arrow colour option -l is brown
  • ${lua main -n showcond -p 204, 0 -s 200 -w wi -f [BF] -d [WDD] -t 1 -e [WS] -i 9 -a 5 -j 1 -c 0x00ff00:1 -l 0x8B4513:0.9 }
  • arrow colour option -l is red
  • ${lua main -n showcond -p 204, 0 -s 200 -w wi -f [BF] -d [WDD] -t 1 -e [WS] -i 16 -a 1 -j 1 -c 0x00ff00:1 -l 0xff0000:0.9 }
  • star demo - star with lines with -c colour
  • ${lua main -n showcond -p 204, 0 -s 200 -w wi -f [BF] -d [WDD] -t 1 -e [WS] -a 3 -j 1 -c 0x00ff00:1 -l 0xff0000:0.9 -y d }
  • star demo - star filled with -c colour
  • ${lua main -n showcond -p 204, 0 -s 200 -w wi -f [BF] -d [WDD] -t 1 -e [WS] -a 4 -j 1 -c 0x00ff00:1 -l 0xff0000:0.9 -y d -x f }
  • see wind in 3D font - set -t 0 to see flat image
  • ${lua main -n showcond -p 204, 0 -s 200 -w wf -f [BF] -d [WDD] -t 1 -e [WS] -j 1 -c 0x00ff00:1 -l 0xff5555:0.9 }

explanation

OptionDescription
-nshowcond (required lua widget)
-pposition x,y co-ordinates for the widget
-ssize of the widget
-d[WDD] wind direction in degrees Element
-e[WS] wind speed Element
-f[BF] conkywx element for present condition font character
-iWind Vane Image choose from numbers 1 to 21
-aChoose type of arrow from 1 to 5
-jChoose instrument background use 1 or omit this option
-lArrow colour use notation 0x00ff00:0.7
-bWindVane background colour use notation 0x00ff00:0.7
-rRing, Slot and Cardinal colour use notation 0x00ff00:0.7
-oStar colour use notation 0x00ff00:0.7 - this option defines the line and fill colour
-cText/Font colour [calm etc] use notation 0x00ff00:0.7
-wcall Wind Direction Image WI or Font WF
-xs for star with lines or f for star filled with colour
-ystar style - use 1 to 5 for some basic patterns, d to see demo - see the terminal for the values which generate the star Or you can define the star pattern based on what you see in the demo output. Use 100:45:45 format. All 3 values need to be defined. 1st value is from 1 to 100 - 2nd value 0, 11.25, 22.5, 45 or 90 - 3rd value 22.5, 45 or 90. You can choose any combination of these values. You can even play with intermediate values and see some spectacular design.
-zstar size - s for small and l for large
-tuse 1 for 3D thick font - (font to image) - if -t is missing or not set to 1 then flat regular font is shown with the colour specified with -c option

Moon - example

  • ${lua main -n showcond -p -5, 312 -s 110 -w mi -f [MIF] -d [MROT] -i [MIC] -j 1 }

explanation

OptionDescription
-nshowcond (required lua widget)
-pposition x,y co-ordinates for the widget
-ssize of the widget
-wcall Moon Image MI or Font MF
-f[MIF] conkywx element for present condition font character
-dconkywx element [MROT] Dynamic moon rotation
-cfont colour format hex:alpha 0x000000:1
-i[MIC] conkywx element for present condition image
-juse 1 for instrument back ground image

Go To Top of Page

thermometer

example

  • ${lua main -n thermometer -p 442,218 -t [PT] -l Temperature -s 1 -u [UU]}

explanation

OptionDescription
-nthermometer (required lua widget)
-pposition x,y co-ordinates for the widget
-lvertical text required for display on the widget
-ttemperature conkywx element [PT]
-ssize 1=full size, 0.5=half size, 2=double size
-uconkywx element [UU] for unit in use C or F

Go To Top of Page

wxgraph

  • Note:: This replaces use of GnuPlot to display graph trends. This makes it use virtually zero overhead and see the graph trends ;-)

example

  • ${lua main -n wxgraph -p 188,170 -d [GT] -c 0xEE4000:1}

explanation

OptionDescription
-nwxgraph (required lua widget)
-pposition x,y co-ordinates for the widget
-ccolour of line format hex:alpha 0x000000:1
-dtrend graph conkywx element

trend graph conkywx element

  • use [GT] for Temperature
  • use [GD] for Dew Point
  • use [GP] for Pressure
  • use [GH] for Humidity
  • use [GW] for Wind Speed

Go To Top of Page

background

example

  • ${lua main -n background -r 25 -c 0x000000:0.2 -p NA,NA}

explanation

OptionDescription
-nbackground (required lua widget)
-rradius of corners
-ccolour of widget background format hex:alpha 0x000000:1
-pposition x,y co-ordinates for the widget. Let this be NA if you want the widget to use conky height and or width

Go To Top of Page

bargraph

example

  • ${lua main -n bargraph -p 117,275 -w 90 -s 3 -f cpu -a cpu1}
  • ${lua main -n bargraph -p 190,503 -w 115 -s 1 -f fs_used_perc -a / -l 1 -x 70}

explanation

OptionDescription
-nbargraph (required lua widget)
-pposition x,y co-ordinates for the widget
-wbargraph width = 100
-sbargraph style = 3
  • - there are 5 styles numbered 1 to 5
  • - they give a gradient colour change to alarm colour
  • - if led effect is used you get a solid colour with alarms
  • - style 1 is thin dashes
  • - style 2 is thick dashes
  • - style 3 is small vertical bars separated by 2 pixels
  • - style 4 is small vertical bars separated by 1 pixels
  • - style 5 is one continuous bar
-fconky variable name = cpu
-aconky variable with number = cpu1
-lenable LED effect = 1
  • - this value can be omitted if LED effect is not desired
  • - LED effect does not have gradient and has solid red alarm
  • - this can be useful where alarm values are required like in
  • file system warnings etc
-xset alarm value for led effect = 90
  • - This alarm value is only valid if LED effect is 1

Go To Top of Page

anemometer

example

  • ${lua main -n anemometer -p 7, 0 -s 200 -r [WS] -t [WG] -u [UU] -w 1 -d [WDD] -i 4 -a 1 -j 1 }

explanation

  • Note:
  • Widget Auto-Scales:: Wind speeds of upto 300 mph are supported.
  • Widget can be re-sized:: Size: smallest is about 70px - big as you like
  • Windvane shown here is a subset and features shown below are available.
OptionDescription
-nbarometer (required lua widget)
-pposition x,y co-ordinates for the widget
-ssize of the widget
-rwind speed - conkywx element [WS]
-twind gust - conkywx element [WG]
-uunits in use - conkywx element [UU]
-wenable windvane in the center use 1 or 0 to omit this option
-dwind direction in degrees - conkywx element [WDD]
-iWindvane Image choose from numbers 1 to 21. Omit/remove this option to see lua generated compass
-aWindvane - choose type of arrow from 1 to 5
-jWindvane - choose instrument background use 1 or 0 to omit this option
-lWindvane - colour arrow use format 0xff0000:1
  • Following are optional
-ccolour of widget background format hex:alpha 0x000000:1
-ecolour text format hex:alpha 0xfff000:1
-xcolour arrow use format 0xff0000:1

Go To Top of Page

barometer

example

  • ${lua main -n barometer -p 150, 209 -s 200 -r [BR] -t [PT] -u [UU]}

explanation

  • Note:
  • Widget Auto-Scales:: Pressure: from 10in [338.6hpa] to 34in [1151.4hpa]
  • Widget can be re-sized:: Size: smallest is about 70px - big as you like
OptionDescription
-nbarometer (required lua widget)
-pposition x,y co-ordinates for the widget
-ssize of the widget
-rpressure - conkywx element [BR]
-ttemperature - conkywx element [PT]
-uunits in use - conkywx element [UU]
  • Following are optional
-ccolour of widget background format hex:alpha 0x000000:1
-ecolour text format hex:alpha 0xfff000:1
-xcolour arrow use format 0xff0000:1

Go To Top of Page

vumeter

example

  • ${lua main -n vumeter -p 160,190 -d [UV] -u [UU] -o u -v h }

explanation

OptionDescription
-nvumeter (required lua widget)
-pposition x,y co-ordinates for the widget
-m[MP3] moon waxing or waning
-ooption to use based on -d value
-dvumeter data - can be
  • -d [UV] -o U for UV info
  • -d [VI] -o V for visibility
  • -d [MV] -o M for moon visibility/illumination
  • -d [HM] -o H for relative humidity
  • -u [UU] units in use

  • Following are optional
-ihide numbers on the vumeter scale - Def:-with numbers
-vV for vertical or H for horizontal orientation Def:- V
-epointer colour format hex:alpha Def:-0x00FF00:1
-fscale and number colour format hex:alpha Def:-0xCD950C:1
-glabel text colour format hex:alpha Def:-0x00ffff:1

Go To Top of Page

credits

  • Code here modified / part / fully written by Paramvir Likhari for conkywx. Original sources from Mr Peachy, wlourf, londonali1010 and probably others I am not aware off - Thanks to ALL !!!

Updated