Wiki
Clone wikiconkywx_pub / Conkywx_Lua
Table of Contents
- USAGE
- SYNTAX
- MUSIC SORT
- SCROLLER
- SHOWCOND
- THERMOMETER
- WXGRAPH
- BACKGROUND
- BARGRAPH
- ANEMOMETER
- BAROMETER
- VUMETER
- CREDITS
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
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
Option | Description |
---|---|
-n | music_sort |
-p | x,y co-ordinates use comma , as separator |
-l | length/width of scroll text |
-s | scroll 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 | |
-m | you 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 | |
-c | hex colour:alpha 0x00ff00:0.7 |
-w | direction of scroll "U" is up "D" is down "B" is up-down |
-i | vertical scroll increment Default 10 |
-f | font size:name:style . Use colon : as separator |
-r | range of scroll y cood is middle, 0 default |
-o | file 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. |
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
-n | scroller |
-p | x,y co-ordinates "," separator |
-l | length/width of scroll text - Default is 36 |
-s | scroll text step +ve for left -ve for right scroll. Default is 1 |
-d | text 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 |
-o | file 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. |
Note | For data input use -d for text OR -o for file input |
Following are optional | |
-c | colour 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 |
-w | direction of scroll "U" is up - "D" is down - "B"is up and down |
-i | vertical scroll increment default 10 |
-f | font size:name:style etc use colon character : separator |
-r | range of scroll y co-ord is middle, 0 default |
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
Option | Description |
---|---|
-n | showcond (required lua widget) |
-p | position x,y co-ordinates for the widget |
-s | size of the widget |
-w | can call Condition Image CI or Font CF |
-t | use 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 |
-c | font colour format hex:alpha 0x000000:1 |
-i | [PIC] conkywx element for present condition image |
-j | use 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
Option | Description |
---|---|
-n | showcond (required lua widget) |
-p | position x,y co-ordinates for the widget |
-s | size of the widget |
-d | [WDD] wind direction in degrees Element |
-e | [WS] wind speed Element |
-f | [BF] conkywx element for present condition font character |
-i | Wind Vane Image choose from numbers 1 to 21 |
-a | Choose type of arrow from 1 to 5 |
-j | Choose instrument background use 1 or omit this option |
-l | Arrow colour use notation 0x00ff00:0.7 |
-b | WindVane background colour use notation 0x00ff00:0.7 |
-r | Ring, Slot and Cardinal colour use notation 0x00ff00:0.7 |
-o | Star colour use notation 0x00ff00:0.7 - this option defines the line and fill colour |
-c | Text/Font colour [calm etc] use notation 0x00ff00:0.7 |
-w | call Wind Direction Image WI or Font WF |
-x | s for star with lines or f for star filled with colour |
-y | star 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. |
-z | star size - s for small and l for large |
-t | use 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
Option | Description |
---|---|
-n | showcond (required lua widget) |
-p | position x,y co-ordinates for the widget |
-s | size of the widget |
-w | call Moon Image MI or Font MF |
-f | [MIF] conkywx element for present condition font character |
-d | conkywx element [MROT] Dynamic moon rotation |
-c | font colour format hex:alpha 0x000000:1 |
-i | [MIC] conkywx element for present condition image |
-j | use 1 for instrument back ground image |
thermometer
example
${lua main -n thermometer -p 442,218 -t [PT] -l Temperature -s 1 -u [UU]}
explanation
Option | Description |
---|---|
-n | thermometer (required lua widget) |
-p | position x,y co-ordinates for the widget |
-l | vertical text required for display on the widget |
-t | temperature conkywx element [PT] |
-s | size 1=full size, 0.5=half size, 2=double size |
-u | conkywx element [UU] for unit in use C or F |
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
Option | Description |
---|---|
-n | wxgraph (required lua widget) |
-p | position x,y co-ordinates for the widget |
-c | colour of line format hex:alpha 0x000000:1 |
-d | trend 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
background
example
${lua main -n background -r 25 -c 0x000000:0.2 -p NA,NA}
explanation
Option | Description |
---|---|
-n | background (required lua widget) |
-r | radius of corners |
-c | colour of widget background format hex:alpha 0x000000:1 |
-p | position x,y co-ordinates for the widget. Let this be NA if you want the widget to use conky height and or width |
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
Option | Description |
---|---|
-n | bargraph (required lua widget) |
-p | position x,y co-ordinates for the widget |
-w | bargraph width = 100 |
-s | bargraph 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
-f | conky variable name = cpu |
- - conky variable like cpu, fs_used_perc, memperc etc
- - refer to http://conky.sourceforge.net/docs.html
-a | conky variable with number = cpu1 |
-l | enable 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
-x | set alarm value for led effect = 90 |
- - This alarm value is only valid if LED effect is 1
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.
Option | Description |
---|---|
-n | barometer (required lua widget) |
-p | position x,y co-ordinates for the widget |
-s | size of the widget |
-r | wind speed - conkywx element [WS] |
-t | wind gust - conkywx element [WG] |
-u | units in use - conkywx element [UU] |
-w | enable windvane in the center use 1 or 0 to omit this option |
-d | wind direction in degrees - conkywx element [WDD] |
-i | Windvane Image choose from numbers 1 to 21. Omit/remove this option to see lua generated compass |
-a | Windvane - choose type of arrow from 1 to 5 |
-j | Windvane - choose instrument background use 1 or 0 to omit this option |
-l | Windvane - colour arrow use format 0xff0000:1 |
- Following are optional
-c | colour of widget background format hex:alpha 0x000000:1 |
-e | colour text format hex:alpha 0xfff000:1 |
-x | colour arrow use format 0xff0000:1 |
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
Option | Description |
---|---|
-n | barometer (required lua widget) |
-p | position x,y co-ordinates for the widget |
-s | size of the widget |
-r | pressure - conkywx element [BR] |
-t | temperature - conkywx element [PT] |
-u | units in use - conkywx element [UU] |
- Following are optional
-c | colour of widget background format hex:alpha 0x000000:1 |
-e | colour text format hex:alpha 0xfff000:1 |
-x | colour arrow use format 0xff0000:1 |
vumeter
example
${lua main -n vumeter -p 160,190 -d [UV] -u [UU] -o u -v h }
explanation
Option | Description |
---|---|
-n | vumeter (required lua widget) |
-p | position x,y co-ordinates for the widget |
-m | [MP3] moon waxing or waning |
-o | option to use based on -d value |
-d | vumeter 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
-i | hide numbers on the vumeter scale - Def:-with numbers |
-v | V for vertical or H for horizontal orientation Def:- V |
-e | pointer colour format hex:alpha Def:-0x00FF00:1 |
-f | scale and number colour format hex:alpha Def:-0xCD950C:1 |
-g | label text colour format hex:alpha Def:-0x00ffff:1 |
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