Pages : 1
Discussion fermée
#1 Le 25/08/2012, à 22:17
- BINEJE
--Conky-- Conditions -> Colorisations
Bonsoir à tous
Voila, je suis en train de programmer mon conky, et je bute sur un petit problème.
Le but, c'est que cette barre change de couleur en fonction de l'etat de la batterie,
élevé, faible, bas, en charge.
Cette barre m'affiche le niveau de batterie, mais le problème, c'est qu'une fois
à l'essai, la barre reste rouge... Si quelqu'un à une idée...
Ma Condition:
${if_match ${battery APM0} < 10}${color2}${battery_bar}${color}${else}
${if_match ${battery APM0} > 25}${color4}${battery_bar}${color}${else}
${if_match ${battery} == charging **%}${color5}${battery_bar}${color}${else}
${color3}${battery_bar}${color}${endif}${endif}${endif}
Le conkyrc complet, pour les codes couleurs:
#avoid flicker
double_buffer yes
default_bar_size 80
#own window to run simultanious 2 or more conkys
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorate,sticky,skip_taskbar,skip_pager
#borders
draw_borders no
border_margin 1
#shades
draw_shades no
#position
gap_x 6
gap_y 6
alignment top_left
#behaviour
update_interval 1
#colour 9f907d
default_color D3D7C5
#default_shade_color 000000
#own_window_colour 3d352a
own_window_colour 000000
#font
use_xft yes
xftfont bauhaus:pixelsize=11
#to prevent window from moving
use_spacer no
#minimu_size defaut 1262 0${color}
minimum_size 1262 0
maximum_width 250
color1 9f907d
color2 red
color3 yellow
color4 green
color5 lightblue
TEXT
${color1}Informations Système${color}
${nodename} ${color1}--${color} ${user_names}
${kernel} ${color1}--${color} ${uptime_short}
Cpu: ${cpu}% ${cpugraph 9,80 AEA08E 9F907D}
Mem: $memperc% ${membar 6,80}
${if_match ${battery APM0} < 10}${color2}${battery_bar}${color}${else}
${if_match ${battery APM0} > 25}${color4}${battery_bar}${color}${else}
${if_match ${battery} == charging **%}${color5}${battery_bar}${color}${else}
${color3}${battery_bar}${color}${endif}${endif}${endif}
${battery_bar} ${color1}--${color} ${battery_time} ${color1}--${color} ${exec cat /sys/class/backlight/*/brightness}/255L
${color1}Connections Reseaux${color}
SSID: ${wireless_essid ra0} ${color1}--${color} ${addr ra0}
SIGNAL: ${wireless_link_bar 6,80 ra0}
DOWN: ${totaldown ra0} ${color1}-${color} ${font}${downspeed ra0}/s
UP: ${totalup ra0} ${color1}-${color} ${font}${upspeed ra0}/s
${color1}Météo${color}
${color1}${execi 300 ~/.conky/meteo.sh BEXX0435:1}${execi 300 ~/.conky/meteo2.sh "Ville"}${color}
Aujourd'hui: ${execi 300 ~/.conky/meteo2.sh "Température aujourd'hui"}
${font weather:size=40}${voffset -30}${offset 165}${execi 300 ~/.conky/meteo2.sh "Conditions aujourd'hui"}${font}${voffset -16}
Vent : ${execi 300 ~/.conky/meteo2.sh "Vent aujourd'hui"}
Lever du soleil: ${execi 300 ~/.conky/meteo2.sh "Lever du soleil"}
Coucher du soleil: ${execi 300 ~/.conky/meteo2.sh "Coucher du soleil"}
Demain: ${execi 300 ~/.conky/meteo2.sh "Température demain"}
${font weather:size=30}${voffset -30}${offset 165}${execi 300 ~/.conky/meteo2.sh "Conditions demain"}${font}
${color1}${execi 300 ~/.conky/meteoB.sh SPXX0754}${execi 300 ~/.conky/meteo2B.sh "Ville"}${color}
Aujourd'hui: ${execi 300 ~/.conky/meteo2B.sh "Température aujourd'hui"}
${font weather:size=40}${voffset -30}${offset 165}${execi 300 ~/.conky/meteo2B.sh "Conditions aujourd'hui"}${font}${voffset -16}
Vent : ${execi 300 ~/.conky/meteo2B.sh "Vent aujourd'hui"}
Lever du soleil: ${execi 300 ~/.conky/meteo2B.sh "Lever du soleil"}
Coucher du soleil: ${execi 300 ~/.conky/meteo2B.sh "Coucher du soleil"}
Demain: ${execi 300 ~/.conky/meteo2B.sh "Température demain"}
${font weather:size=30}${voffset -30}${offset 165}${execi 300 ~/.conky/meteo2B.sh "Conditions demain"}${font}
Si quelqu'un sait m'éclairer...
Bonne nuit à tous ;-)
Dernière modification par BINEJE (Le 25/08/2012, à 22:20)
Hors ligne
#2 Le 26/08/2012, à 14:17
- ljere
Re : --Conky-- Conditions -> Colorisations
modération: sujet fermé merci d'éviter les doublons
la suite ici http://forum.ubuntu-fr.org/viewtopic.php?id=1019251
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
Pages : 1
Discussion fermée