You are not logged in.
keine problem
it must be installed
bc
gnuplot
conkyrc
conky.config = {
background = true,
use_xft = true,
font = 'Liberation Sans:size=7',
xftalpha = 1,
update_interval = 1.0,
total_run_times = 0,
own_window = true,
own_window_transparent = true,
--own_window_color 000000
own_window_argb_visual = true,
--own_window_argb_value = 250,
own_window_type = 'normal',
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
double_buffer = true,
minimum_width = 410, minimum_height = 210,
maximum_width = 410,
text_buffer_size = 2048,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
default_color = 'white',
default_outline_color = 'white',
alignment = 'top_left',
gap_x = 310,
gap_y = 160,
no_buffers = true,
uppercase = false,
cpu_avg_samples = 2,
override_utf8_locale = true,
imlib_cache_flush_interval = 60,
imlib_cache_size = 10000,
-- Taille des pointillés
stippled_borders = 5,
-- Couleurs
default_color = '#ffffff',--ffd579
default_shade_color = '#333333',
default_outline_color = 'black',
lua_load = '~/.conky/lua/image.lua',
color1 = 'F5B800',
color2 = '00f5ff',
color3 = '828200',
color4 = '323200',
};
conky.text = [[
${voffset 1}${goto 100}${font Ubuntu:style=Bold:size=10}Pression Atmospherique
${if_gw}${execi 1200 bash ~/.conky/barographe/barognuplot.sh}${endif}#
${image ~/.conky/barographe/graph.png -s 255x120 -p 50,10 -n}#
${font Ubuntu:style=Bold:size=8}#
${voffset 06}${goto 50}${color1} 40 ° ${goto 290}${color2}1040mb
${voffset 04}${goto 50}${color1} 20 ° ${goto 290}${color2}1020mb
${voffset 04}${goto 50}${color1} 0 ° ${goto 290}${color2}1000mb
${voffset 04}${goto 50}${color1}-10 ° ${goto 290}${color2} 980mb
${voffset 04}${goto 50}${color1}-20 ° ${goto 290}${color2} 960mb
${lua fDrawImage ~/.conky/barographe/base.png 66 18 228 97}
${lua fDrawImage ~/.conky/barographe/white.png 74 114 214 12}
${voffset -800}
]];
barognuplot.sh
#!/bin/bash
## files
LOG="$HOME/.conky/barographe/ListePression.log"
GRAPH="$HOME/.conky/barographe/graph.png"
## Verifier argument
##Infos generales
DATE=$(date +"%s")
DATE1WEEK=$(date --date="1 week ago" +"%s")
# liste des dates de releve du fichier log
EPOCH=()
while read
do
EPOCH+=( "$REPLY" )
done< <(awk '{print $1}' "$LOG")
# si le fichier existe et contient des valeurs de plus d'une semaine (premiere = plus vieille)
#supprimer premiere valeur
[[ -f $LOG ]] && {
for i in $(seq 0 $(($(wc -l < $LOG)-1)))
do
[[ $DATE1WEEK -gt ${EPOCH[$i]} ]] && sed -i '1d' $LOG || break
done
}
## Conversion en hectopascal et soustraction de la pression moyenne pour ramener l'axe a zero
PR_HP=`sed -n '8p' $HOME/1_accuweather/curr_cond | cut -c1-4`
TEMP=`sed -n '2p' $HOME/1_accuweather/curr_cond`
PR_CALC=$(bc << EOF
scale=0
$PR_HP - 1000
EOF
)
echo "$DATE $PR_CALC $TEMP" >> $LOG
gnuplot <<EOF
set border linewidth 2.5
set terminal png enhanced size 300,170 transparent #font "Ubuntu,10" 400,350
set term png font "URW Chancery L:style=Bold,14"
set output "$GRAPH"
unset key
set grid
set xzeroaxis lt 3 lw 1
set yzeroaxis
set ytics ("" -40, "" -20, "" 20, "" 40)
set mxtics 0
set xdata time
set timefmt "%s"
set xtics 86400
set format x "%d"
set style line 1 lw 3
set style line 2 lw 3
plot ["$DATE1WEEK":"$DATE"] [-40:50] "$LOG" using 1:3 with lines ls 2, "$LOG" using 1:2 with lines ls 1
EOF
exit 0
@+
Last edited by loutch (2019-03-28 16:06:10)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
@loutch,
as always, this looks very good with the easysid wallpaper.
The images pack unfortunately does not contain the required graph.png
I found this in my archive, derivantArt, at @shamen. I suppose it's the same.
I rewrote the configuration file for the friends of Syntax1.9, adapted it and took the original size of the graph.png image.
#configuration @loutch https://forums.bunsenlabs.org/viewtopic.php?pid=84679#p84679
#modifikation @unklar 28-3-2019
background yes
use_xft yes
xftfont Liberation Sans:size=7
xftalpha 1.0
update_interval 1
total_run_times 0
own_window yes
own_window_transparent yes
#own_window_color 000000
own_window_argb_visual yes
#own_window_argb_value 250
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
#alignment top_left
alignment br
minimum_size 410 210
maximum_width 410
gap_x 10
gap_y 360
no_buffers yes
double_buffer yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
imlib_cache_flush_interval 60
imlib_cache_size 10000
stippled_borders 5
default_color ffffff #ffd579
default_shade_color 333333
default_outline_color black
color1 F5B800
color2 00f5ff
color3 828200
color4 323200
#--LUA--#
lua_load ~/LUA/image.lua
TEXT
${alignc 30}${font monofur:size=12}Pressure
${if_gw}${execi 1200 bash ~/.conky/barograph_loutch/barognuploth.sh}${endif}
${image ~/.conky/barograph_loutch/images/graph.png -s 300x170 -p 50,10 -n}\
${font monofur:size=10}${voffset -8}${goto 50}${color1} 40° ${goto 335}${color2}1040 mb
${voffset 10}${goto 50}${color1} 20° ${goto 335}${color2}1020 mb
${voffset 12}${goto 50}${color1} 0° ${goto 335}${color2}1000 mb
${voffset 12}${goto 50}${color1}-10° ${goto 335}${color2} 980 mb
${voffset 12}${goto 50}${color1}-20° ${goto 335}${color2} 960 mb
${lua fDrawImage ~/.conky/barograph_loutch/images/base.png 66 18 228 97}
${lua fDrawImage ~/.conky/barograph_loutch/images/white.png 70 160 250 12}
#${voffset -800}
The terminal shows me the error
Conky: '/home/unklar/.conky/barograph_loutch/conkyrc9' modified, reloading...
Conky: desktop window (4a4) is root window
Conky: window type - normal
Conky: drawing to created window (0x3800002)
Conky: drawing to double buffer
gnuplot> set mxtics 0
^
line 0: warning: Expecting number of intervals
If I change the value from 0 to 1, the error is gone.
Nevertheless it seems to me that I have no output in the Conky...
Last edited by unklar (2019-03-28 21:01:42)
Offline
Hello
I have the same error in terminal .
The first day i launched the conky i saw nothing .The listepression.log had just 1-2-3 line also hou have just 1-2-3 little points in the graph.png.
the graph.png is made by the script .
here my graph.png after 2 days
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Offline
Hello
here my complete weather-station in conky 1.10 & accuweather
(The problem with this version for 1 conky i must have 3 conkyrc (lua))
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Your "weather station" is excellent
(The problem with this version for 1 conky i must have 3 conkyrc (lua)
I know the problem with the "round corners" in 1.10
manuel-909 had shown some "templates" in the "Show us your conky" thread.
loutch, for the left map I have this address in the script
https://neige.meteociel.fr/satellite/latest-ir-color.gif
I can't find the address for the right card. Can you help me out with that?
Offline
no problem
here the adress
https://www.sat24.com/image.ashx?country=eu&type=zoom&format=640x480001001&rnd=610703
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Following my post #2339 I find a way to align vertical position with a script lua.
The conky:
conky.config = {
background = false,
use_xft = true,
font = 'DejaVuSansMono:size=8',
update_interval = 300.0,
total_run_times = 0,
own_window = true,
own_window_type = 'dock',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = true,
stippled_borders = 8,
border_inner_margin = 4,
alignment = 'top_left',
minimum_width = 390,
minimum_height = 900,
gap_x = 130,
gap_y = 30,
no_buffers = false,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
use_spacer = right,
text_buffer_size = 6144,
imlib_cache_size = 8192,
default_outline_color = '000000',
color1 = 'F5B800',
color2 = '00f5ff',
color3 = '005fff',
color4 = 'ff4500',
lua_load = '/home/dominique/conky-meteo-dark_sky/date_position.lua',
lua_draw_hook_pre = 'date_position',
}
conky.text = [[
${color2}${goto 90}${font DejaVuSansMono:bold:size=10}Prévisions semaine${font}
${image ~/conky-meteo-dark_sky/d1.png -p -1,35 -s 53x32}
${image ~/conky-meteo-dark_sky/d2.png -p -1,105 -s 53x32}
${image ~/conky-meteo-dark_sky/d3.png -p -1,175 -s 53x32}
${image ~/conky-meteo-dark_sky/d4.png -p -1,245 -s 53x32}
${image ~/conky-meteo-dark_sky/d5.png -p -1,315 -s 53x32}
${image ~/conky-meteo-dark_sky/d6.png -p -1,385 -s 53x32}
${image ~/conky-meteo-dark_sky/d7.png -p -1,455 -s 53x32}
${image ~/conky-meteo-dark_sky/d8.png -p -1,525 -s 53x32}
]]
And the script date_position.lua:
--[[Conky et lua pour afficher les heures de lever, coucher et zénith du soleil.
]]
require 'cairo'
require 'imlib2'
function conky_date_position()
if conky_window == nil then return end
local text_color={13,206,232}
local text_d= conky_parse("${exec date '+%A %d %B'}")
local text_d1= conky_parse("${exec date '+%A %d %B' --date '1 days'}")
local text_d2= conky_parse("${exec date '+%A %d %B' --date '2 days'}")
local text_d3= conky_parse("${exec date '+%A %d %B' --date '3 days'}")
local text_d4= conky_parse("${exec date '+%A %d %B' --date '4 days'}")
local text_d5= conky_parse("${exec date '+%A %d %B' --date '5 days'}")
local text_d6= conky_parse("${exec date '+%A %d %B' --date '6 days'}")
local text_d7= conky_parse("${exec date '+%A %d %B' --date '7 days'}")
local text_p0= conky_parse("${exec jq --raw-output '.daily.data[0].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
local text_p01= conky_parse("${exec jq --raw-output '.daily.data[0].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
local text_p1= conky_parse("${exec jq --raw-output '.daily.data[1].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
local text_p11= conky_parse("${exec jq --raw-output '.daily.data[1].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
local text_p2= conky_parse("${exec jq --raw-output '.daily.data[2].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
local text_p21= conky_parse("${exec jq --raw-output '.daily.data[2].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
local text_p3= conky_parse("${exec jq --raw-output '.daily.data[3].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
local text_p31= conky_parse("${exec jq --raw-output '.daily.data[3].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
local text_p4= conky_parse("${exec jq --raw-output '.daily.data[4].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
local text_p41= conky_parse("${exec jq --raw-output '.daily.data[4].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
local text_p5= conky_parse("${exec jq --raw-output '.daily.data[5].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
local text_p51= conky_parse("${exec jq --raw-output '.daily.data[5].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
local text_p6= conky_parse("${exec jq --raw-output '.daily.data[6].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
local text_p61= conky_parse("${exec jq --raw-output '.daily.data[6].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
local text_p7= conky_parse("${exec jq --raw-output '.daily.data[7].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
local text_p71= conky_parse("${exec jq --raw-output '.daily.data[7].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
local text_th0= conky_parse("${exec jq --raw-output '.daily.data[0].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
local text_th1= conky_parse("${exec jq --raw-output '.daily.data[1].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
local text_th2= conky_parse("${exec jq --raw-output '.daily.data[2].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
local text_th3= conky_parse("${exec jq --raw-output '.daily.data[3].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
local text_th4= conky_parse("${exec jq --raw-output '.daily.data[4].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
local text_th5= conky_parse("${exec jq --raw-output '.daily.data[5].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
local text_th6= conky_parse("${exec jq --raw-output '.daily.data[6].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
local text_th7= conky_parse("${exec jq --raw-output '.daily.data[7].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
local text_tm0= conky_parse("${exec jq --raw-output '.daily.data[0].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
local text_tm1= conky_parse("${exec jq --raw-output '.daily.data[1].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
local text_tm2= conky_parse("${exec jq --raw-output '.daily.data[2].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
local text_tm3= conky_parse("${exec jq --raw-output '.daily.data[3].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
local text_tm4= conky_parse("${exec jq --raw-output '.daily.data[4].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
local text_tm5= conky_parse("${exec jq --raw-output '.daily.data[5].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
local text_tm6= conky_parse("${exec jq --raw-output '.daily.data[6].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
local text_tm7= conky_parse("${exec jq --raw-output '.daily.data[7].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
--Police à utiliser
local font= "DejaVuSansMono-Bold"
local font_size= 14
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
conky_window.visual, conky_window.width,conky_window.height)
cr=cairo_create(cs)
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr, font_size)
cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
cairo_move_to (cr, 100.0, 60.0)
cairo_show_text (cr, text_d)
cairo_move_to (cr, 100.0, 130.0)
cairo_show_text (cr, text_d1)
cairo_move_to (cr, 100.0, 200.0)
cairo_show_text (cr, text_d2)
cairo_move_to (cr, 100.0, 270.0)
cairo_show_text (cr, text_d3)
cairo_move_to (cr, 100.0, 340.0)
cairo_show_text (cr, text_d4)
cairo_move_to (cr, 100.0, 410.0)
cairo_show_text (cr, text_d5)
cairo_move_to (cr, 100.0, 480.0)
cairo_show_text (cr, text_d6)
cairo_move_to (cr, 100.0, 550.0)
cairo_show_text (cr, text_d7)
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
conky_window.visual, conky_window.width,conky_window.height)
cr=cairo_create(cs)
local font1= "DejaVuSansMono"
local font1_size= 11
local text_color={233,149,3}
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
conky_window.visual, conky_window.width,conky_window.height)
cr=cairo_create(cs)
cairo_select_font_face (cr, font1, CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr, font1_size)
cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
cairo_move_to (cr, 20.0, 80.0)
cairo_show_text (cr, text_p0)
cairo_move_to (cr, 20.0, 90.0)
cairo_show_text (cr, text_p01)
cairo_move_to (cr, 20.0, 150.0)
cairo_show_text (cr, text_p1)
cairo_move_to (cr, 20.0, 160.0)
cairo_show_text (cr, text_p11)
cairo_move_to (cr, 20.0, 220.0)
cairo_show_text (cr, text_p2)
cairo_move_to (cr, 20.0, 230.0)
cairo_show_text (cr, text_p21)
cairo_move_to (cr, 20.0, 290.0)
cairo_show_text (cr, text_p3)
cairo_move_to (cr, 20.0, 300.0)
cairo_show_text (cr, text_p31)
cairo_move_to (cr, 20.0, 360.0)
cairo_show_text (cr, text_p4)
cairo_move_to (cr, 20.0, 370.0)
cairo_show_text (cr, text_p41)
cairo_move_to (cr, 20.0, 430.0)
cairo_show_text (cr, text_p5)
cairo_move_to (cr, 20.0, 440.0)
cairo_show_text (cr, text_p51)
cairo_move_to (cr, 20.0, 500.0)
cairo_show_text (cr, text_p6)
cairo_move_to (cr, 20.0, 510.0)
cairo_show_text (cr, text_p61)
cairo_move_to (cr, 20.0, 570.0)
cairo_show_text (cr, text_p7)
cairo_move_to (cr, 20.0, 580.0)
cairo_show_text (cr, text_p71)
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
conky_window.visual, conky_window.width,conky_window.height)
cr=cairo_create(cs)
local font2= "DejaVuSansMono"
local font2_size= 10
local text_color={200,6,19}
cr=cairo_create(cs)
cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr, font2_size)
cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
cairo_move_to (cr, 40.0, 110.0)
cairo_show_text (cr, "Temp Max : ")
cairo_move_to (cr, 105.0, 110.0)
cairo_show_text (cr, text_th0)
cairo_move_to (cr, 40.0, 180.0)
cairo_show_text (cr, "Temp Max : ")
cairo_move_to (cr, 105.0, 180.0)
cairo_show_text (cr, text_th1)
cairo_move_to (cr, 40.0, 250.0)
cairo_show_text (cr, "Temp Max : ")
cairo_move_to (cr, 105.0, 250.0)
cairo_show_text (cr, text_th2)
cairo_move_to (cr, 40.0, 320.0)
cairo_show_text (cr, "Temp Max : ")
cairo_move_to (cr, 105.0, 320.0)
cairo_show_text (cr, text_th3)
cairo_move_to (cr, 40.0, 390.0)
cairo_show_text (cr, "Temp Max : ")
cairo_move_to (cr, 105.0, 390.0)
cairo_show_text (cr, text_th4)
cairo_move_to (cr, 40.0, 460.0)
cairo_show_text (cr, "Temp Max : ")
cairo_move_to (cr, 105.0, 460.0)
cairo_show_text (cr, text_th5)
cairo_move_to (cr, 40.0, 530.0)
cairo_show_text (cr, "Temp Max : ")
cairo_move_to (cr, 105.0, 530.0)
cairo_show_text (cr, text_th6)
cairo_move_to (cr, 40.0, 600.0)
cairo_show_text (cr, "Temp Max : ")
cairo_move_to (cr, 105.0, 600.0)
cairo_show_text (cr, text_th7)
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
conky_window.visual, conky_window.width,conky_window.height)
cr=cairo_create(cs)
local font2= "DejaVuSansMono"
local font2_size= 10
local text_color={11,191,200}
cr=cairo_create(cs)
cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr, font2_size)
cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
cairo_move_to (cr, 160.0, 110.0)
cairo_show_text (cr, "Temp Min : ")
cairo_move_to (cr, 230.0, 110.0)
cairo_show_text (cr, text_tm0)
cairo_move_to (cr, 140.0, 180.0)
cairo_show_text (cr, "Temp Min : ")
cairo_move_to (cr, 210.0, 180.0)
cairo_show_text (cr, text_tm1)
cairo_move_to (cr, 160.0, 250.0)
cairo_show_text (cr, "Temp Min : ")
cairo_move_to (cr, 230.0, 250.0)
cairo_show_text (cr, text_tm2)
cairo_move_to (cr, 160.0, 320.0)
cairo_show_text (cr, "Temp Min : ")
cairo_move_to (cr, 230.0, 320.0)
cairo_show_text (cr, text_tm3)
cairo_move_to (cr, 160.0, 390.0)
cairo_show_text (cr, "Temp Min : ")
cairo_move_to (cr, 230.0, 390.0)
cairo_show_text (cr, text_tm4)
cairo_move_to (cr, 160.0, 460.0)
cairo_show_text (cr, "Temp Min : ")
cairo_move_to (cr, 230.0, 460.0)
cairo_show_text (cr, text_tm5)
cairo_move_to (cr, 160.0, 530.0)
cairo_show_text (cr, "Temp Min : ")
cairo_move_to (cr, 230.0, 530.0)
cairo_show_text (cr, text_tm6)
cairo_move_to (cr, 160.0, 600.0)
cairo_show_text (cr, "Temp Min : ")
cairo_move_to (cr, 230.0, 600.0)
cairo_show_text (cr, text_tm7)
cairo_destroy(cr)
end
Offline
Hello
Théo
Is that possible in 1_accuweather script to change in curr_cond the pression
at line 8 i have this 1000.40 mb to this 1000
For another conky i use this line in a lua script
name='exec', arg='sed -n 8p $HOME/1_accuweather/curr_cond |cut -c1-4'
With 1000.1 1080.222 the lua work great but if the pressure is < to 1000 like this morning (998.40 mb)
the lua don't work because I have a point instead of the last number.
tanks
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Try adding the following code to the current conditions section of the script
round_press=$(printf "%.0f\n" $(sed -n 8p $HOME/1_accuweather/curr_cond|sed 's/ mb//'))
sed -i "8s/.*/$round_press/" $HOME/1_accuweather/curr_cond
It will replace the currect pressure with a rounded value.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
You also removes the "," in your code by adding that :
tr "," " "
name='exec', arg='sed -n 8p $HOME/1_accuweather/curr_cond |cut -c1-4' | tr "," " "
Last edited by chepioq (2019-04-04 07:42:36)
Offline
Don't change anything
here current conditions section
#current conditions
if [[ -s $HOME/1_accuweather/curr_cond_raw ]]; then
#retire le contenu du fichier qui ne se trouve pas entre la ligne contenant detail-now et Astronomy <span class
#MODIFICATION de Astronomy en Astronomie
sed -i '/detail-now/,/Astronomie <span class/!d' $HOME/1_accuweather/curr_cond_raw
#On envoie les lignes contenant les valeurs à récupérer dans curr_cond
#MODIFICATION de Humidity en Humidit
#MODIFICATION de Pressure en Pression
#MODIFICATION de UV Index en Indice UV
#MODIFICATION de Cloud Cover en Couverture nuageuse
#MODIFICATION de Ceiling en Plafond
#MODIFICATION de Dew Point en Point de ros
#MODIFICATION de Visibility en Visibilit
#MODIFICATION de Sunrise: en Lever du soleil:
#MODIFICATION de Sunset: en Lever du soleil:
#MODIFICATION de Moonrise: en Lever de lune:
#MODIFICATION de Moonset: en Coucher de lune:
egrep -i '"cond"|icon i-|large-temp|small-temp|wind-point|"wind"><strong>|Humidit|Pression|Indice UV|Couverture nuageuse|Plafond|Point de ros|Visibilit|Duration|Lever du soleil:|Coucher de soleil:|Lever de lune:|Coucher de lune:' $HOME/1_accuweather/curr_cond_raw > $HOME/1_accuweather/curr_cond
#AJOUT remplacement des accents
sed -i -e 's/\ê/ê/g' -e 's/\é/é/g' -e 's/\ô/ô/g' -e 's/\è/è/g' -e 's/\ç/ç/g' -e 's/\'/'"'"'/g' $HOME/1_accuweather/curr_cond
sed -i -e 's/NW/NO/g' -e 's/WNW/ONO/g' -e 's/NNW/NNO/g' -e 's/W/O/g' -e 's/SSW/SSO/g' -e 's/SW/SO/g' -e 's/WSW/OSO/g' -e 's/W/O/g' $HOME/1_accuweather/curr_cond
#nettoyage des lignes par la gauche
sed -i -e 's/^.*<strong>//g' -e 's/^.*<span>//g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*<\/em> //g' -e 's/^.*"cond">//g' -e 's/^.*wind-point //g' $HOME/1_accuweather/curr_cond
#nettoyage des lignes par la droite
sed -i -e 's/">.*$//g' -e 's/°.*$//g' -e 's/<\/span>.*$//g' -e 's/&#.*$//g' -e 's/ &darr.*$//g' -e 's/ &uarr.*$//g' -e 's/<\/strong>.*$//g' $HOME/1_accuweather/curr_cond
round_press=$(printf "%.0f\n" $(sed -n 8p $HOME/1_accuweather/curr_cond|sed 's/ mb//'))
sed -i "8s/.*/$round_press/" $HOME/1_accuweather/curr_cond#nettoyage de l'id icone
sed -i '1s/-.*$//' $HOME/1_accuweather/curr_cond
#affectation des valeurs du fichier curr_cond aux variables
image=$(sed -n 1p $HOME/1_accuweather/curr_cond)
echo $(test_image $image) >> $HOME/1_accuweather/curr_cond
sunrise_time=$(sed -n 14p $HOME/1_accuweather/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
sunrise_time=$(sed -n 15p $HOME/1_accuweather/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
sunrise_time=$(sed -n 18p $HOME/1_accuweather/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
sunrise_time=$(sed -n 19p $HOME/1_accuweather/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
wind=$(sed -n 5p $HOME/1_accuweather/curr_cond)
echo $(test_wind $wind) >> $HOME/1_accuweather/curr_cond
if (( $(sed -n 14p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
sed -i '14s/^/0/' $HOME/1_accuweather/curr_cond
fi
if (( $(sed -n 15p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
sed -i '15s/^/0/' $HOME/1_accuweather/curr_cond
fi
if (( $(sed -n 18p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
sed -i '18s/^/0/' $HOME/1_accuweather/curr_cond
fi
if (( $(sed -n 19p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
sed -i '19s/^/0/' $HOME/1_accuweather/curr_cond
fi
#création de l'image correspondante
if [[ $forecast2015 == 1 ]]; then
cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2015/forecast_0.png
cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n 5p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2015/wind_0.png
fi
if [[ $forecast2016 == 1 ]]; then
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2016/forecast_0.png
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 5p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2016/wind_0.png
fi
fi
# icone direction vent
wind_direction=$(sed -n 5p $HOME/1_accuweather/curr_cond)
if [[ $wind_direction == "S" ]]; then
cp $HOME/1_accuweather/vents/"02.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "South" ]]; then
cp $HOME/1_accuweatherI/vents/"02.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SSO" ]]; then
cp $HOME/1_accuweather/vents/"03.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SO" ]]; then
cp $HOME/1_accuweather/vents/"04.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "OSO" ]]; then
cp $HOME/1_accuweather/vents/"05.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "O" ]]; then
cp $HOME/1_accuweather/vents/"06.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "West" ]]; then
cp $HOME/1_accuweather/vents/"06.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "ONO" ]]; then
cp $HOME/1_accuweather/vents/"07.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NO" ]]; then
cp $HOME/1_accuweather/vents/"08.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NNO" ]]; then
cp $HOME/1_accuweather/vents/"09.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "N" ]]; then
cp $HOME/1_accuweather/vents/"10.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "North" ]]; then
cp $HOME/1_accuweather/vents/"10.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NNE" ]]; then
cp $HOME/1_accuweather/vents/"11.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NE" ]]; then
cp $HOME/1_accuweather/vents/"12.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "ENE" ]]; then
cp $HOME/1_accuweather/vents/"13.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "E" ]]; then
cp $HOME/1_accuweather/vents/"14.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "East" ]]; then
cp $HOME/1_accuweather/vents/"14.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "ESE" ]]; then
cp $HOME/1_accuweather/vents/"15.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SE" ]]; then
cp $HOME/1_accuweather/vents/"16.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SSE" ]]; then
cp $HOME/1_accuweather/vents/"17.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "Variable" ]]; then
cp $HOME/1_accuweather/vents/"00.png" $HOME/1_accuweather/Wind1.png
fi
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Try adding the commands at the end of the script then.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
At line 8 i have 0
Last edited by loutch (2019-04-04 08:03:49)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
What's the pressure before adding the commands?
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
990.40 mb
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
I tried it with my script, it changes 1016.00 mb to 1016.
Give it another try.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
Killall my conky
Launch them nothind in line 8 i have 0
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline