Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#2301 Le 06/02/2013, à 17:55

ragamatrix

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Didier-T a écrit :

autant pour moi j'ai oublié d'initialiser la variable.

 #!/usr/bin/perl
# Copyright (c) Laszlo Simon.
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or ( at your option) any later version.
#             
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#                            
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA)

# CONFIGURATION
##$explonation = 'true';        # true | false
##$explonation_place = 'south'; # east|north|west|south|norteast|...

# INIT
if (`xdpyinfo | grep dimensions` =~ /(\d+)x(\d+)\s+pixels/)
{
  ($width, $height) = ($1,$2);
}
else
{
  die("Can not determine screen resolution. Maybe 'xdpyinfo' not installed.\n");
}
  
$explonation_width = int($width * 2 / 3);
$explonation_height = int($width / 10);

if (system("wget --version"))
{
  die("'wget' should be installed.\n")
}

$img=""
do
{
  $date = sprintf("%02d",0+int(rand(8)))
        .sprintf("%02d",1+int(rand(12)))
        .sprintf("%02d",1+int(rand(28)));

  system("wget -O /tmp/apxxxxxx.html 'http://antwrp.gsfc.nasa.gov/apod/ap$date.html'");

  # Get image

  open HTML, "/tmp/apxxxxxx.html";
  $content = join('',(<HTML>));
  close HTML;

  $content =~ /\<a\s+href\=\"((?:\w+\/)*)(\w+)(\.\w+)\"\s*\>\s*\n*\s*\<img/ims;

  $path = $1;
  $img = $2;
  $ext = $3;
}
while ($img eq "");

`mkdir -p ~/wallpapers`;
print ">>>>http://antwrp.gsfc.nasa.gov/$path$img$ext\n";
system("wget -O ~/wallpapers/$img$ext 'http://antwrp.gsfc.nasa.gov/$path$img$ext'");

# Get text

#if (system("html2text -version"))
#{
#  warn("Explonation disabled. 'html2text' should be installed.\n");
#  $explonation = 'false';
#}

#if (system("convert -version"))
#{
#  warn("Explonation disabled. 'convert' (imagemagick) should be installed. \n");
#  $explonation = 'false';
#}


#if ($explonation eq 'true')
#{
#  system("html2text -style pretty -o /tmp/apxxxxxx.txt /tmp/apxxxxxx.html");
 
#  open TXT, "/tmp/apxxxxxx.txt";
#  $content = join('',(<TXT>));
#  close TXT;

#  $text = 
#    ($content =~ /Explanation:\s*(.*)\s*Tomorrow\'s picture:/s)
#    ? $1
#    : '';

#  print $text."\n";
  
#  $text =~ s/\n/ /g;

#  open TXT, ">/tmp/apxxxxxx-anno.txt";
#  print TXT $text;
#  close TXT;

#  system("convert ~/wallpapers/$img$ext "
#         ."-resize $width"."x$height\\> "
#         ."-size $width"."x$height xc:black +swap "
#         ."-gravity center "
#         ."-composite "
#         ."~/wallpapers/$img$ext"
#         );
         
#  system("convert "
#         ."-background '#0008' "
#         ."-fill white "
#         ."-gravity north "
#         ."-pointsize 20 "
#         ."-size $explonation_width"."x$explonation_height "
#         ."caption:\@/tmp/apxxxxxx-anno.txt "
#         ."~/wallpapers/$img$ext "
#          ."+swap -gravity $explonation_place -composite "
#         ."~/wallpapers/$img$ext"
#         );
#}

system("mv ~/wallpapers/$img$ext ~/wallpapers/image.jpg");  

Marche pas non plus, mais je crois que tu as un joli projet en route...
ça peut attendre

Hors ligne

#2302 Le 16/02/2013, à 20:50

kipof

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Bonsoir,

Une idée pourquoi ${nvidia temp} m'affiche plus la température du ma carte nVidia après un passage à 12.10 ?

Merci d'avance smile


ASUS G53SW - Ubuntu Gnome Shell 16.04.2 LTS 64 Bits
Inspiron 15 série 3000 - Ubuntu Gnome Shell 16.04.2 LTS 64 Bits

Hors ligne

#2303 Le 16/02/2013, à 23:00

Didier-T

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

@ ragamatrix,

ton code pour les images, j'en ai profité pour supprimer l'utilisation de wget, et limiter le chargement aux seuls images jpg
testé cher moi, sa fonctionne

 #!/usr/bin/perl
# Copyright (c) Laszlo Simon.
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or ( at your option) any later version.
#             
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#                            
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA)

# CONFIGURATION
##$explonation = 'true';        # true | false
##$explonation_place = 'south'; # east|north|west|south|norteast|...

# INIT
use LWP::Simple; 
$repsauv = "~/wallpapers";

if (`xdpyinfo | grep dimensions` =~ /(\d+)x(\d+)\s+pixels/)
{
  ($width, $height) = ($1,$2);
}
else
{
  die("Can not determine screen resolution. Maybe 'xdpyinfo' not installed.\n");
}
  
$explonation_width = int($width * 2 / 3);
$explonation_height = int($width / 10);

#if (system("wget --version"))
#{
#  die("'wget' should be installed.\n")
#}


