Conky 2021

Bureaux,conky et autres personnalisations esthétiques.
Répondre
Avatar du membre
loutch
Messages : 486
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Conky 2021

Message par loutch »

Bonjour

Conky radiotray-ng 2021 avec recherche de pochettes (il faut lynx et jq)

Le conky fonctionne avec mes radios , vous pouvez y mettre les vôtres dans ce qu'a il vous faudra mettre le logo de celles-ci et remplacer les xx pour une bonne position
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "blabla"} ${lua fDrawImage ~/.conky/radiotrayng/logos/blabla .png XXX XX XX XX} ${else}


le conkyrc

Code : Tout sélectionner

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 = 400, minimum_height = 100,
--maximum_width 200
	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 = 780,
	gap_y = 50,
	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',
};

conky.text = [[
${texeci 8 ~/.conky/radiotrayng/pochette.sh}
${voffset -4}${alignc -90}${font GE Inspira:size=12}${execi 5 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}$font ${goto 340}Vol: ${exec amixer get Master | awk 'NR==5{print $4}' | tr -d {[]}}                                            
${voffset 33}${alignc}${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.artist'}
             ${alignc}${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.title'}
${lua fDrawImage $HOME/.conky/radiotrayng/images/case.png 0 0 410 108}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "RTL"}                 ${lua fDrawImage ~/.conky/radiotrayng/logos/rtl.png 240 32 50 50}         ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "Hotmixradio 80"}      ${lua fDrawImage ~/.conky/radiotrayng/logos/hotmix80.png 248 28 35 35}    ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "Maxi 80"}             ${lua fDrawImage ~/.conky/radiotrayng/logos/maxi80.png 250 29 35 35}      ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "RTL2"}                ${lua fDrawImage ~/.conky/radiotrayng/logos/rtl2.png 240 32 45 45}        ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "MAGNUM LA RADIO"}     ${lua fDrawImage ~/.conky/radiotrayng/logos/magnumradio.png 204 26 120 40}${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "Radio Swiss Pop"}     ${lua fDrawImage ~/.conky/radiotrayng/logos/rspop.png 250 30 35 35}       ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "RFM"}                 ${lua fDrawImage ~/.conky/radiotrayng/logos/rfm.png 244 35 45 45}         ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "80's & 90's hits"}    ${lua fDrawImage ~/.conky/radiotrayng/logos/80-90.png 248 28 35 35}       ${else}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.station'}" == "Best Hits Radio 80's"}${lua fDrawImage ~/.conky/radiotrayng/logos/80.png 248 28 35 35}          ${endif}

