smilliken wrote: ↑Mon Feb 04, 2019 12:05 pm
What is involved in converting the file?
This is one of the files I have in the directory /home/dexter/1_acuweather
FIrst, your folder in $HOME/dexter should be "1_accuweather" with 2 "c"s .
As for conversion, there is actually a lua script to convert from old conky syntax to new syntax, but not the other way round from new to old syntax.
See the rules for old-to-new conversion (post 1) and the location of the convert.lua script (command to be used is in post 2) in this thread from the siduction forum:
https://forum.siduction.org/index.php?topic=5709.0
You kind of have to do a manual reverse conversion from new to old syntax using the above rules. Most of the changes are in the top section of the conky:
Top section
1) use "find and replace" function in text editor to replace all the "--" (which is the "commenting out" symbol in the top section of a new syntax conky) to "##". Note that it could also be just a single dash instead of a double dash
[weirdly enough, the 2nd section of a new syntax conky reverts back to "##" for commenting out symbol, and the bottom section is more or less the same as in old conky syntax]
2) remove the bracketing/bookends from the top section of the new conky
3) replace all "= true," with "yes", "= false," with "no"
4) remove all commas from the END of any line in top section
5) remove all other "=" in top section ONLY, EXCEPT in lines setting out a font size
6) remove quotation marks in top section ONLY
Bottom section
7) remove the bracketing/bookends from the bottom section of the new conky and just have the caption "TEXT" before the start of that section.
Code: Select all
## Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
## Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
## fiddle with window
use_spacer right
use_xft yes
## Update interval in seconds
update_interval 3
## Minimum size of text area
minimum_width 300
minimum_height 500
maximum_width 300
override_utf8_locale yes
## Draw shades?
draw_shades yes
## Text stuff
draw_outline yes ## amplifies text if yes
draw_borders no
##font freesans -12
font Arial:size=9
uppercase no ## set to yes if you want all text to be in uppercase
## Stippled borders?
stippled_borders 3
## border margins
border_inner_margin 9
## border width
border_width 10
## Default colors and also border colors, grey90 #e5e5e5
default_color #cbcbcb
own_window_colour brown
own_window_transparent yes
## Text alignment, other possible values are commented
##alignment top_left
alignment top_right
##alignment bottom_left
##alignment bottom_right
## Gap between borders of screen and text
gap_x 10
gap_y 30
imlib_cache_size 0
## stuff after 'TEXT' will be formatted on screen
TEXT
${font Arial:size=12}${color ffe595}WEATHER ${hr 2}$color${texeci 50 bash $HOME/1_accuweather/1_accuweather -f2015}${font}
${image $HOME/1_accuweather/forecast_2015/forecast_0.png -p 0,35 -s 167x100}${font Arial:size=11}${goto 170}${execpi 600 sed -n '4p' $HOME/1_accuweather/curr_cond|cut -c1-20}
${goto 170}${execpi 600 sed -n '4p' $HOME/1_accuweather/curr_cond|cut -c21-40}
${font Arial:size=22}${goto 170}${execpi 600 sed -n '2p' $HOME/1_accuweather/curr_cond}° (${execpi 600 sed -n '3p' $HOME/1_accuweather/curr_cond}°)${font}${image $HOME/1_accuweather/forecast_2015/wind_0.png -p 180,70 -s 80x80}
${goto 270}${execpi 600 sed -n '6p' $HOME/1_accuweather/curr_cond|awk '{print $1}'}
${goto 270}${execpi 600 sed -n '6p' $HOME/1_accuweather/curr_cond|awk '{print $2}'}
${color ffe595}HUMIDITY: $color${execpi 600 sed -n '7p' $HOME/1_accuweather/curr_cond}${goto 170}${color ffe595}PRESSURE: $color${alignr}${execpi 600 sed -n '8p' $HOME/1_accuweather/curr_cond}
${color ffe595}UV INDEX: $color${execpi 600 sed -n '9p' $HOME/1_accuweather/curr_cond} ${goto 170}${color ffe595}CLOUD COVER: $color${alignr}${execpi 600 sed -n '10p' $HOME/1_accuweather/curr_cond}
${color ffe595}DEW POINT: $color${execpi 600 sed -n '12p' $HOME/1_accuweather/curr_cond}°${goto 170}${color ffe595}VISIBILITY: $color${alignr}${execpi 600 sed -n '13p' $HOME/1_accuweather/curr_cond}
${color ffe595}SUN R/S: $color${execpi 600 sed -n '23p' $HOME/1_accuweather/curr_cond}/${execpi 600 sed -n '24p' $HOME/1_accuweather/curr_cond}${goto 170}${color ffe595}MOON R/S: ${alignr}$color${execpi 600 sed -n '25p' $HOME/1_accuweather/curr_cond}/${execpi 600 sed -n '26p' $HOME/1_accuweather/curr_cond}
${color ffe595}SUN DURAT.: $color${execpi 600 sed -n '16p' $HOME/1_accuweather/curr_cond}${goto 170}${color ffe595}MOON DURAT.: $color${alignr}${execpi 600 sed -n '20p' $HOME/1_accuweather/curr_cond}
${hr 1}
${goto 25}${font Arial:size=10}${color ffe595}${execpi 600 sed -n '1p' $HOME/1_accuweather/first_days}${goto 125}${execpi 600 sed -n '6p' $HOME/1_accuweather/first_days}${goto 225}${execpi 600 sed -n '11p' $HOME/1_accuweather/first_days}$color${font}${image $HOME/1_accuweather/forecast_2015/forecast_1.png -p 0,240 -s 83x50}${image $HOME/1_accuweather/forecast_2015/forecast_2.png -p 100,240 -s 83x50}${image $HOME/1_accuweather/forecast_2015/forecast_3.png -p 200,240 -s 83x50}
${goto 95}${execpi 600 sed -n '3p' $HOME/1_accuweather/first_days}°${goto 195}${execpi 600 sed -n '8p' $HOME/1_accuweather/first_days}°${goto 295}${execpi 600 sed -n '13p' $HOME/1_accuweather/first_days}°
${goto 95}/${execpi 600 sed -n '4p' $HOME/1_accuweather/first_days}°${goto 195}/${execpi 600 sed -n '9p' $HOME/1_accuweather/first_days}°${goto 295}/${execpi 600 sed -n '14p' $HOME/1_accuweather/first_days}°
${font Arial:size=8}${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|cut -c1-17}${goto 110}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|cut -c1-17}${goto 220}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|cut -c1-17}
${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|cut -c18-34}${goto 110}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|cut -c18-34}${goto 220}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|cut -c18-34}
${hr 1}
${color ffe595}${execpi 600 sed -n '16p' $HOME/1_accuweather/first_days}${goto 90}${execpi 600 sed -n '21p' $HOME/1_accuweather/first_days}${goto 165}${execpi 600 sed -n '1p' $HOME/1_accuweather/last_days}${goto 245}${execpi 600 sed -n '6p' $HOME/1_accuweather/last_days}$color${image $HOME/1_accuweather/forecast_2015/forecast_4.png -p 0,345 -s 50x30}${image $HOME/1_accuweather/forecast_2015/forecast_5.png -p 75,345 -s 50x30}${image $HOME/1_accuweather/forecast_2015/forecast_6.png -p 150,345 -s 50x30}${image $HOME/1_accuweather/forecast_2015/forecast_7.png -p 225,345 -s 50x30}
${goto 65}${execpi 600 sed -n '18p' $HOME/1_accuweather/first_days}°${goto 142}${execpi 600 sed -n '23p' $HOME/1_accuweather/first_days}°${goto 219}${execpi 600 sed -n '3p' $HOME/1_accuweather/last_days}°${goto 295}${execpi 600 sed -n '8p' $HOME/1_accuweather/last_days}°
${goto 65}/${execpi 600 sed -n '19p' $HOME/1_accuweather/first_days}°${goto 142}/${execpi 600 sed -n '24p' $HOME/1_accuweather/first_days}°${goto 219}/${execpi 600 sed -n '4p' $HOME/1_accuweather/last_days}°${goto 295}/${execpi 600 sed -n '9p' $HOME/1_accuweather/last_days}°