for ($i=1; $i<=10; $i++)
{
  $date = sprintf("%02d",0+int(rand(8)))
        .sprintf("%02d",1+int(rand(12)))
        .sprintf("%02d",1+int(rand(28)));

  $content = get("http://antwrp.gsfc.nasa.gov/apod/ap$date.html" );

  $content =~ /\<a\s+href\=\"((?:\w+\/)*)(\w+)(\.\w+)\"\s*\>\s*\n*\s*\<img/ims;

  $path = $1;
  $img = $2;
  $ext = $3;
  if ($ext eq ".jpg")
  {
    last;
  }
}

my $home = $ENV{'HOME'};
$repsauv =~ s/~/$home/;

if (!-e "$repsauv")
{
  mkdir ("$repsauv");
}

print ">>>>http://antwrp.gsfc.nasa.gov/$path$img$ext\n";
my $imag = get("http://antwrp.gsfc.nasa.gov/$path$img$ext");
open(SORTIE, ">$repsauv/image$ext");
binmode(SORTIE);
print SORTIE $imag;
close(SORTIE);

#system("wget -q -O ~/wallpapers/$img$ext 'http://antwrp.gsfc.nasa.gov/$path$img$ext'");

# Get text

#if (system("html2text -version"))
#{
#  warn("Explonation disabled. 'html2text' should be installed.\n");
#  $explonation = 'false';
#}

#if (system("convert -version"))
#{
#  warn("Explonation disabled. 'convert' (imagemagick) should be installed. \n");
#  $explonation = 'false';
#}


#if ($explonation eq 'true')
#{
#  system("html2text -style pretty -o /tmp/apxxxxxx.txt /tmp/apxxxxxx.html");
 
#  open TXT, "/tmp/apxxxxxx.txt";
#  $content = join('',(<TXT>));
#  close TXT;

#  $text = 
#    ($content =~ /Explanation:\s*(.*)\s*Tomorrow\'s picture:/s)
#    ? $1
#    : '';

#  print $text."\n";
  
#  $text =~ s/\n/ /g;

#  open TXT, ">/tmp/apxxxxxx-anno.txt";
#  print TXT $text;
#  close TXT;

#  system("convert ~/wallpapers/$img$ext "
#         ."-resize $width"."x$height\\> "
#         ."-size $width"."x$height xc:black +swap "
#         ."-gravity center "
#         ."-composite "
#         ."~/wallpapers/$img$ext"
#         );
         
#  system("convert "
#         ."-background '#0008' "
#         ."-fill white "
#         ."-gravity north "
#         ."-pointsize 20 "
#         ."-size $explonation_width"."x$explonation_height "
#         ."caption:\@/tmp/apxxxxxx-anno.txt "
#         ."~/wallpapers/$img$ext "
#          ."+swap -gravity $explonation_place -composite "
#         ."~/wallpapers/$img$ext"
#         );
#}

#system("mv ~/wallpapers/$img$ext ~/wallpapers/image.jpg");  

Edit: pour le fun tout est en perl (plus d'appel système)

Dernière modification par Didier-T (Le 17/02/2013, à 08:12)

Hors ligne

#2304 Le 18/02/2013, à 10:17

ragamatrix

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

@Didier-T
Merci !!
ç'est  classe ! je testerais, un peu plus de temps bientôt !

Hors ligne

#2305 Le 19/02/2013, à 11:39

ragamatrix

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Didier-T a écrit :

@ ragamatrix,

ton code pour les images, j'en ai profité pour supprimer l'utilisation de wget, et limiter le chargement aux seuls images jpg
testé cher moi, sa fonctionne

 #!/usr/bin/perl
# Copyright (c) Laszlo Simon.
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or ( at your option) any later version.
#             
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#                            
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA)

# CONFIGURATION
##$explonation = 'true';        # true | false
##$explonation_place = 'south'; # east|north|west|south|norteast|...

# INIT
use LWP::Simple; 
$repsauv = "~/wallpapers";

if (`xdpyinfo | grep dimensions` =~ /(\d+)x(\d+)\s+pixels/)
{
  ($width, $height) = ($1,$2);
}
else
{
  die("Can not determine screen resolution. Maybe 'xdpyinfo' not installed.\n");
}
  
$explonation_width = int($width * 2 / 3);
$explonation_height = int($width / 10);

#if (system("wget --version"))
#{
#  die("'wget' should be installed.\n")
#}


for ($i=1; $i<=10; $i++)
{
  $date = sprintf("%02d",0+int(rand(8)))
        .sprintf("%02d",1+int(rand(12)))
        .sprintf("%02d",1+int(rand(28)));

  $content = get("http://antwrp.gsfc.nasa.gov/apod/ap$date.html" );

  $content =~ /\<a\s+href\=\"((?:\w+\/)*)(\w+)(\.\w+)\"\s*\>\s*\n*\s*\<img/ims;

  $path = $1;
  $img = $2;
  $ext = $3;
  if ($ext eq ".jpg")
  {
    last;
  }
}

my $home = $ENV{'HOME'};
$repsauv =~ s/~/$home/;

if (!-e "$repsauv")
{
  mkdir ("$repsauv");
}

print ">>>>http://antwrp.gsfc.nasa.gov/$path$img$ext\n";
my $imag = get("http://antwrp.gsfc.nasa.gov/$path$img$ext");
open(SORTIE, ">$repsauv/image$ext");
binmode(SORTIE);
print SORTIE $imag;
close(SORTIE);

#system("wget -q -O ~/wallpapers/$img$ext 'http://antwrp.gsfc.nasa.gov/$path$img$ext'");

# Get text

#if (system("html2text -version"))
#{
#  warn("Explonation disabled. 'html2text' should be installed.\n");
#  $explonation = 'false';
#}

#if (system("convert -version"))
#{
#  warn("Explonation disabled. 'convert' (imagemagick) should be installed. \n");
#  $explonation = 'false';
#}


#if ($explonation eq 'true')
#{
#  system("html2text -style pretty -o /tmp/apxxxxxx.txt /tmp/apxxxxxx.html");
 
#  open TXT, "/tmp/apxxxxxx.txt";
#  $content = join('',(<TXT>));
#  close TXT;

#  $text = 
#    ($content =~ /Explanation:\s*(.*)\s*Tomorrow\'s picture:/s)
#    ? $1
#    : '';

#  print $text."\n";
  
#  $text =~ s/\n/ /g;

#  open TXT, ">/tmp/apxxxxxx-anno.txt";
#  print TXT $text;
#  close TXT;

#  system("convert ~/wallpapers/$img$ext "
#         ."-resize $width"."x$height\\> "
#         ."-size $width"."x$height xc:black +swap "
#         ."-gravity center "
#         ."-composite "
#         ."~/wallpapers/$img$ext"
#         );
         
#  system("convert "
#         ."-background '#0008' "
#         ."-fill white "
#         ."-gravity north "
#         ."-pointsize 20 "
#         ."-size $explonation_width"."x$explonation_height "
#         ."caption:\@/tmp/apxxxxxx-anno.txt "
#         ."~/wallpapers/$img$ext "
#          ."+swap -gravity $explonation_place -composite "
#         ."~/wallpapers/$img$ext"
#         );
#}

#system("mv ~/wallpapers/$img$ext ~/wallpapers/image.jpg");  

Edit: pour le fun tout est en perl (plus d'appel système)

Testé, Adopté, et Labellisé Didier-T Une norme de grande qualité !
Merci wink

Hors ligne

#2306 Le 20/02/2013, à 09:28

waca

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Bonjour à tou(te)s,

Je cherche à avoir 3 infos sur un pc distant (internet), dont j'ai accès en ssh :
Les :
who
last machin (machin étant le nom d'un user en particulier)
df -h

Merci d'avance de vos aides.

Waca

Hors ligne

#2307 Le 22/02/2013, à 00:24

los_tintinos

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

bonsoir,
je poste mon conky qui me fait meteo, infos diverses, rss et gmail.

	# -- Conky settings -- #
	background yes
	update_interval 1

	cpu_avg_samples 2
	net_avg_samples 2

	override_utf8_locale yes

	double_buffer yes
	no_buffers yes

	text_buffer_size 2048
	# -- Window specifications -- #
	own_window_title Meteo
	own_window yes
	own_window_type normal
	own_window_transparent yes
	own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

	border_inner_margin 0
	border_outer_margin 0

	minimum_size 450 750
	maximum_width 450
	

	alignment tr
	gap_x 
	gap_y -10

	# -- Graphics settings -- #
	draw_shades no
	draw_outline no
	draw_borders no
	draw_graph_borders yes

	# -- Text settings -- #
	use_xft yes
	xftfont MaiandraGD:size=24
	xftalpha 0.4

	uppercase no

	default_color 8b8b8b

	# -- Déclaration template -- #
	template0 ${image /home/seb/conky/images/\1 -p \2 -s \3} # -- images fond -- #
	template1 ${lua Meteo_\1 \2 \3 \4 \5 \6}
	template2 ${lua_parse Meteo_\1 \2 \3 \4 60 \5}
	template3 ${lua Lune_\1}
	lua_load ~/conky/Scripts/meteo2.lua
	lua_startup_hook init ~/conky/Scripts/meteo.cfg
	lua_load     ~/conky/conkyscripts/Clic_info.lua

TEXT

#### Lancement du script récupérant les données météo ####
${template1 Maj}
#### Premier cadre ####
##### Heure #####
${voffset -55}${font LED_mono :style=Medium:size=60}${color 434343}${goto 30}${time %H}${goto 140}${time %M}${font LED_mono :size=25:style=Medium}${color 808080}${goto 235}
##### Heure mise à jour #####
${voffset 0}${color white}${font Helvetica LT Std :size=8}${goto 60}Dernière mise à jour : ${template1 Heure}h${template1 Minute}
##### Date et Saints du jour #####
${voffset -65}${color white}${font Helvetica LT Std :size=12:style=Bold}${goto 230}${exec date "+%A %d %B %Y"|sed 's/^.\| [a-z]/\U&/g'}
##### Affichage infos vent ######
${voffset 20}${color white}${font Helvetica LT Std:style=Bold:size=9}${goto 330}Vent : ${template1 VentDirP}          
${color white}${font Helvetica LT Std:style=Bold:size=9}${goto 330}Vitesse : ${template1 VentForce} km/h
${goto 330}Pluie : ${template1 Jour_NivPrec 1} mm
##### ville #####
${voffset -5}${goto 50}${font Helvetica LT Std :size=10 style:bold}${color white}${template1 Ville} : ${font Helvetica LT Std :size=10}${color white}${template1  CondMeteo}${font Helvetica LT Std :size=10} / ${template1 TempAct}°C

##### Affichage temperature #####
${voffset -10}${goto 32}${font Ubuntu :size=8:style=bold}${color red}${template1 Jour_Temp 2}°${color white}/${color lightblue}${template1 Nuit_Temp 2}°${goto 110}${color red}${template1 Jour_Temp 3}°${color white}/${color lightblue}${template1 Nuit_Temp 3}°${goto 185}${color red}${template1 Jour_Temp 4}°${color white}/${color lightblue}${template1 Nuit_Temp 4}°${goto 260}${color red}${template1 Jour_Temp 5}°${color white}/${color lightblue}${template1 Nuit_Temp 5}°${goto 335}${color red}${template1 Jour_Temp 6}°${color white}/${color lightblue}${template1 Nuit_Temp 6}°${goto 410}${color red}${template1 Jour_Temp 7}°${color white}/${color lightblue}${template1 Nuit_Temp 7}°
##### Affichage vitesse du vent #####
${font Ubuntu :size=8:style=bold}${color white}${goto 35}${voffset 37}${template1 Jour_VentForce 2}${font Ubuntu :size=6:style=bold} km/h${goto 110}${voffset -2}${font Ubuntu :size=8:style=bold}${template1 Jour_VentForce 3}${font Ubuntu :size=6:style=bold} km/h${goto 185}${voffset -2}${font Ubuntu :size=8:style=bold}${template1 Jour_VentForce 4}${font Ubuntu :size=6:style=bold} km/h${goto 260}${voffset -2}${font Ubuntu :size=8:style=bold}${template1 Jour_VentForce 5}${font Ubuntu :size=6:style=bold} km/h${font Ubuntu :size=8:style=bold}${goto 335}${voffset -2}${template1 Jour_VentForce 6}${font Ubuntu :size=6:style=bold} km/h${font Ubuntu :size=8:style=bold}${goto 410}${voffset -2}${template1 Jour_VentForce 7}${font Ubuntu :size=6:style=bold} km/h
##### Affichage Date et les saints#####
${font Ubuntu :size=10}${color white}${goto 27}${template1 Jour %a_%d 2}${goto 100}${template1 Jour %a_%d 3}${goto 170}${template1 Jour %a_%d 4}${goto 250}${template1 Jour %a_%d 5}${goto 320}${template1 Jour %a_%d 6}${goto 400}${template1 Jour %a_%d 7}
${voffset -172}${color1}${font Helvetica LT Std :size=10}${goto 235}Aujourd'hui St.${color1}${font Helvetica LT Std :size=10}${exec /home/seb/conky/conkyscripts/Saints}

#### Affichage des cadres utilisés dans le conky ####
${voffset -55}
#### premier cadre ####
${template0 base.png 0,40 450x110}
${template0 flip_bg.png 24,10 100x100}
${template0 flip_bg.png 134,10 100x100}
#### Second cadre ####
${template0 base.png 0,155 450x80}
#### icônes premier cadre ####
${template2 IconeM /home/seb/conky/icones 220,75 132x79}
#### icônes Second cadre ####
${template2 Jour_IconeM /home/seb/conky/icones 5,165 86x52 2}
${template2 Jour_IconeM /home/seb/conky/icones 80,165 86x52 3}
${template2 Jour_IconeM /home/seb/conky/icones 155,165 86x52 4}
${template2 Jour_IconeM /home/seb/conky/icones 230,165 86x52 5}
${template2 Jour_IconeM /home/seb/conky/icones 305,165 86x52 6}
${template2 Jour_IconeM /home/seb/conky/icones 380,165 86x52 7}

##Conky Systeme##
${color whitesmoke}${voffset -25}${font Helvetica LT Std :size=8:weight=bold}${goto 180}Process${goto 275}MEM${goto 340}CPU
${font Helvetica LT Std :size=8}${goto 180}${top name 1}${goto 270}${top mem 1}%${goto 330}${top cpu 1}%
${goto 180}${top name 2}${goto 270}${top mem 2}%${goto 330}${top cpu 2}%
${goto 180}${top name 3}${goto 270}${top mem 3}%${goto 330}${top cpu 3}%

${voffset 0}${font Helvetica LT Std :size=8}${goto 180}Machine:${goto 230}$nodename
${goto 180}Distro:${goto 230}${pre_exec cat /etc/issue.net}
${goto 180}Kernel:${goto 230}$kernel

${goto 180}CPU1:${goto 230}${freq_g 1}GHz${goto 295}CPU2:${goto 350}${freq_g 2}GHz
${goto 180}CPU3:${goto 230}${freq_g 3}GHz${goto 295}CPU4:${goto 350}${freq_g 4}GHz
${goto 180}Temp:${goto 230}${exec sensors|grep 'temp2'|awk '{print $2}'}
${goto 180}RAM: ${goto 220}${mem} / ${memmax}
${goto 180}SWAP: ${goto 220}${swap} / ${swapmax}

${goto 180}IP :${goto 200}${addr wlan0}${goto 300}Qualité : ${wireless_bitrate wlan0} ${offset 0}(${wireless_link_qual_perc wlan0} %)

${template0 base.png 168,250 280x223}
${image /home/seb/conky/.images/applications-system.png -p 380,245 -s 37x40}

########conky rss######
${voffset -60}
${font Helvetica LT Bold :size=10}${color white}
${goto 185}Hoaxbuster.com Int'Hoax 
${font Helvetica LT Std :size=8}${color white}    
${rss http://www.hoaxbuster.com/taxonomy/term/7/feed 10 item_titles 4 60}
${image /home/seb/conky/.images/base.png -p 168,485 -s 280x100}
${image /home/seb/conky/images/rss.png -p 380,480 -s 37x40}

#######conky mail#######
${font Helvetica LT Std :size=8}${color white}
${voffset -20}${offset 180}M@il: ${execpi 30 python ~/conky/conkyscripts/gmail_parser2.py xxxxxxxxxxx@gmail.com MDPgmail 2 30}


${image /home/seb/conky/.images/base.png -p 168,600 -s 280x130}
${image /home/seb/conky/.images/email.png -p 380,595 -s 37x40}

et en image

mini_162034Capturedu20130222001959.png

rappel des règles
Les images de la taille d'une vignette (approximativement 300x300) peuvent être postées. Veuillez utiliser un lien ou une miniature pour les images plus grandes

Dernière modification par ljere (Le 22/02/2013, à 06:44)


"Le hardware c'est ce qu'on frappe quand le software plante" Dicton geek
"Quand les mouettes ont pieds il est temps de virer" Dicton breton
"Sauver un arbre, bouffer un castor" Dicton Bio

Hors ligne

#2308 Le 22/02/2013, à 15:35

ragamatrix

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

J'ai fais une image png pour un conky mais il s"affiche avec une trop forte transparence.
Je ne trouve pas comment modifier alpha pour que cette image soit pratiquement opaque (non transparente).
alpha
originale:
alpha_1
merci !

Dernière modification par ragamatrix (Le 22/02/2013, à 15:39)

Hors ligne

#2309 Le 22/02/2013, à 15:47

ragamatrix

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Voici une earthclock:
pendule
Un grand merci pour l'aide et les codes de : ansem_of_nexus et Mr peachy
vous trouverez les codes par ici
bon conky !

Dernière modification par ragamatrix (Le 22/02/2013, à 15:48)

Hors ligne

#2310 Le 22/02/2013, à 18:11

chepioq

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

ragamatrix a écrit :

J'ai fais une image png pour un conky mais il s"affiche avec une trop forte transparence.
Je ne trouve pas comment modifier alpha pour que cette image soit pratiquement opaque (non transparente).
http://pix.toile-libre.org/upload/thumb/1361543652.png
originale:
http://pix.toile-libre.org/upload/thumb/1361543858.png
merci !

Il faudrait que tu nous donnes ton conky...


Tout est dans tout et réciproquement....

Hors ligne

#2311 Le 22/02/2013, à 18:29

ragamatrix

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

chepioq a écrit :
ragamatrix a écrit :

J'ai fais une image png pour un conky mais il s"affiche avec une trop forte transparence.
Je ne trouve pas comment modifier alpha pour que cette image soit pratiquement opaque (non transparente).
http://pix.toile-libre.org/upload/thumb/1361543652.png
originale:
http://pix.toile-libre.org/upload/thumb/1361543858.png
merci !

Il faudrait que tu nous donnes ton conky...

c'est un peu le bazar là il n'y a pas le png c'est un autre mais le probleme est le même avec celle appelée VynilRed.png; je camouflais avec le draw-bg.lua pour accentuer l'opacité...
conky:

 # -- Conky settings -- #
background no
update_interval 1
  
cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
imlib_cache_size 0 

# -- Window specifications -- #

draw_borders no
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window yes
own_window_transparent yes
own_window_class conky-semi

border_inner_margin 0
border_outer_margin 0

minimum_size 300 300
 
alignment mr
gap_x 30
gap_y 65

# -- Graphics settings -- #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# -- Text settings -- #
use_xft yes
xftfont Arial Rounded MT:size=8
xftalpha 0.8
 
uppercase no  

default_color FFFFFF

# -- Lua load -- #
lua_load /home/climatix/.conky/conky21/db/deadbeefRound.lua
##
lua_load ~/.conky/conky21/db/rings.lua
lua_draw_hook_post main_rings

# -- Lua Load -- #
#lua_load ~/.conky/conky21/db/text_around.lua
#lua_draw_hook_pre draw_text
lua_load ~/.conky/conky21/db/draw_bg.lua
TEXT
${lua DBMaj}
${if_match "${lua Titre}"!="N/A"}${execi 3 ~/.conky/conky21/db/db-cover-sphere.sh}${image /home/climatix/.conky/conky21/covers.png -p 99,99}
${voffset -20}${color OrangeRed2}${alignc}${lua Titre}
${color gray66}${alignc}${lua Artiste}
${color f2d873}${alignc}${lua Album}
${color gray66}${alignc}${font White Rabbit:size=8:bold}${lua Annee}$font
${color OrangeRed2}${alignc}${font White Rabbit:size=8}${lua Ecoule}${offset 2}/${offset 2}${lua Duree}$font
${else}${voffset 90}${goto 100}${font Kimberley:size=9}${color gray66}db Inactif | Radio${color f2d873}
${voffset 110}${font Kimberley:size=10}${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "not playing"}${else}${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}
#${color grey80}Artist & Song
${color OrangeRed2}${font}${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w35}${color}${endif}${image ~/.conky/conky21/db/CD/VinylRed.png -p 69,69 -s 160x160}${endif}
${lua conky_draw_bg 70 80 80 140 140 0x000000 0.5}##center
#${voffset -12}${goto 22}${font Kimberley :size=19}${color gray66} DeaDBeeF
#${voffset 83}${goto 35}${font Kimberley :size=19}${color gray66} Inactif
#${voffset 50}${goto 20}${font Kimberley :size=19}${color OrangeRed2}Radio
  

Hors ligne

#2312 Le 22/02/2013, à 18:35

chepioq

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Essaye en ajoutant dans ton setting la variable own_window_argb_value xxx ou xxx peut prendre des valeurs entre  0 (totalement transparent) et 255 (totalement opaque)


Tout est dans tout et réciproquement....

Hors ligne

#2313 Le 22/02/2013, à 19:46

ragamatrix

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

chepioq a écrit :

Essaye en ajoutant dans ton setting la variable own_window_argb_value xxx ou xxx peut prendre des valeurs entre  0 (totalement transparent) et 255 (totalement opaque)

non malheureusement...
Merci quand même

Hors ligne

#2314 Le 22/02/2013, à 20:31

chepioq

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Et si tu convertie ton image originale de .png en .gif ? (gif supporte la transparence, mais n'est qu'en 256 couleurs, peut-être que tes couleurs seront moins transparentes, mais je dis peur-être une bêtise...)


Tout est dans tout et réciproquement....

Hors ligne

#2315 Le 22/02/2013, à 20:51

Didier-T

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

@ ragamatrix,
modifie own_window_argb_visual en no

own_window_argb_visual no

Hors ligne

#2316 Le 22/02/2013, à 21:59

ragamatrix

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Didier-T a écrit :

@ ragamatrix,
modifie own_window_argb_visual en no

own_window_argb_visual no

Merci Didier-T !!
C'est bien ça
Et merci aussi à toi Chepioq pour t'être penché sur la question.
Je ferais suivre l'idée plus tard.

Hors ligne

#2317 Le 24/02/2013, à 18:45

ljere

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

cela fait un moment que je n'avais pas posté ici mais le nouveau conky météo de Didier_T m'ayant plus je l'ai un peu modifié voici le résultat

	# -- Conky settings -- #
	background no
	update_interval 1

	cpu_avg_samples 2
	net_avg_samples 2

	override_utf8_locale yes

	double_buffer yes
	no_buffers yes

	text_buffer_size 2048
	# -- Window specifications -- #
	own_window_title Meteo
	own_window yes
	own_window_type normal
	own_window_transparent yes
	own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

	border_inner_margin 0
	border_outer_margin 0

	minimum_size 450 350
	maximum_width 455
	

	alignment bl
	gap_x 0
	gap_y -25

	# -- Graphics settings -- #
	draw_shades no
	draw_outline no
	draw_borders no
	draw_graph_borders yes

	# -- Text settings -- #
	use_xft yes
	xftfont MaiandraGD:size=24
	xftalpha 0.4

	uppercase no

	default_color 8b8b8b

	# -- Déclaration template -- #
	template0 ${image ~/.conky/meteo6jours/scripts/images/\1 -p \2 -s \3} # -- images fond -- #
	template1 ${lua Meteo_\1 \2 \3 \4 \5 \6} # -- gestion météo --#
	template2 ${lua_parse Meteo_\1 \2 \3 \4 60 \5} # -- icônes météo -- \2=répertoire icônes \3=position \4=taille \5=jour (pour les prévisions) #
	template3 ${lua Lune_\1} 
	template4 ${lua_parse Images_\1 \2 \3 60 \4} # -- Appelle image -- \2=position \3=taille \4=jour (pour les prévisions) #
	
	lua_load ~/.conky/meteo6jours/scripts/meteo2.lua

	lua_startup_hook init ~/.conky/meteo6jours/scripts/meteo.cfg
	
TEXT

#### Lancement du script récupérant les données météo ####
${template1 Maj}
#### Premier cadre ####
##### Heure #####
${voffset -55}${font LED_mono :style=Medium:size=60}${color 434343}${goto 30}${time %H}${goto 140}${time %M}${font LED_mono :size=25:style=Medium}${color 808080}${goto 235}
##### Heure mise à jour #####
${voffset 0}${color white}${font Helvetica LT Std :size=8}${alignc 96}Dernière mise à jour : ${template1 Heure}h${template1 Minute}
##### Date et Saints du jour #####
${voffset -65}${color white}${font Helvetica LT Std :size=12:style=Bold}${alignc -108}${exec date "+%A %d %B %Y"|sed 's/^.\| [a-z]/\U&/g'}
##### Affichage infos vent ######
${voffset 20}${color white}${font Helvetica LT Std:style=Bold:size=9}${goto 340}Vent : ${template1 VentDirP}          
${color white}${font Helvetica LT Std:style=Bold:size=9}${goto 340}Vitesse : ${template1 VentForce} km/h
${goto 340}Pluie : ${template1 Jour_NivPrec 1} mm
##### ville #####
${voffset 6}${goto 15}${font Helvetica LT Std :size=10 style:bold}${color white}${template1 Ville} : ${font Helvetica LT Std :size=10}${color white}${template1  CondMeteo}${font Helvetica LT Std :size=10} / ${template1 TempAct}°C

##### Affichage temperature #####
${alignc 187}${voffset -5}${font Ubuntu :size=8:style=bold}${color red}${template1 Jour_Temp 2}°${color white}/${color lightblue}${template1 Nuit_Temp 2}°
${alignc 112}${voffset -13}${color red}${template1 Jour_Temp 3}°${color white}/${color lightblue}${template1 Nuit_Temp 3}°
${alignc 37}${voffset -13}${color red}${template1 Jour_Temp 4}°${color white}/${color lightblue}${template1 Nuit_Temp 4}°
${alignc -38}${voffset -13}${color red}${template1 Jour_Temp 5}°${color white}/${color lightblue}${template1 Nuit_Temp 5}°
${alignc -113}${voffset -13}${color red}${template1 Jour_Temp 6}°${color white}/${color lightblue}${template1 Nuit_Temp 6}°
${alignc -188}${voffset -13}${color red}${template1 Jour_Temp 7}°${color white}/${color lightblue}${template1 Nuit_Temp 7}°
##### Affichage vitesse du vent #####
${alignc 187}${font Ubuntu :size=8:style=bold}${color white}${voffset 39}${template1 Jour_VentForce 2}${font Ubuntu :size=6:style=bold} km/h
${alignc 112}${voffset -12}${font Ubuntu :size=8:style=bold}${template1 Jour_VentForce 3}${font Ubuntu :size=6:style=bold} km/h
${alignc 37}${voffset -12}${font Ubuntu :size=8:style=bold}${template1 Jour_VentForce 4}${font Ubuntu :size=6:style=bold} km/h
${alignc -38}${voffset -12}${font Ubuntu :size=8:style=bold}${template1 Jour_VentForce 5}${font Ubuntu :size=6:style=bold} km/h
${alignc -113}${font Ubuntu :size=8:style=bold}${voffset -12}${template1 Jour_VentForce 6}${font Ubuntu :size=6:style=bold} km/h
${alignc -188}${font Ubuntu :size=8:style=bold}${voffset -12}${template1 Jour_VentForce 7}${font Ubuntu :size=6:style=bold} km/h
##### Affichage Date #####
${voffset -2}${font Ubuntu :size=10}${color white}${alignc 187}${template1 Jour %a_%d 2}
${voffset -16}${alignc 112}${template1 Jour %a_%d 3}
${voffset -16}${alignc 37}${template1 Jour %a_%d 4}
${voffset -16}${alignc -38}${template1 Jour %a_%d 5}
${voffset -16}${alignc -113}${template1 Jour %a_%d 6}
${voffset -16}${alignc -188}${template1 Jour %a_%d 7}
${voffset -172}${color1}${font Helvetica LT Std :size=10}${goto 235}Aujourd'hui St.${color1}${font Helvetica LT Std :size=10}${exec ~/.conky/meteo6jours/scripts/Saints.sh}
##### Affichage Donnée #####
${voffset 152}${color white}${font Helvetica LT Std:style=Bold:size=9}${offset 15}RAM: $mem / $memmax
${voffset 2}${offset 15}Disque Dur: ${fs_used /} / ${fs_size /}
${voffset 2}${offset 15}CPU1: ${freq_g 1} GHz ${cpu cpu1}% CPU2: ${freq_g 2} GHz ${cpu cpu2}%
${voffset 2}${offset 15}${if_up wlan0}WIFI: ${wireless_link_qual wlan0}
${voffset -26}${alignr 80}${color}${font Helvetica LT Std:style=Bold:size=22}${if_match ${desktop}==1}${color1}${endif}1${color}${offset 10}${if_match ${desktop}==2}${color1}${endif}2${color}${offset 10}${if_match ${desktop}==3}${color1}${endif}3${color}${offset 10}${if_match ${desktop}==4}${color1}${endif}4${color}

#### Affichage des cadres utilisés dans le conky ####
${voffset -935}
#### premier cadre ####
${template0 base.png 0,40 450x110}
${template0 flip_bg.png 24,10 100x100}
${template0 flip_bg.png 134,10 100x100}
#### Second cadre ####
${template0 base.png 0,155 450x80}
#### icônes premier cadre ####
${template2 IconeM ~/.conky/meteo6jours/repicones 205,75 132x70}
#### icônes Second cadre ####
${template2 Jour_IconeM ~/.conky/meteo6jours/repicones 0,168 75x45 2}
${template2 Jour_IconeM ~/.conky/meteo6jours/repicones 75,168 75x45 3}
${template2 Jour_IconeM ~/.conky/meteo6jours/repicones 150,168 75x45 4}
${template2 Jour_IconeM ~/.conky/meteo6jours/repicones 225,168 75x45 5}
${template2 Jour_IconeM ~/.conky/meteo6jours/repicones 300,168 75x45 6}
${template2 Jour_IconeM ~/.conky/meteo6jours/repicones 375,168 75x45 7}
#### Troisieme cadre ####
${template0 base.png 0,240 450x80}

capturedcran-24022013-205509.php

Dernière modification par ljere (Le 24/02/2013, à 20:57)


ancien PC Toshiba satellite_c670d-11 / Linux Mint 21 Vanessa
Nouveau PC ASUS TUF GAMING A17 GPU RTX 4070 CPU AMD Ryzen 9 7940HS w/ Radeon 780M Graphics / Linux Mint 21.2 Victoria / Kernel: 6.4.8-1-liquorix / Desktop: Cinnamon

Hors ligne

#2318 Le 24/02/2013, à 20:02

Didier-T

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Merci ljere,
mais tu me fait trop d'honneur, ce conky n'est pas de moi, il est de los_tintinos.
je me suis contenté de faire un pack de d'installation simplifié (plus deux trois modifs wink )

Hors ligne

#2319 Le 24/02/2013, à 20:25

ljere

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

oups mea culpa, en tout cas le pack est super pratique


ancien PC Toshiba satellite_c670d-11 / Linux Mint 21 Vanessa
Nouveau PC ASUS TUF GAMING A17 GPU RTX 4070 CPU AMD Ryzen 9 7940HS w/ Radeon 780M Graphics / Linux Mint 21.2 Victoria / Kernel: 6.4.8-1-liquorix / Desktop: Cinnamon

Hors ligne

#2320 Le 25/02/2013, à 19:57

los_tintinos

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

salut,

En même temps , c'est en partant du conky meteo de didier que je l'ai mis en page. Je me suis inspiré de la présentation HTC (telephone mobile) que je trouve super pratique. Et je m'était fait la main sur un autre conky anglais avec le style HTC.

Sinon, je confirme, le pack d'install est top, j'avais un problème avec mon conky (un script python qui avait un spasme...) et avec le pack d'install j'ai retrouvé un conky fonctionnel.

Merci.


"Le hardware c'est ce qu'on frappe quand le software plante" Dicton geek
"Quand les mouettes ont pieds il est temps de virer" Dicton breton
"Sauver un arbre, bouffer un castor" Dicton Bio

Hors ligne

#2321 Le 26/02/2013, à 21:00

helloula

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

los_tintinos a écrit :

salut,

En même temps , c'est en partant du conky meteo de didier que je l'ai mis en page. Je me suis inspiré de la présentation HTC (telephone mobile) que je trouve super pratique. Et je m'était fait la main sur un autre conky anglais avec le style HTC.

Sinon, je confirme, le pack d'install est top, j'avais un problème avec mon conky (un script python qui avait un spasme...) et avec le pack d'install j'ai retrouvé un conky fonctionnel.

Merci.

Bonjour tout le monde,
J'aime bien ce conky, j'aimerais bien l'utiliser, l'installation s'est bien passée, il s'affiche bien sur le bureau !  sauf que j'ai toujours la météo d’Argenteuil ! malgré le changement de l'adresse accuweather pour ma ville ! il parait qu'il ne se connecte pas au Net et prend les infos à partir du dossier "reptravail" ( càd des sauvegardes anciennes) !
J'ai cherché dans tous les scripts, je n'ai rien trouvé qui fait allusion à la connexion wifi !

autre chose j'aimerais bien qu'il s'ouvre au démarrage ! je ne sais pas comment faire ! faut dire que je découvre Ubuntu !

Merci !

Hors ligne

#2322 Le 26/02/2013, à 21:05

Didier-T

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

bonjour helloula,
tu pourrais me montrer le contenu du fichier meteo.cfg

Hors ligne

#2323 Le 26/02/2013, à 21:10

helloula

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Didier-T a écrit :

bonjour helloula,
tu pourrais me montrer le contenu du fichier meteo.cfg

C'est rapide ! merci Didier ! le voici :

# ---- Config Meteo-Lua v2 ----

# Répertoire des scripts
repscript=~/.conky/meteo/scripts

# Répertoire de sauvegarde
repsauv=~/.conky/meteo/reptravail

#Répertoire temporaire
TempShell=/tmp

#Copier votre adresse Accuweather ici
web=Nouvelle fenêtre ouverte dans la session du navigateur
http://www.accuweather.com/fr/tn/tunis/ … ast/321398

#Prévision sur n jour (de 1 à 15) moyenne pour la journée
periode=5

#Prévision infos sur la matinée (oui, non)
matinée=non

#Prévision infos sur la Après Midi (oui, non)
am=oui

#Prévision infos sur la Soirée (oui, non)
soiree=non

#Prévision infos sur la Nuit (oui, non)
nuit=oui

#Prévision à 8 Heures
Prev8heures=non

#Nombre de tranche de huit heures a traiter
nbFoisHuit=1

#Palier changement de couleur rose des vents (Km/h)
Palier=20

#Temps entre les mises à jour prévision (minute)
update=15

#Affichage notifiaction a la mise a jour
notify=non

Hors ligne

#2324 Le 26/02/2013, à 21:13

Didier-T

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

@ helloula,
Tu pourrais utiliser les balise code s'il te plaît l’icône "<>".

Hors ligne

#2325 Le 26/02/2013, à 21:13

helloula

Re : (4) Conky : Postez vos conkyrc ou certaines parties intéressantes

Didier-T a écrit :

bonjour helloula,
tu pourrais me montrer le contenu du fichier meteo.cfg

C'est rapide ! merci Didier ! le voici :

# ---- Config Meteo-Lua v2 ----

# Répertoire des scripts
repscript=~/.conky/meteo/scripts

# Répertoire de sauvegarde 
repsauv=~/.conky/meteo/reptravail

#Répertoire temporaire
TempShell=/tmp

#Copier votre adresse Accuweather ici
web=Nouvelle fenêtre ouverte dans la session du navigateur
[url]http://www.accuweather.com/fr/tn/tunis/321398/weather-forecast/321398[/url]

#Prévision sur n jour (de 1 à 15) moyenne pour la journée
periode=5 

#Prévision infos sur la matinée (oui, non)
matinée=non

#Prévision infos sur la Après Midi (oui, non)
am=oui

#Prévision infos sur la Soirée (oui, non)
soiree=non

#Prévision infos sur la Nuit (oui, non)
nuit=oui

#Prévision à 8 Heures
Prev8heures=non

#Nombre de tranche de huit heures a traiter
nbFoisHuit=1

#Palier changement de couleur rose des vents (Km/h)
Palier=20

#Temps entre les mises à jour prévision (minute)
update=15

#Affichage notifiaction a la mise a jour
notify=non

C'est celui de votre Conky, mais c'est la même chose !

merci d'utiliser les balises code et non quote

Dernière modification par ljere (Le 27/02/2013, à 06:50)

Hors ligne