${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
${if_match "${execi 4 qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | jq -r '.title'}" == ""}${lua fDrawImage ~/.conky/radiotrayng/logos/radio.png 19 10 78 78}
${else}${lua fDrawImage ~/pochette.png 24 14 68 70}${endif}
#${lua fDrawImage ~/.conky/radiotrayng/logos/radio.png 19 10 78 78}
${lua fDrawImage ~/.conky/radiotrayng/images/stop.png 115 31 13 13}
${lua fDrawImage ~/.conky/radiotrayng/images/prev.png 100 45 13 13}
${lua fDrawImage ~/.conky/radiotrayng/images/play.png 115 45 13 13}
${lua fDrawImage ~/.conky/radiotrayng/images/next.png 130 45 13 13}
${lua fDrawImage ~/.conky/radiotrayng/images/pause.png 115 59 13 13}
${lua fDrawImage ~/.conky/radiotrayng/images/bar.png 98 78 48 4}
${lua fDrawImage ~/.conky/radiotrayng/images/grip.png 115 78 5 5}
${lua fDrawImage ~/.conky/radiotrayng/images/1-play.png 155 15 10 10}
${voffset -800}
pochette.sh

Code : Tout sélectionner

#!/bin/bash
#créé par loutch
#2018-12-27 modifier par TeoBigusGeekus et loutch pour radiotray-ng et conky 1.10
#2021-02-20 modifier par nic80 et loutch

qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep artist |sed 's/^.*" \: "//' |sed 's/",.*$//' > artiste_titre.txt
qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep title  |sed 's/^.*" \: "//' |sed 's/",.*$//' >> artiste_titre.txt
titre=$(cat artiste_titre.txt)
lynx --source -useragent="Googlebot-Image/1.0" "www.google.com/search?q=$titre\&tbm=isch" | perl -pe 's!.*<img .* src="([^"]*)".*!$1!' > lienMiniaturefile
sed -i 's/^.* http\:/http\:/' lienMiniaturefile
sed -i '/gstatic/!d' lienMiniaturefile

lienMiniature=$(cat lienMiniaturefile)
lynx -dump "$lienMiniature" > miniatureGoogleImage

convert miniatureGoogleImage pochette.png
Image

@+
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

Avatar du membre
loutch
Messages : 486
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Conky 2021

Message par loutch »

Bonjour

-- Météo +Lune --

Il faut les deux packs de TeoBigusGeekus du forum Bunsenlabs et le pack meteo+lune 4

Accuweather
https://gitlab.com/teobigusgeekus/Accuweather_conky_script.git

Wunderground

https://gitlab.com/teobigusgeekus/Wunderground_conky_script.git

meteo+lune4

https://www.gnome-look.org/p/1155399/

le conkyrc

Code : Tout sélectionner

conky.config ={
total_run_times = 0,
double_buffer = true,
no_buffers = true,
text_buffer_size = 2048,
imlib_cache_size = 0,
update_interval = 1.0,
cpu_avg_samples = 1,
alignment = 'top_left',
minimum_width = 410, minimum_height = 981,
maximum_width = 430,
gap_x = 5,
gap_y = 0,
draw_shades = false,
draw_outline = false,
draw_borders = false,
border_inner_margin = 0,
border_outer_margin = 0,
background = true,
own_window = true,
own_window_type = 'normal',
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,',
own_window_transparent = true,
use_xft = true,
xftalpha = 1,
override_utf8_locale = true,
font = 'CorporateMonoExtraBold:size=10',
uppercase = false,
default_color = '#FFFFFF',
default_shade_color =  '#000000',
default_outline_color = 'black',
color1 = 'b9b4b0', -- gris rosé
color2 = 'CA0000', -- rouge
color3 = '386fd5', -- bleu argent
color6 = 'b10ab3', -- mauve
color7 = 'f3ec1f', -- jaune
color8 = 'CCCCCC',
color9 = 'BBBBBB',
template1 = [[${font CorporateMonoExtraBold:size=\1}]],
template2 = [[${font Folks-Heavy:style=Bold:size=\1}]],
template3 = [[${font Liberation Sans:size=\1}]],
lua_load = '~/.conky/lua/image.lua',
};
conky.text = [[
${texeci 900 bash $HOME/Accuweather_conky_script/accuweather -f2015} ${texeci 3600 bash $HOME/Wunderground_conky_script/wunderground}${texeci 9500 bash $HOME/Moongiant_conky_script/moon_MoonGiant}
${voffset 15}${alignc}${color1}Sarreguemines
${alignc}${color1}${execi 600 sed -n '4p' $HOME/Accuweather_conky_script/curr_cond}
${voffset 10}${goto 120}${color3}Humidité:            ${alignr 10}${color1}${texeci 600 sed -n '7p' $HOME/Accuweather_conky_script/curr_cond}
             ${goto 120}${color3}Pression:            ${alignr 10}${color1}${texeci 600 sed -n '8p' $HOME/Accuweather_conky_script/curr_cond | awk '{print $2}'} mbar
             ${goto 120}${color3}Indice UV:           ${alignr 10}${color1}${texeci 600 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond}
             ${goto 120}${color3}Converture nuageuse: ${alignr 3}${color1}${texeci 600 sed -n '10p' $HOME/Accuweather_conky_script/curr_cond}
             ${goto 120}${color3}Point de rosée:      ${alignr 10}${color1}${texeci 600 sed -n '12p' $HOME/Accuweather_conky_script/curr_cond}°C
             ${goto 120}${color3}Visibilité:          ${alignr 10}${color1}${execi 600 sed -n '13p' $HOME/Accuweather_conky_script/curr_cond}s
             ${goto 120}${color3}Lever/Coucher:       ${alignr 10}${color1}${execi 600 sed -n '14p' $HOME/Accuweather_conky_script/curr_cond} / ${execi 600 sed -n '15p' $HOME/Accuweather_conky_script/curr_cond}
         ${goto 120}${color3}Vent:                ${alignr 10}${color1}${execi 600 sed -n '5p' $HOME/Accuweather_conky_script/curr_cond} ${texeci 600 sed -n '5p' $HOME/Accuweather_conky_script/curr_cond > $HOME/Accuweather_conky_script/vent}
             ${goto 120}${color3}Vitesse:             ${alignr 10}${color1}${execi 600 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond}
${voffset -90}${goto 30}${color1}${template1 14}T: ${execi 600 sed -n '2p' $HOME/Accuweather_conky_script/curr_cond}°C
${voffset 10} ${goto 30}${color1}${template1 14}R: ${execi 600 sed -n '3p' $HOME/Accuweather_conky_script/curr_cond}°C
${voffset 90}${template1 9}
${goto 100}Aujourd'hui ${goto 280}Demain
${goto 120}${color3}${texeci 600 sed -n  '5p' $HOME/Accuweather_conky_script/daily_forecast}°${color}/${color2}${texeci 600 sed -n  '4p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 280}${color3}${execpi 600 sed -n '12p' $HOME/Accuweather_conky_script/daily_forecast}°${color}/${color2}${execpi 600 sed -n '11p' $HOME/Accuweather_conky_script/daily_forecast}°${color1}
${goto 80}${scroll 16 ${execpi 600 sed -n  '6p' $HOME/Accuweather_conky_script/daily_forecast}}\
${goto 240}${scroll 16 ${execpi 600 sed -n '13p' $HOME/Accuweather_conky_script/daily_forecast}}
${voffset 60}
 ${goto 70}${execi 3600 echo `date --date="2 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="2 day" | awk '{print $2}'`}\
${goto 195}${execi 3600 echo `date --date="3 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="3 day" | awk '{print $2}'`}\
${goto 320}${execi 3600 echo `date --date="4 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="4 day" | awk '{print $2}'`}
 ${goto 70}${color3}${execpi 600 sed -n '19p' $HOME/Accuweather_conky_script/daily_forecast}°${color}/${color2}${execpi 600 sed -n '18p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 195}${color3}${execpi 600 sed -n '26p' $HOME/Accuweather_conky_script/daily_forecast}°${color}/${color2}${execpi 600 sed -n '25p' $HOME/Accuweather_conky_script/daily_forecast}°\
${goto 320}${color3}${execpi 600 sed -n '33p' $HOME/Accuweather_conky_script/daily_forecast}°${color}/${color2}${execpi 600 sed -n '32p' $HOME/Accuweather_conky_script/daily_forecast}°${color1}
${goto 55}${scroll 12 ${execpi 600 sed -n '20p' $HOME/Accuweather_conky_script/daily_forecast}}\
${goto 180}${scroll 12 ${execpi 600 sed -n '27p' $HOME/Accuweather_conky_script/daily_forecast}}\
${goto 305}${scroll 12 ${execpi 600 sed -n '34p' $HOME/Accuweather_conky_script/daily_forecast}}
${voffset 75}${alignc}${color1}${template1 15}Calendrier Lunaire${font}
${voffset -5}${alignc}${color2}${template1 9}( Hémisphère Nord en GMT+1 Paris )${font}
${offset 40}
${alignc}${color3}Lever/Coucher:${color2}${template7 9}( Heure locale )$font
${alignc} ${template3 11}↑ ${template1 10}${execi 600 sed -n '18p' $HOME/Accuweather_conky_script/curr_cond} ${template3 11}↓ ${template1 10}${execi 600 sed -n '19p' $HOME/Accuweather_conky_script/curr_cond} = ${execi 600 sed -n '20p' $HOME/Accuweather_conky_script/curr_cond} 
${alignc}${color3}Phase ${color1}${execpi 600 sed -n '1p' $HOME/Wunderground_conky_script/lune} 
${template2 9}${voffset 20}
${goto 30}Visibilité: ${execpi 600 sed -n '23p' $HOME/Moongiant_conky_script/raw}                       ${goto 260}Angle: ${execpi 600 sed -n '25p' $HOME/Moongiant_conky_script/raw} °
${goto 30}Age: ${execpi 600 sed -n '24p' $HOME/Moongiant_conky_script/raw | awk '{print $1}'} Jour(s)   ${goto 260}Dist.: ${execpi 600 sed -n '26p' $HOME/Moongiant_conky_script/raw}s
${voffset 80}${alignc}${color1}${template1 15}Éphéméride ${font}
${alignc}${color1}Saint(e) du jour
${alignc}${color2}${texeci 1000 wget -O - -q  http://fetedujour.fr/  --user-agent="Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0" | grep h2 | head -1 | cut -d">" -f2 | cut -d"<" -f1 | cut -d":" -f2 } 
#fond verticale
${lua fDrawImage $HOME/conky/meteo+lune4/icones/base/fond23x866.png 0 115 23 866}
#ligne rouge
${lua fDrawImage $HOME/conky/meteo+lune4/icones/base/rouge2.png 20  90 380 12}
${lua fDrawImage $HOME/conky/meteo+lune4/icones/base/rouge2.png 20 306 380 12}
${lua fDrawImage $HOME/conky/meteo+lune4/icones/base/rouge2.png 20 582 380 12}
${lua fDrawImage $HOME/conky/meteo+lune4/icones/base/rouge2.png 20 850 380 12}
#texte vertical
${lua fDrawImage $HOME/conky/meteo+lune4/icones/base/lateralf.png 4 125 15 851}
#icones
${lua fDrawImage $HOME/Accuweather_conky_script/forecast_2015/forecast_0.png 20 100 115 69}
${lua fDrawImage $HOME/Accuweather_conky_script/Wind1.png 40 220 70 70}
${lua fDrawImage $HOME/Accuweather_conky_script/forecast_2015/forecast_1.png 100 380 90 52}
${lua fDrawImage $HOME/Accuweather_conky_script/forecast_2015/forecast_2.png 260 380 90 52}
${lua fDrawImage $HOME/Accuweather_conky_script/forecast_2015/forecast_3.png  45 510 90 52}
${lua fDrawImage $HOME/Accuweather_conky_script/forecast_2015/forecast_4.png 170 510 90 52}
${lua fDrawImage $HOME/Accuweather_conky_script/forecast_2015/forecast_5.png 295 510 90 52}
${lua fDrawImage $HOME/Wunderground_conky_script/Forecast_Images/Moon_phase.png 160 730 90 90}
]];
Image

@+
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

Avatar du membre
ZorKas
Messages : 172
Enregistré le : mer. 17 juil. 2019 16:56
Localisation : Mistral gagnant
Contact :

Re: Conky 2021

Message par ZorKas »

Merci loutch ;)
CM Asus M4A785TD-M EVO - Proc.AMD Phenom(tm) II X4 945 Processor × 4- Mémoire 8g°- SSD 240 g° - CG NVIDIA Corporation GK208B [GeForce GT 730] - Moniteur IIyama 24" 1920x1080 - Linux Mint 20.2 Uma - Version Cinnamon 5.0.5 - Noyau Linux 5.4.0.80-generic
Image

Répondre