Logiciels » Autres logiciels Les conkys de Loutch
loutch
Membre non connecté

Reprise du message précédent
.gif)
conky olgmen
le conkyrc
Code :
background no
use_xft yes
xftfont URW Chancery L:style=Bold:size=10
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 100 640
maximum_width 100
text_buffer_size 1024
draw_shades no
draw_outline no
draw_borders no
border_width 1
draw_graph_borders no
default_color ffffff
default_outline_color cacaca
alignment top_left
gap_x 0
gap_y 100
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
#
color1 ffff00
#
color2 6495ee
#
color3 ffffff
#
color4 ffffff
#
color5 6495ee
#
color6 red
#cornflowerblue
# — Lua Load — #
lua_load ~/.conky/olgmen/scripts/data_comp.lua
lua_draw_hook_pre conky_widgets
TEXT
le lua principal
Code :
--[[data_comp.lua par olgmen le 25/12/2011
Francisation par loutch
fonction affiche des données sur le fonctionnement du processeur, de la mémoire, de l'Internet
pour exécuter cette fonction, il est nécessaire dans conkyrc, au-dessus du mot TEXT ajouter les lignes suivantes
# - Lua Load - #
lua_load ~ / scripts / data_comp.lua
lua_draw_hook_pre conky_widgets
Toutes les données sont calculées pour une utilisation dans la fenêtre conky avec la taille de 1260x675 (dans tout mon écran)
]]
require "cairo"
-- définir la section d'accueil, pour la capacité de travailler à partir de n'importe quel ordinateur
usrhome = os.getenv("HOME")
-- les scripts nécessaires sont dans le dossier des scripts
--dofile (usrhome .."/scripts/backgraund.lua") -- arrière-plan de sortie de script, cadres
dofile (usrhome .."/.conky/olgmen/scripts/text1.lua") -- script sorties textes
dofile (usrhome .."/.conky/olgmen/scripts/scale1.lua") -- sorties de script échelles
text_color = {{0, 0xffffff, 1},{0.5, 0xffffff, 1},{1, 0xffffff, 1}}
-- fonction qui démarre tout affiché dans la fenêtre conky. Toutes les données sont calculées pour une utilisation dans la fenêtre conky avec la taille de 1260x675 (dans tout mon écran)
function conky_widgets()
text_settings = {
{
text ="Processeurs" ,
x = 20,
y = 10,
font_size = 12,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="CPU1" .. " " .. "°C",
x = 15,
y = 25,
font_size = 9,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="CPU2" .. " " .. "°C",
x = 15,
y = 100,
font_size = 9,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="Mémoire" ,
x = 30,
y = 175,
font_size = 12,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="Ram" .." ".."Swap" ,
x = 15,
y = 190,
font_size = 9,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="Disques" ,
x = 36,
y = 275,
font_size = 12,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="/" .." ".."/Home" ,
x = 25,
y = 290,
font_size = 9,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="Températures" ,
x = 16,
y = 375,
font_size = 12,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="Sda" .." ".."Carte" ,
x = 15,
y = 390,
font_size = 9,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="Internet" ,
x = 36,
y = 475,
font_size = 12,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text = "Entrant" .. " " .. "Sortant",
x = 15,
y = 490,
font_size = 9,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text = conky_parse("${totaldown wlp2s0}"),
x = 10,
y = 565,
font_size = 8,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text = conky_parse("${totalup wlp2s0}"),
x = 70,
y = 565,
font_size = 8,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text ="Processus" .. " " .. "Mém" .. " " .. "Cpu",
x = 10,
y = 585,
font_size = 9,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text = conky_parse("${top name 1}"),
x = 5,
y = 600,
font_size = 7,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text = conky_parse("${top mem 1)}%"),
x = 65,
y = 600,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color ,--{{0, 0x550000, 1},{0.5, 0xff0000, 1},{1, 0x550000, 1}},
orientation="nn",
},
{
text = conky_parse("${top cpu 1}%"),
x = 95,
y = 600,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color ,--{{0, 0x550000, 1},{0.5, 0xff0000, 1},{1, 0x550000, 1}},
orientation="nn",
},
{
text = conky_parse("${top name 2}"),
x = 5,
y = 610,
font_size = 7,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color , --{{0, 0x550000, 1},{0.5, 0xcf5500, 1},{1, 0x550000, 1}},
orientation="nn",
},
{
text = conky_parse("${top mem 2)}%"),
x = 65,
y = 610,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color ,--{{0, 0x550000, 1},{0.5, 0xcf5500, 1},{1, 0x550000, 1}},
orientation="nn",
},
{
text = conky_parse("${top cpu 2}%"),
x = 95,
y = 610,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color , --{{0, 0x550000, 1},{0.5, 0xcf5500, 1},{1, 0x550000, 1}},
orientation="nn",
},
{
text = conky_parse("${top name 3}"),
x = 5,
y = 620,
font_size = 7,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color , --{{0, 0x550000, 1},{0.5, 0xcfa500, 1},{1, 0x550000, 1}},
orientation="nn",
},
{
text = conky_parse("${top mem 3)}%"),
x = 65,
y = 620,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color ,--{{0, 0x550000, 1},{0.5, 0xcfa500, 1},{1, 0x550000, 1}},
orientation="nn",
},
{
text = conky_parse("${top cpu 3}%"),
x = 95,
y = 620,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color ,--{{0, 0x550000, 1},{0.5, 0xcfa500, 1},{1, 0x550000, 1}},
orientation="nn",
},
{
text = conky_parse("${top name 4}"),
x = 5,
y = 630,
font_size = 7,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color ,--{{0, 0x555500, 1},{0.5, 0xcfcf00, 1},{1, 0x555500, 1}},
orientation="nn",
},
{
text = conky_parse("${top mem 4)}%"),
x = 65,
y = 630,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color ,--{{0, 0x555500, 1},{0.5, 0xcfcf00, 1},{1, 0x555500, 1}},
orientation="nn",
},
{
text = conky_parse("${top cpu 4}%"),
x = 95,
y = 630,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color ,--{{0, 0x555500, 1},{0.5, 0xcfcf00, 1},{1, 0x555500, 1}},
orientation="nn",
},
{
text = conky_parse("${top name 5}"),
x = 5,
y = 640,
font_size = 7,
bold = false,
h_align = "l",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text = conky_parse("${top mem 5)}%"),
x = 65,
y = 640,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color,
orientation="nn",
},
{
text = conky_parse("${top cpu 5}%"),
x = 95,
y = 640,
font_size = 7,
bold = false,
h_align = "c",
v_align = "m",
colour = text_color,
orientation="nn",
},
}
-- dériver des échelles
scale_settings = {
{
name = "cpu",
arg = "cpu0",
x = 10,
y = 30,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xffffff, 1},{0.5, 0xffffff, 1},{1, 0xffffff, 1}},
font_size = 9,
},
{
name = "exec",
arg = "expr `cat /sys/class/hwmon/hwmon2/temp1_input` / 1000",
x = 70,
y = 30,
width = 35,
height =60,
scale = 16,
colour_scale = {{0, 0xff0000, 1},{0.5, 0xffffff, 1},{1, 0x0000ff, 1}},
font_size = 9,
},
{
name = "cpu",
arg = "cpu1",
x = 10,
y = 105,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xffffff, 1},{0.5, 0xffffff, 1},{1, 0xffffff, 1}},
font_size = 9,
},
{
name = "exec",
arg = "expr `cat /sys/class/hwmon/hwmon2/temp2_input` / 1000",
x = 70,
y = 105,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xff0000, 1},{0.5, 0xffffff, 1},{1, 0x0000ff, 1}},
font_size = 9,
},
{
name = "memperc",
arg = "",
x = 10,
y = 200,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xffffff, 1},{0.5, 0xffffff, 1},{1, 0xffffff, 1}},
font_size = 9,
},
{
name = "swapperc",
arg = "",
x = 70,
y = 200,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xffffff, 1},{0.5, 0xffffff, 1},{1, 0xffffff, 1}},
font_size = 9,
},
{
name = "fs_used_perc",
arg = "/",
x = 10,
y = 300,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xffffff, 1},{0.5, 0xffffff, 1},{1, 0xffffff, 1}},
font_size = 9,
},
{
name = "fs_used_perc",
arg = "/home",
x = 70,
y = 300,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xffffff, 1},{0.5, 0xffffff, 1},{1, 0xffffff, 1}},
font_size = 9,
},
{
name = "execi",
arg = "120 hddtemp -n /dev/sda",
x = 10,
y = 400,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xff0000, 1},{0.5, 0xffffff, 1},{1, 0x0000ff, 1}},
font_size = 9,
},
{
name = "hwmon",
arg = "1 temp 1",
x = 70,
y = 400,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xff0000, 1},{0.5, 0xffffff, 1},{1, 0x0000ff, 1}},
font_size = 9,
},
{
name = "",
arg = math.ceil(conky_parse("${downspeedf wlp2s0}")),
x = 10,
y = 500,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xffffff, 1},{0.5, 0xffffff, 1},{1, 0xffffff, 1}},
font_size = 9,
},
{
name = "",
arg = math.ceil(conky_parse("${upspeedf wlp2s0}")),
x = 70,
y = 500,
width = 35,
height = 60,
scale = 16,
colour_scale = {{0, 0xffffff, 1},{0.5, 0xffffff, 1},{1, 0xffffff, 1}},
font_size = 9,
},
}
-- --------------------------------------------------------------------
--[[ Ici, l'entrée de toutes les données se termine ]]
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
--[[ ÉCHELLES ]]
for i,v in pairs(scale_settings) do
cr = cairo_create (cs)
dialgraph(v)
cairo_destroy(cr)
end
-- sortie de texte
for i,v in pairs(text_settings) do
cr = cairo_create (cs)
display_text(v)
cairo_destroy(cr)
end
end -- fonction de fermeture
text.lua
Code :
--[[TEXT WIDGET v1.42 par Wlourf le 07 février 2011
Ce widget peut dessiner des textes dans la table "text_settings" avec quelques paramètres
http://u-scripts.blogspot.com/2010/06/text-widget.html
Pour appeler le script dans un conky, utilisez, avant TEXT
lua_load /path/to/the/script/graph.lua
lua_draw_hook_pre main_graph
et ajoutez une ligne (vide ou non) après TEXT
Les paramètres (tous les optionnels) sont:
texte - texte à afficher, défaut = "Conky est bon pour vous"
il peut être utilisé avec des variables conky, c'est-à-dire text = "mon cpu1 est $ {cpu cpu1}%")
- les coordonnées ci-dessous sont relatives au coin supérieur gauche de la fenêtre conique
x - x coordonnée de la première lettre (en bas à gauche), par défaut = centre de la fenêtre conky
y - y coordonnée de la première lettre (en bas à gauche), par défaut = centre de la fenêtre conky
h_align - alignement horizontal du texte par rapport au point (x, y), défaut = "l"
les valeurs disponibles sont "l": gauche, "c": centre, "r": droite
v_align - alignement vertical du texte par rapport au point (x, y), défaut = "b"
valeurs disponibles "t": haut, "m": milieu, "b": bas
font_name - nom de la police à utiliser, default = Free Sans
font_size - taille de la police à utiliser, par défaut = 14
italique - affiche le texte en italique (vrai / faux), défaut = faux
oblique - affiche le texte en oblique (vrai / faux), défaut = faux (je ne vois pas la différence avec italique!)
bold - affiche le texte en gras (vrai / faux), défaut = faux
angle - rotation du texte en degrés, par défaut = 0 (horizontal)
couleur - table de couleurs pour le texte, par défaut = blanc uni {{1,0xFFFFFF, 1}}
cette table contient une ou plusieurs tables au format {P, C, A}
P = position du dégradé (0 = début du texte, 1 = fin du texte)
C = couleur hexadécimale
A = alpha (opacité) de la couleur (0 = invisible, 1 = opacité 100%)
Exemples :
pour une couleur unie {{1,0x00FF00,0.5}}
pour un dégradé avec deux couleurs {{0,0x00FF00,0.5}, {1,0x000033,1}}
ou {{0.5,0x00FF00,1}, {1,0x000033,1}} - avec celui-ci, le dégradé commencera au milieu du texte
pour un dégradé avec trois couleurs {{0,0x00FF00,0.5}, {0.5,0x000033,1}, {1,0x440033,1}}
etc ...
orientation - en cas de gradient, "orientation" définit le point de départ du dégradé, défaut = "ww"
il y a 8 points de départ disponibles: "nw", "nn", "ne", "ee", "se", "ss", "sw", "ww"
(n pour le nord, w pour l'ouest ...)
thèses 8 points sont les 4 coins + les 4 milieux du contour du texte
donc un gradient "nn" passera de "nn" à "ss" (de haut en bas, parallélisé au texte)
un gradient "nw" passera de "nw" à "se" (coin supérieur gauche à coin inférieur droit)
radial - définit un gradient radial (si présent en même temps que "orientation", "orientation" n'aura aucun effet)
ce paramètre est une table avec 6 nombres: {xa, ya, ra, xb, yb, rb}
ils définissent deux cercles pour le dégradé:
xa, ya, xb et yb sont relatifs aux valeurs x et y ci-dessus
reflection_alpha - ajoute un effet de réflexion (valeurs de 0 à 1) défaut = 0 = pas de réflexion
autres valeurs = début de l'opacité
reflection_scale - échelle de la réflexion (par défaut = 1 = hauteur du texte)
reflection_length - longueur de la réflexion, définir où l'opacité sera mise à zéro
calues de 0 à 1, défaut = 1
skew_x, skew_y - incline le texte autour de l'axe x ou y
draw_me - si défini sur false, le texte n'est pas dessiné (par défaut = true ou 1)
il peut être utilisé avec une chaîne conky, si la chaîne renvoie 1, le texte est dessiné:
exemple: "$ {if_empty $ {sans fil wlan0}} $ {else} 1 $ endif",
v1.0 07/06/2010, Version originale
v1.1 10/06/2010 Ajouter un paramètre "orientation"
v1.2 15/06/2010 Ajout des paramètres "h_align", "v_align" et "radial"
v1.3 25/06/2010 Ajouter "reflection_alpha", "reflection_length", "reflection_scale",
"skew_x" et "skew_y"
v1.4 07/01/2011 Ajout du paramètre draw_me et correction des fuites de mémoire grâce à "Creamy Goodness"
le texte est analysé à l'intérieur de la fonction, pas dans le tableau de paramètres
v1.41 26/01/2011 Correction d'un bug pour h_align = "c"
v1.42 09/02/2011 Corriger bug pour l'orientation = "ee"
- Ce programme est un logiciel libre; vous pouvez le redistribuer et / ou modifier
- sous les termes de la Licence Publique Générale GNU telle que publiée par
- la Free Software Foundation version 3 (GPLv3)
-
- Ce programme est distribué dans l'espoir qu'il sera utile,
- mais SANS AUCUNE GARANTIE; sans même la garantie implicite de
- QUALITÉ MARCHANDE ou ADAPTATION À UN USAGE PARTICULIER. Voir le
- Licence publique générale GNU pour plus de détails.
-
- Vous devriez avoir reçu une copie de la Licence Publique Générale GNU
- avec ce programme; sinon, écrivez au logiciel libre
- Foundation, Inc., 51 rue Franklin, cinquième étage, Boston,
- MA 02110-1301, États-Unis.
Suggérer une modification
]]
require 'cairo'
function conky_draw_text()
local text_settings={
--BEGIN OF PARAMETERS
{--display a text at coordinates 20,20
text="unformatted text",
x=20,
y=20,
},
--[[
{--display a text at coordinates 20,40, with selected font and size, true and bold
text="bold and italic text",
x=20,
y=40,
font_name="Verdana",
font_size=18,
italic=true,
bold=true,
draw_me="${if_empty ${wireless_essid wlan0}}${else}1$endif",
},
{--display a text at coordinates 20,70, in green with opacity 0.8 and "oblique"
text="green text",
x=20,
y=70,
font_name="Verdana",
font_size=18,
oblique=true,
--colour table contains one or more tables with 3 elements, here:
--1 = starting point for gradient (0= beginning of the text, 1= end of the text)
--0x00FF00 = colour in hexadecimal
--0.8 = opacity (0=invisible, 1=opacity 100%)
colour={{1,0x00FF00,0.8}}
},
{--display a text at coordinates 20,100, with a red green blue gradient
text="text with gradient (ww)", --(default orientation=ww)
x=20,
y=100,
font_name="Clarendon",
font_size=25,
colour={{0,0xFF0000,0.9},{0.5,0x00FF00,1},{1,0xFFFF00,0.9}},
},
{--display a text at coordinates 20,130, with a red green yellow gradient
text="text with gradient (nn)",
x=20,
y=130,
font_name="Clarendon",
font_size=25,
orientation="nn",
colour={{0,0xFF0000,1},{0.5,0x00FF00,1},{1,0xFFFF00,1}},
},
{--display a text at coordinates 40,290, with a yellow blue yellow gradient
--with a 30° angle
text="text at 30 degrees",
x=400,
y=190,
colour={{0,0xFFFF00,1},{0.5,0x0000FF,1},{1,0xFFFF00,1}},
angle=-30,
font_name="Clarendon",
font_size=32
},
{--text with 5 colours gradient
text="vertical text",
x=50,
y=450,
colour={{0 ,0xFF0000,1},
{0.25 ,0xFFFF00,1},
{0.50 ,0x00FF00,1},
{0.75 ,0x00FFFF,1},
{1 ,0x0000FF,1}
},
angle=-90,
font_name="Clarendon",
font_size=40,
orientation="nw"
},
{--vertical text with 3 colours gradient
text="\"bumped\" effect",
x=250,
y=270,
colour={{0 ,0xDDDDDD,0.15},
{0.50 ,0xFFFFFF,1},
{1 ,0xDDDDDD,0.15}
},
font_name="Clarendon",
font_size=35,
orientation="nn"
},
--radial gradient
{
text="radial gradient",
x=400,
y=350,
font_name="Clarendon",
font_size="48",
colour={
{0.8,0xF0FFF0,1},
{1.00,0xF0F0FF,0.1},
},
h_align="c",
radial={0,300,0,0,300,370}
},
{
text="another radial gradient",
x=400,
y=400,
font_name="Clarendon",
font_size="48",
colour={
{0.98, 0xFFFF00,1},
{0.99, 0xFF0000,1},
{1.00, 0xFF00FF,1},
},
h_align="c",
v_align="m",
radial={0,-1000,0,0,-1000,1020}
},
{--display a text with some conly variables
--use two dots to concatenate texts
text="text with some conky, cpu= ${cpu} %",
x=20,
y=660,
colour={{0,0xFFFF00,1},{0.5,0xFF0000,1},{1,0xFFFF00,1}},
font_name="Purisa",
bold=true,
font_size=38
},
--text with shadow:
]]
{
text=conky_parse("${uptime}"),
x=50,
y=100,
font_name="Clarendon",
font_size=24,
colour={{0,0xFFFF00,1},{0.5,0xFF0000,1},{1,0xFFFF00,1}},
orientation="ww",
},
{
text='text with shadow #1',
x=298,
y=498,
font_name="Clarendon",
font_size=50,
colour={{0,0xFFFF00,1}},
orientation="ww",
},
--blur effect
{
text='blur effect',
x=300,
y=550,
font_name="Clarendon",
font_size=50,
colour={{0.00,0x00FF00,0.35},
},
},
{
text='blur effect',
x=299,
y=549,
font_name="Clarendon",
font_size=50,
colour={{0.00,0x00FF00,0.35},
},
},
{
text='blur effect',
x=301,
y=551,
font_name="Clarendon",
font_size=50,
colour={{0.00,0x00FF00,0.35},
},
},
--focus effect
{
text='focus effect #1',
x=300,
y=600,
font_name="Clarendon",
font_size=50,
colour={{0.00,0x00FFFF,0},
{0.50,0x00FFFF,1},
{1.00,0x00FFFF,0},
},
orientation="ww",
},
{
text='focus effect #1',
x=300,
y=599,
font_name="Clarendon",
font_size=50,
colour={{0.00,0x00FFFF,0.5},
{0.50,0x00FFFF,0},
{1.00,0x00FFFF,0.5},
},
orientation="ww",
},
{
text='focus effect #1',
x=300,
y=601,
font_name="Clarendon",
font_size=50,
colour={{0.00,0x00FFFF,0.5},
{0.50,0x00FFFF,0},
{1.00,0x00FFFF,0.5},
},
orientation="ww",
},
--focus effect 2
{
text='focus effect #2',
x=300,
y=720,
font_name="Clarendon",
font_size=50,
colour={{0.00,0x00FFFF,1},
{1,0x00FFFF,0},
},
},
{
text='focus effect #2',
x=299,
y=719,
font_name="Clarendon",
font_size=50,
colour={{0.00,0x00FFFF,0},
{1,0x00FFFF,0.25},
},
},
{
text='focus effect #2',
x=301,
y=721,
font_name="Clarendon",
font_size=50,
colour={{0.00,0x00FFFF,0},
{1,0x00FFFF,0.25},
},
},
--text with reflection
{
text="${time %H:%M:%S}",
y=730,
x=50,
font_name="Ubuntu-title",
font_size=50,
colour={{0,0xFF0000,1},{1,0xCCCCCC,1}},
orientation="nn",
reflection_alpha=0.8,
reflection_length=0.9
},
--skew x
{
text="skew x",
font_size=24,
colour={{0,0x00FF00,1},{1,0x00FFFF,1}},
x=30,
y=500,
skew_x=-10
},
--skew y
{
text="skew y",
font_size=24,
colour={{0,0x00FF00,1},{1,0x00FFFF,1}},
x=150,
y=500,
skew_y=10
},
--skew x + skew y
{
text="skew x-y",
font_size=24,
colour={{0,0x00FF00,1},{1,0x00FFFF,1}},
x=30,
y=550,
skew_y=10,
skew_x=10
},
--skew x + skew y
{
text="skew x-y",
font_size=24,
colour={{0,0x00FF00,1},{1,0x00FFFF,1}},
x=150,
y=550,
skew_y=10,
skew_x=10,
reflection_alpha=0.8,
reflection_scale=2,
reflection_length=1.5
},
}
--------------END OF PARAMETERS----------------
if conky_window == nil then return end
if tonumber(conky_parse("$updates"))<3 then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
for i,v in pairs(text_settings) do
cr = cairo_create (cs)
display_text(v)
cairo_destroy(cr)
cr = nil
end
cairo_surface_destroy(cs)
end
function rgb_to_r_g_b2(tcolour)
local colour,alpha=tcolour[2],tcolour[3]
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function display_text(t)
if t.draw_me==true then t.draw_me = nil end
if t.draw_me~=nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end
local function set_pattern(te)
--this function set the pattern
if #t.colour==1 then
cairo_set_source_rgba(cr,rgb_to_r_g_b2(t.colour[1]))
else
local pat
if t.radial==nil then
local pts=linear_orientation(t,te)
pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
else
pat = cairo_pattern_create_radial (t.radial[1],t.radial[2],t.radial[3],t.radial[4],t.radial[5],t.radial[6])
end
for i=1, #t.colour do
cairo_pattern_add_color_stop_rgba (pat, t.colour[i][1], rgb_to_r_g_b2(t.colour[i]))
end
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)
end
end
--set default values if needed
if t.text==nil then t.text="Conky is good for you !" end
if t.x==nil then t.x = conky_window.width/2 end
if t.y==nil then t.y = conky_window.height/2 end
if t.colour==nil then t.colour={{1,0xFFFFFF,1}} end
if t.font_name==nil then t.font_name="Free Sans" end
if t.font_size==nil then t.font_size=14 end
if t.angle==nil then t.angle=0 end
if t.italic==nil then t.italic=false end
if t.oblique==nil then t.oblique=false end
if t.bold==nil then t.bold=false end
if t.radial ~= nil then
if #t.radial~=6 then
print ("error in radial table")
t.radial=nil
end
end
if t.orientation==nil then t.orientation="ww" end
if t.h_align==nil then t.h_align="l" end
if t.v_align==nil then t.v_align="b" end
if t.reflection_alpha == nil then t.reflection_alpha=0 end
if t.reflection_length == nil then t.reflection_length=1 end
if t.reflection_scale == nil then t.reflection_scale=1 end
if t.skew_x==nil then t.skew_x=0 end
if t.skew_y==nil then t.skew_y=0 end
cairo_translate(cr,t.x,t.y)
cairo_rotate(cr,t.angle*math.pi/180)
cairo_save(cr)
local slant = CAIRO_FONT_SLANT_NORMAL
local weight = CAIRO_FONT_WEIGHT_NORMAL
if t.italic then slant = CAIRO_FONT_SLANT_ITALIC end
if t.oblique then slant = CAIRO_FONT_SLANT_OBLIQUE end
if t.bold then weight = CAIRO_FONT_WEIGHT_BOLD end
cairo_select_font_face(cr, t.font_name, slant,weight)
for i=1, #t.colour do
if #t.colour[i]~=3 then
print ("error in color table")
t.colour[i]={1,0xFFFFFF,1}
end
end
local matrix0 = cairo_matrix_t:create()
tolua.takeownership(matrix0)
local skew_x,skew_y=t.skew_x/t.font_size,t.skew_y/t.font_size
cairo_matrix_init (matrix0, 1,skew_y,skew_x,1,0,0)
cairo_transform(cr,matrix0)
cairo_set_font_size(cr,t.font_size)
local te=cairo_text_extents_t:create()
tolua.takeownership(te)
t.text=conky_parse(t.text)
cairo_text_extents (cr,t.text,te)
set_pattern(te)
local mx,my=0,0
if t.h_align=="c" then
mx=-te.width/2-te.x_bearing
elseif t.h_align=="r" then
mx=-te.width
end
if t.v_align=="m" then
my=-te.height/2-te.y_bearing
elseif t.v_align=="t" then
my=-te.y_bearing
end
cairo_move_to(cr,mx,my)
cairo_show_text(cr,t.text)
if t.reflection_alpha ~= 0 then
local matrix1 = cairo_matrix_t:create()
tolua.takeownership(matrix1)
cairo_set_font_size(cr,t.font_size)
cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(te.height+te.y_bearing+my)*(1+t.reflection_scale))
cairo_set_font_size(cr,t.font_size)
te=nil
local te=cairo_text_extents_t:create()
tolua.takeownership(te)
cairo_text_extents (cr,t.text,te)
cairo_transform(cr,matrix1)
set_pattern(te)
cairo_move_to(cr,mx,my)
cairo_show_text(cr,t.text)
local pat2 = cairo_pattern_create_linear (0,
(te.y_bearing+te.height+my),
0,
te.y_bearing+my)
cairo_pattern_add_color_stop_rgba (pat2, 0,1,0,0,1-t.reflection_alpha)
cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
--line is not drawn but with a size of zero, the mask won't be nice
cairo_set_line_width(cr,1)
local dy=te.x_bearing
if dy<0 then dy=dy*(-1) end
cairo_rectangle(cr,mx+te.x_bearing,te.y_bearing+te.height+my,te.width+dy,-te.height*1.05)
cairo_clip_preserve(cr)
cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
--cairo_stroke(cr)
cairo_mask(cr,pat2)
cairo_pattern_destroy(pat2)
cairo_set_operator(cr,CAIRO_OPERATOR_OVER)
te=nil
end
end
function linear_orientation(t,te)
local w,h=te.width,te.height
local xb,yb=te.x_bearing,te.y_bearing
if t.h_align=="c" then
xb=xb-w/2
elseif t.h_align=="r" then
xb=xb-w
end
if t.v_align=="m" then
yb=-h/2
elseif t.v_align=="t" then
yb=0
end
local p=0
if t.orientation=="nn" then
p={xb+w/2,yb,xb+w/2,yb+h}
elseif t.orientation=="ne" then
p={xb+w,yb,xb,yb+h}
elseif t.orientation=="ww" then
p={xb,h/2,xb+w,h/2}
elseif vorientation=="se" then
p={xb+w,yb+h,xb,yb}
elseif t.orientation=="ss" then
p={xb+w/2,yb+h,xb+w/2,yb}
elseif t.orientation=="ee" then
p={xb+w,h/2,xb,h/2}
elseif t.orientation=="sw" then
p={xb,yb+h,xb+w,yb}
elseif t.orientation=="nw" then
p={xb,yb,xb+w,yb+h}
end
return p
end
scale.lua
Code :
--[[cadrans mrpeachy mai 2011
créé par olgmen 11/12/2011
pour le travail il faut ajouter conkyrc au-dessus du mot TEXT
lua_load / chemin d'accès au fichier / scale.lua - modifier pour n'importe quoi et où vous avez enregistré le fichier
lua_draw_hook_pre draw_fig - doit être inchangé
x - coordonnées du coin supérieur gauche de l'échelle horizontalement
y - les coordonnées du coin supérieur droit de l'échelle verticalement
largeur - largeur de l'échelle
hauteur - hauteur de l'échelle
échelle - le nombre total de divisions affichées
couleur - la couleur des divisions et des chiffres affichés
color_middle - couleur des lignes centrales
alpha - saturation des couleurs
nom_fonte - nom de la police
font_size - Taille de la police
dernière mise à jour 02.01.2012
]]
require 'cairo'
function conky_draw_fig()
scale_settings = {
{
name = "",
arg = math.ceil(conky_parse("${time %S}")),
x = 100,
y = 50.5,
width = 60,
height = 200,
scale = 40, --combien de divisions peuvent être vus dans le cadran
font = "Ubuntu",
font_size = 12, --number font and font size
colour_scale = {{0, 0xff0000, 1},{0.5, 0xffffff, 1},{1, 0x0000ff, 1}},
},
}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
for i,v in pairs(scale_settings) do
cr = cairo_create (cs)
dialgraph(v)
cairo_destroy(cr)
end
end
-- ---------------------------------------------------------------------
-- функция перекодировки цвета
--[[
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
]]
-- ---------------------------------------------------------------------
function dialgraph (t)
-- local function rgb_to_r_g_b2(tcolour)
-- colour, alpha = tcolour[2], tcolour[3]
-- return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
-- end
local function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
-- vérifier les données et ajouter les données par défaut
if t.x == nil then t.x = conky_window.width/2 end
if t.y == nil then t.y = conky_window.height/2 end
if t.width == nil then t.width = 50 end
if t.height == nil then t.height = 100 end
if t.scale == nil then t.scale = 20 end
if t.alpha == nil then t.alpha = 1 end
if t.colour_middle == nil then t.colour_middle = 0xff5500 end
if t.font_name == nil then t.font_name = "Ubuntu" end
if t.font_size == nil then t.font_size = 14 end
if t.orientation == nil then t.orientation = "nn" end
if t.colour_scale == nil then
t.colour_scale = {{0, 0x333333, 0.75},{0.5, 0xffffff, 1},{1, 0x333333, 0.75}}
end
if t.draw_me == true then t.draw_me = nil end
if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end
local value = 0
if t.name ~= "" then
value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
else
value = tonumber(t.arg)
end
if value == nil then value = 0 end
--valuegraph
local adj = (value % 5)
local lines = tonumber(t.scale)
local gap = t.height/lines
cairo_set_line_width (cr, 1)
-- cairo_set_source_rgba(cr, rgb_to_r_g_b(t.colour, t.alpha))
cairo_select_font_face (cr, t.font_name, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr, t.font_size)
if #t.colour_scale == 1 then
cairo_set_source_rgba(cr,rgb_to_r_g_b2(t.colour_scale[1]))
else
local pat
local pts=linear_orientation_bg(t)
pat = cairo_pattern_create_linear (pts[1], pts[2], pts[3], pts[4])
for i=1, #t.colour_scale do
cairo_pattern_add_color_stop_rgba (pat, t.colour_scale[i][1], rgb_to_r_g_b2(t.colour_scale[i]))
end
cairo_set_source (cr, pat)
end
--calculate line and number positions
for i = 2,lines do
n = i
for i = 1, lines, 5 do
--print (i)
if n == (lines/2)+(5-adj)+i or n == (lines/2)+(5-adj)+(-i-3) then
len = -2*(t.width/5)
else
len = -1*(t.width/5)
end
if n == (lines/2)+(5-adj)+i then
num = value - adj + (i + 4)
elseif n == (lines/2)+(5-adj)+(-i-3) then
num = value - adj-(i-1)
else
num = ""
end
--print lines
cairo_move_to (cr, t.x+(t.width/2), t.y+t.height-(gap*(n-1)))
cairo_rel_line_to (cr, len, 0)
-- cairo_stroke (cr)
--print numbers
cairo_move_to (cr, t.x+(t.width/2)+2, t.y+t.height-(gap*(n-1))+(t.font_size/3))
cairo_show_text (cr, num)
cairo_stroke (cr)
end--for
end--for
--middle lines
cairo_set_source_rgba(cr, rgb_to_r_g_b(t.colour_middle, t.alpha))
cairo_move_to (cr, t.x + t.width, t.y + (t.height/2)+2)
cairo_rel_line_to (cr, -t.width, 0)
cairo_stroke (cr)
cairo_move_to (cr, t.x + t.width, t.y + (t.height/2)-2)
cairo_rel_line_to (cr, -t.width, 0)
cairo_stroke (cr)
cairo_pattern_destroy (pat)
--[[ local function linear_orientation_bg(t)
if t.orientation == "nn" then
p = {t.x + t.width/2, t.y, t.x + t.width/2, t.y + t.height}
elseif t.orientation == "ne" then
p = {t.x + t.width, t.y, t.x, t.y + t.height}
elseif t.orientation == "ee" then
p = {t.x + t.width, t.y + t.height/2, t.x, t.y + t.height/2}
elseif t.orientation == "se" then
p = {t.x +t.width, t.y + t.height, t.x, t.y}
elseif t.orientation == "ss" then
p = {t.x + t.width/2, t.y + t.height, t.x + t.width/2, t.y}
elseif t.orientation == "sw" then
p = {t.x, t.y + t.height, t.x + t.width, t.y}
elseif t.orientation == "ww" then
p = {t.x, t.y + t.height/2, t.x + t.width, t.y + t.height/2}
else
p = {t.x, t.y, t.x + t.width, t.y + t.height}
end
return p
end
]]
end
function rgb_to_r_g_b2(tcolour)
colour, alpha = tcolour[2], tcolour[3]
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function linear_orientation_bg(t)
if t.orientation == "nn" then
p = {t.x + t.width/2, t.y, t.x + t.width/2, t.y + t.height}
elseif t.orientation == "ne" then
p = {t.x + t.width, t.y, t.x, t.y + t.height}
elseif t.orientation == "ee" then
p = {t.x + t.width, t.y + t.height/2, t.x, t.y + t.height/2}
elseif t.orientation == "se" then
p = {t.x +t.width, t.y + t.height, t.x, t.y}
elseif t.orientation == "ss" then
p = {t.x + t.width/2, t.y + t.height, t.x + t.width/2, t.y}
elseif t.orientation == "sw" then
p = {t.x, t.y + t.height, t.x + t.width, t.y}
elseif t.orientation == "ww" then
p = {t.x, t.y + t.height/2, t.x + t.width, t.y + t.height/2}
else
p = {t.x, t.y, t.x + t.width, t.y + t.height}
end
return p
end

.gif)
Linuxmint 19.1 Tessa - Mageia 7rc Mate sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 19.04 en xfce sur ASUS Rog STRIX
loutch
Membre non connecté

.gif)
cronographe (conky en version 1.10)
conkyrc
Code TEXT :
conky.config = { background = true, use_xft = true, font = 'hooge 05_53:size=6', xftalpha = 1, update_interval = 1.0, total_run_times = 0, net_avg_samples = 2, 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 = 320, minimum_height = 320, maximum_width = 320, 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_right', gap_x = 120, gap_y = 70, no_buffers = true, uppercase = false, cpu_avg_samples = 2, override_utf8_locale = true, imlib_cache_flush_interval = 60, imlib_cache_size = 10000, stippled_borders = 5, -- Couleurs default_color = '#ffffff', --ffd579 default_shade_color = '#333333', default_outline_color = 'black', color0 = 'white', color1 = 'orange', color2 = 'green', color3 = '#000000', color4 = '#FF0000', color5 = '#696969', color6 = '#BDB76B', color7 = '#00FF01', color8 = '#cccccc', lua_load = '~/.conky/cronograph/scripts/cups.lua', lua_draw_hook_post = 'main', }; conky.text = [[ ${execi 3600 bash $HOME/1_accuweather/1_accuweather -f2016} ${voffset 85}${goto 85}${font hooge 05_53:size=12}${time %H:%M}${font}${goto 215}UPTIME: ${voffset 2}${goto 72}${time %a %d %b}${goto 215}${uptime} ${voffset 2}${goto 90}${time %Y}${alignc -75}Temp.${hwmon 0 temp 1}°C ${voffset 84}${goto 75}Signal: ${wireless_link_qual_perc wlo1} % ${voffset -60}${goto 146}${font conkyweather:size=34}${execi 600 sed -n '22p' $HOME/1_accuweather/curr_cond}${font} ${voffset -60}${goto 154}${font hooge 05_53:size=12}${execpi 600 sed -n '2p' ~/1_accuweather/curr_cond}°C${font} ${voffset -16}${goto 200}${execpi 600 sed -n '4p' ~/1_accuweather/curr_cond | cut -c1-14} ${goto 200}${execpi 600 sed -n '4p' ~/1_accuweather/curr_cond | cut -c15-30} ${goto 200}Vent: ${execpi 600 sed -n '5p' ~/1_accuweather/curr_cond} ${execpi 600 sed -n '6p' ~/1_accuweather/curr_cond} ${goto 200}Hum: ${execpi 600 sed -n '7p' ~/1_accuweather/curr_cond} ${voffset -3}${font conkyweather:size=20}${goto 230}${execi 600 sed -n '27p' $HOME/1_accuweather/first_days}${font} ${voffset 1}${goto 220}${execi 600 sed -n '9p' $HOME/1_accuweather/first_days}°C - ${execi 600sed -n '8p' $HOME/1_accuweather/first_days}°C ${goto 225}${execi 3600 echo `date --date="1 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="1 day" | awk '{print $2}'`}\ ${voffset -10}${font conkyweather:size=20} ${goto 90}${execi 600 sed -n '28p' $HOME/1_accuweather/first_days} ${voffset -34}${goto 226}${execi 600 sed -n '29p' $HOME/1_accuweather/first_days}${font} ${voffset -1} ${goto 80}${execi 600 sed -n '14p' $HOME/1_accuweather/first_days}°C - ${execi 600 sed -n '13p' $HOME/1_accuweather/first_days}°C\ ${goto 215}${execi 600 sed -n '19p' $HOME/1_accuweather/first_days}°C - ${execi 600 sed -n '18p' $HOME/1_accuweather/first_days}°C ${goto 80}${execi 3600 echo `date --date="2 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="2 day" | awk '{print $2}'`}\ ${goto 215}${execi 3600 echo `date --date="3 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="3 day" | awk '{print $2}'`} ${execpi 1 cat ~/.conky/cronograph/scripts/blinkingLED} ]];
conkyrc1 (pour le deuxième lua)
Code TEXT :
conky.config = { background = true, use_xft = true, font = 'hooge 05_53:size=6', xftalpha = 1, update_interval = 1.0, total_run_times = 0, net_avg_samples = 2, 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 = 320, minimum_height = 320, maximum_width = 320, 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_right', gap_x = 120, gap_y = 70, no_buffers = true, uppercase = false, cpu_avg_samples = 2, override_utf8_locale = true, imlib_cache_flush_interval = 60, imlib_cache_size = 10000, stippled_borders = 5, -- Couleurs default_color = '#ffffff', --ffd579 default_shade_color = '#333333', default_outline_color = 'black', color0 = 'white', color1 = 'orange', color2 = 'green', color3 = '#000000', color4 = '#FF0000', color5 = '#696969', color6 = '#BDB76B', color7 = '#00FF01', color8 = '#cccccc', lua_load = '~/.conky/cronograph/scripts/clock_rings.lua', lua_draw_hook_pre = 'clock_rings', }; conky.text = [[ ]];
cups.lua
Code TEXT :
--- --============================================================================== -- Cups and Saucers -- Lua conky script -- -- author : Abu Yahya -- license : Distributed under the terms of GNU GPL v3 -- 30.05.2012 -- v.1.0.1 --============================================================================== require 'cairo' -------------------------------------------------------------------------------- ----Adjustable Settings coffee_table = { { name='time', arg='%I', max_value=12, x=170, y=170, cup_radius=35, cup_wall_thickness=90, cup_bg_clr=0xffffff, cup_bg_alpha=0.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=0.0, handle_length=70, handle_circ=5, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, --1.0 graduation_radius=124, graduation_thickness=8, graduation_mark_circ=1.5, graduation_mark_angle=30, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.5, saucer_thickness=6, thick_saucer_circ=11/12, saucer_radius=135, thin_saucer_circ=11/12, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha=0.3, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.0, inner_saucer=true, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=0.0, caption='', caption2='', }, { name='time', arg='%H', max_value=12, x=170, y=170, cup_radius=2.5, cup_wall_thickness=3, cup_bg_clr=0xffffff, cup_bg_alpha=1.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=1.0, handle_length=40, handle_circ=4, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, --1.0 graduation_radius=127, graduation_thickness=1, graduation_mark_circ=0.5, graduation_mark_angle=3, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.5, saucer_thickness=6, thick_saucer_circ=11/12, saucer_radius=135, thin_saucer_circ=11/12, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha=0.0, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.0, inner_saucer=true, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=0.0, caption='', caption2='', }, { name='time', arg='%M', max_value=60, x=170, y=170, cup_radius=55, cup_wall_thickness=120, cup_bg_clr=0xffffff, cup_bg_alpha=0.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=0.0, graduation_radius=123, graduation_thickness=10, graduation_mark_circ=2.5, graduation_mark_angle=90, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.5, handle_length=110, handle_circ=3, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, --1.0 saucer_thickness=6, thick_saucer_circ=11/12, saucer_radius=155, thin_saucer_circ=11/12, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha=0.3, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.0, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=0.0, caption='', caption2='', }, { name='time', arg='%S', max_value=60, x=170, y=170, cup_radius=59, cup_wall_thickness=120, cup_bg_clr=0xffffff, cup_bg_alpha=0.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=0.0, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, --1.0 handle_length=118, handle_circ=1, graduation_radius=125, graduation_thickness=6, graduation_mark_circ=0.5, graduation_mark_angle=6, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.5, saucer_thickness=5, thick_saucer_circ=1, saucer_radius=145, thin_saucer_circ=11/12, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha=0.4, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.4, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=0.0, caption='', caption2='', }, { name='cpu', arg='cpu0', max_value=100, x=170, y=100, cup_radius=20, cup_wall_thickness=40, cup_start_angle=0, cup_bg_clr=0xFFFFFF, cup_bg_alpha=0.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=0.0, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, handle_length=40, handle_circ=4, xtxt=-20, ytxt= -5, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=1, caption=' CPU ', caption2=' %', graduation_radius=25, graduation_thickness=3, graduation_mark_circ=2, graduation_mark_angle=36, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.6, saucer_thickness=3, thick_saucer_circ=0.85, saucer_radius=30, thin_saucer_circ=0.85, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha= 0.3, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.5, inner_saucer=true, }, { name='freq_g', arg='/', max_value=5, x=170, y=100, cup_radius=12, cup_wall_thickness=23, cup_start_angle=0, cup_bg_clr=0xFFFFFF, cup_bg_alpha=0.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=0.0, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, handle_length=40, handle_circ=4, xtxt=-20, ytxt= 10, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=1, caption='', caption2=' GHz', graduation_radius=25, graduation_thickness=4, graduation_mark_circ=4, graduation_mark_angle=30, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.0, saucer_thickness=3, thick_saucer_circ=0.75, saucer_radius=35, thin_saucer_circ=0.75, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha= 0.3, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.5, }, ---------------1/2 { name='downspeedf', arg='wlo1', max_value=100, x=100, y=170, cup_radius=12, cup_wall_thickness=23, cup_start_angle=0, cup_bg_clr=0xFFFFFF, cup_bg_alpha=0.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=0.0, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, handle_length=40, handle_circ=4, xtxt=-20, ytxt= -5, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=1, caption='E. ', caption2='', graduation_radius=25, graduation_thickness=3, graduation_mark_circ=2, graduation_mark_angle=36, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.6, saucer_thickness=3, thick_saucer_circ=0.85, saucer_radius=30, thin_saucer_circ=0.85, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha= 0.3, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.5, inner_saucer=true, }, { name='upspeedf', arg='wlo1', max_value=100, x=100, y=170, cup_radius=12, cup_wall_thickness=27, cup_start_angle=0, cup_bg_clr=0xFFFFFF, cup_bg_alpha=0.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=0.0, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, handle_length=40, handle_circ=4, xtxt=-20, ytxt= 10, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=1, caption='S ', caption2='', graduation_radius=25, graduation_thickness=4, graduation_mark_circ=4, graduation_mark_angle=30, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.0, saucer_thickness=3, thick_saucer_circ=0.85, saucer_radius=35, thin_saucer_circ=0.85, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha=0.3, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.5, }, ------------------2/3 { name='fs_used_perc', arg='/home', max_value=100, x=170, y=240, cup_radius=12, cup_wall_thickness=27, cup_start_angle=0, cup_bg_clr=0xFFFFFF, cup_bg_alpha=0.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=0.0, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, handle_length=40, handle_circ=4, xtxt=-20, ytxt= 10, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=1, caption=' FS /: ', caption2=' %', graduation_radius=25, graduation_thickness=3, graduation_mark_circ=2, graduation_mark_angle=36, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.6, saucer_thickness=3, thick_saucer_circ=0.85, saucer_radius=30, thin_saucer_circ=0.85, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha=0.3, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.5, inner_saucer=true, }, { name='fs_used_perc', arg='/', max_value=100, x=170, y=240, cup_radius=12, cup_wall_thickness=27, cup_start_angle=0, cup_bg_clr=0xFFFFFF, cup_bg_alpha=0.0, cup_fg_clr=0xFFFFFF, cup_fg_alpha=0.0, handle_fg_clr=0xFFFFFF, handle_fg_alpha=0.0, handle_length=40, handle_circ=4, xtxt=-20, ytxt= -5, txt_weight=0, txt_size=8.0, txt_fg_clr=0xFFFFFF, txt_fg_alpha=0.8, caption=' FS H: ', caption2=' %', graduation_radius=25, graduation_thickness=4, graduation_mark_circ=4, graduation_mark_angle=36, graduation_fg_clr=0xFFFFFF, graduation_fg_alpha=0.0, saucer_thickness=3, thick_saucer_circ=0.85, saucer_radius=35, thin_saucer_circ=0.85, saucer_fg_clr=0xFFFFFF, saucer_fg_alpha=0.3, saucer_mark_fg_clr=0xFFFFFF, saucer_mark_fg_alpha=0.5, }, } --Fixed code -do not edit unless you know what you are doing------------------------------------------------------------------------ ------------------------------------------------------------------------------- -- converts color in hexa to decimal function rgb_to_r_g_b(clr, alpha) return ((clr / 0x10000) % 0x100) / 255., ((clr / 0x100) % 0x100) / 255., (clr % 0x100) / 255., alpha end ------------------------------------------------------------------------------- ------------------------------------------------------------------------ -- displays cups and saucers local function draw_coffee_table(display, data, value) max_value = data['max_value'] x, y = data['x'], data['y'] if x==nil then x=conky_window.width/2 end if y==nil then y=conky_window.height/2 end cup_radius = data['cup_radius'] if cup_radius==nil then cup_radius=conky_window.width/4 end cup_wall_thickness = data['cup_wall_thickness'] if cup_wall_thickness==nil then cup_wall_thickness=20 end handle_length, handle_circ = data['handle_length'], data['handle_circ'] if handle_length==nil then handle_length=20 end if handle_circ==nil then handle_circ=1 end cup_start_angle = data['cup_start_angle'] if cup_start_angle == nil then cup_start_angle =0 end total_angle = data['total_angle'] if total_angle == nil then total_angle=360 end cup_sector_angle = (math.abs(total_angle))/max_value cup_end_angle = total_angle + cup_start_angle cup_bg_clr, cup_bg_alpha = data['cup_bg_clr'], data['cup_bg_alpha'] if cup_bg_clr==nil then cup_bg_clr =0xffffff end cup_fg_clr, cup_fg_alpha = data['cup_fg_clr'], data['cup_fg_alpha'] if cup_fg_clr==nil then cup_fg_clr =0xffffff end if cup_fg_alpha==nil then cup_fg_alpha=0 end handle_fg_clr, handle_fg_alpha = data['handle_fg_clr'], data['handle_fg_alpha'] if handle_fg_clr==nil then handle_fg_clr = 0xffffff end if handle_fg_alpha==nil then handle_fg_alpha=0 end saucer_radius = data['saucer_radius'] if saucer_radius==nil then saucer_radius=conky_window.width/2 end total_saucer_angle=data['total_saucer_angle'] if total_saucer_angle==nil then total_saucer_angle=360 end saucer_sector_angle=(math.abs(total_saucer_angle))/max_value saucer_thickness = data['saucer_thickness'] if saucer_thickness==nil then saucer_thickness=6 end saucer_fg_clr = data['saucer_fg_clr'] if saucer_fg_clr ==nil then saucer_fg_clr=0 end saucer_fg_alpha = data['saucer_fg_alpha'] if saucer_fg_alpha ==nil then saucer_fg_alpha=0 end saucer_mark_fg_alpha = data['saucer_mark_fg_alpha'] if saucer_mark_fg_alpha ==nil then saucer_mark_fg_alpha=0 end saucer_mark_fg_clr = data['saucer_mark_fg_clr'] if saucer_mark_fg_clr ==nil then saucer_mark_fg_clr=0xffffff end thick_saucer_circ = data['thick_saucer_circ'] if thick_saucer_circ==nil then thick_saucer_circ =0.9 end thin_saucer_circ = data['thin_saucer_circ'] if thin_saucer_circ==nil then thin_saucer_circ =0.9 end inner_saucer = data['inner_saucer'] graduation_radius = data['graduation_radius'] if graduation_radius ==nil then graduation_radius = conky_window.width/3 end graduation_thickness, graduation_mark_circ = data['graduation_thickness'], data['graduation_mark_circ'] if graduation_thickness ==nil then graduation_thickness = 2 end if graduation_mark_circ ==nil then graduation_mark_circ = 1 end graduation_mark_angle = data['graduation_mark_angle'] if graduation_mark_angle == nil then graduation_mark_angle = total_angle/10 end graduation_fg_clr, graduation_fg_alpha = data['graduation_fg_clr'], data['graduation_fg_alpha'] if graduation_fg_clr ==nil then graduation_fg_clr= 0xffffff end if graduation_fg_alpha==nil then graduation_fg_alpha =0 end txt_weight, txt_size = data['txt_weight'], data['txt_size'] if txt_weight == nil then txt_weight=1 end if txt_size == nil then txt_size=8 end txt_fg_clr, txt_fg_alpha = data['txt_fg_clr'], data['txt_fg_alpha'] if txt_fg_clr ==nil then txt_fg_clr= 0xffffff end if txt_fg_alpha==nil then txt_fg_alpha =0 end caption = data['caption'] if caption==nil then caption='' end caption2 = data['caption2'] if caption2==nil then caption2='' end xtxt, ytxt= data ['xtxt'], data['ytxt'] if xtxt ==nil then xtxt=0 end if ytxt ==nil then ytxt=0 end --convert degree to rad and rotate (0 degree is top/north) function angle_to_position(start_angle, current_angle) if total_angle < 0 then local pos = start_angle - current_angle return ( ( pos * (math.pi / 180) ) - (math.pi / 2) ) else local pos = current_angle + start_angle return ( ( pos * (math.pi / 180) ) - (math.pi / 2) ) end end --cup centre background if cup_bg_alpha >0 then if total_angle < 0 then cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_end_angle, 0)) else cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, cup_end_angle)) end cairo_set_source_rgba(display, rgb_to_r_g_b(cup_bg_clr, cup_bg_alpha)) cairo_set_line_width(display, cup_wall_thickness) cairo_stroke(display) end --cup wall fg if cup_fg_alpha > 0 then local fg_stop_arc = (cup_sector_angle * value) if total_angle < 0 then cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, fg_stop_arc)) else cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, fg_stop_arc)) end cairo_set_source_rgba(display, rgb_to_r_g_b(cup_fg_clr, cup_fg_alpha)) cairo_set_line_width(display, cup_wall_thickness) cairo_stroke(display) end -- cup handle if handle_fg_alpha>0 then local start_handle = (cup_sector_angle * value) - (handle_circ*0.5) local stop_handle = (cup_sector_angle * value) + (handle_circ*0.5) if total_angle < 0 then cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, start_handle), angle_to_position(cup_start_angle, stop_handle)) else cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, start_handle), angle_to_position(cup_start_angle, stop_handle)) end cairo_set_line_width(display, handle_length) cairo_set_source_rgba(display, rgb_to_r_g_b(handle_fg_clr, handle_fg_alpha)) cairo_stroke(display) end --saucers ---thick saucer if saucer_fg_alpha > 0 and (thin_saucer_circ >0 or thick_saucer_circ > 0) then if value < (max_value/2) then j = value + ((max_value*total_saucer_angle)/720) else j = value - ((max_value*total_saucer_angle)/720) end local start_saucer = (saucer_sector_angle * j) - (value*saucer_sector_angle*0.5*thick_saucer_circ) local stop_saucer = (saucer_sector_angle * j) + (value*saucer_sector_angle*0.5*thick_saucer_circ) if total_angle < 0 then cairo_arc_negative(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_saucer), angle_to_position(cup_start_angle, stop_saucer)) else cairo_arc(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_saucer), angle_to_position(cup_start_angle, stop_saucer)) end cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_fg_clr, saucer_fg_alpha)) cairo_set_line_width(display, saucer_thickness) cairo_stroke(display) --thin saucer if inner_saucer == true then rt = (saucer_radius - 0.5) + (0.5 * saucer_thickness) else rt = (saucer_radius + 0.5) - (0.5 * saucer_thickness) end local start_thin_saucer = (saucer_sector_angle * j) - (max_value *0.5*saucer_sector_angle*thin_saucer_circ) local stop_thin_saucer = (saucer_sector_angle * j) + (max_value *0.5*saucer_sector_angle*thin_saucer_circ) if total_angle < 0 then cairo_arc_negative(display, x, y, rt, angle_to_position(cup_start_angle, start_thin_saucer), angle_to_position(cup_start_angle, stop_thin_saucer)) else cairo_arc(display, x, y, rt, angle_to_position(cup_start_angle, start_thin_saucer), angle_to_position(cup_start_angle, stop_thin_saucer)) end cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_fg_clr, saucer_fg_alpha)) cairo_set_line_width(display, 1) cairo_stroke(display) end --saucer mark if saucer_mark_fg_alpha > 0 then local start_cm = (saucer_sector_angle * value) - (handle_circ *0.5 ) local stop_cm = (saucer_sector_angle * value) + (handle_circ *0.5 ) if total_angle < 0 then cairo_arc_negative(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_cm), angle_to_position(cup_start_angle, stop_cm)) else cairo_arc(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_cm), angle_to_position(cup_start_angle, stop_cm)) end cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_mark_fg_clr, saucer_mark_fg_alpha)) cairo_set_line_width(display, saucer_thickness) cairo_stroke(display) end --graduation mark if graduation_radius > 0 and graduation_thickness > 0 and graduation_mark_angle > 0 then number_graduation = (math.abs(total_angle) +1)/ graduation_mark_angle local start_arc_grad = 0 local stop_arc_grad = 0 local i = 0 while i < number_graduation do local start_arc_grad = (graduation_mark_angle * (i)) - (graduation_mark_circ *0.5) local stop_arc_grad = (graduation_mark_angle * (i)) + (graduation_mark_circ *0.5) if total_angle < 0 then cairo_arc_negative(display, x, y, graduation_radius, angle_to_position(cup_start_angle, start_arc_grad), angle_to_position(cup_start_angle, stop_arc_grad)) else cairo_arc(display, x, y, graduation_radius, angle_to_position(cup_start_angle, start_arc_grad), angle_to_position(cup_start_angle, stop_arc_grad)) end cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_clr,graduation_fg_alpha)) cairo_set_line_width(display, graduation_thickness) cairo_stroke(display) i = i + 1 end end -- text if txt_fg_alpha>0 then cairo_select_font_face (display, "hooge 05_53", CAIRO_FONT_SLANT_NORMAL, txt_weight); cairo_set_font_size (display,txt_size) cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_clr, txt_fg_alpha)) cairo_move_to (display,x+xtxt,y+ytxt) cairo_show_text (display, caption ) cairo_show_text (display,value)cairo_show_text (display, caption2 ) cairo_stroke (display) end end ------------------------------------------------------------------------------- -- loads data and displays table_settings function display_coffee_table(display) local function load_coffee_table(display, data) local str, value = '', 0 if data['name'] == 'time2' then local max_value = data['max_value'] str = string.format('${time %s}', data['arg']) str = conky_parse(str) local value2 = tonumber(str:sub(0,2)) if value2 == max_value then value2 = 0 end value = value2 + (tonumber(str:sub(4,5))/60) else str = string.format('${%s %s}',data['name'], data['arg']) str = conky_parse(str) value = tonumber(str) end if value == nil then value = 0 end draw_coffee_table(display, data, value) end for i in pairs(coffee_table) do load_coffee_table(display, coffee_table[i]) end end ------------------------------------------------------------------------------- runscheck = 0 -- fix for draw shades running script twice on every update function conky_main() if conky_window == nil then return end local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height) local display = cairo_create(cs) local updates = conky_parse('${updates}') update_num = tonumber(updates) if update_num > 5 then cairo_set_antialias (display, CAIRO_ANTIALIAS_SUBPIXEL) display_coffee_table(display) cairo_set_antialias (display, CAIRO_ANTIALIAS_DEFAULT) end cairo_surface_destroy(cs) cairo_destroy(display) end
clock_rings.lua
Code TEXT :
--[[ Clock Rings by londonali1010 (2009) This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script. IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement near the end of the script uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error. To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua): lua_load ~/scripts/clock_rings-v1.1.1.lua lua_draw_hook_pre clock_rings Changelog: + v1.1.1 -- Fixed minor bug that caused the script to crash if conky_parse() returns a nil value (20.10.2009) + v1.1 -- Added colour option for clock hands (07.10.2009) + v1.0 -- Original release (30.09.2009) ]] settings_table = { { -- Edit this table to customise your rings. -- You can create more rings simply by adding more elements to settings_table. -- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'. name='time', -- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''. arg='%I', -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100. max=12, -- "bg_colour" is the colour of the base ring. bg_colour=0xFFFFFF, -- "bg_alpha" is the alpha value of the base ring. bg_alpha=0.0, -- "fg_colour" is the colour of the indicator part of the ring. fg_colour=0xFFFFFF, -- "fg_alpha" is the alpha value of the indicator part of the ring. fg_alpha=0.0, -- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window. x=150, y=150, -- "radius" is the radius of the ring. radius=133, -- "thickness" is the thickness of the ring, centred around the radius. thickness=4, -- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative. start_angle=0, -- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle. end_angle=360 }, { name='time', arg='%M', max=60, bg_colour=0xFFFFFF, bg_alpha=0.0, fg_colour=0xFFFFFF, fg_alpha=0.0, x=150, y=150, radius=140, thickness=4, start_angle=0, end_angle=360 }, { name='time', arg='%S', max=60, bg_colour=0xFFFFFF, bg_alpha=0.0, fg_colour=0xFFFFFF, fg_alpha=0.0, x=150, y=150, radius=147, thickness=4, start_angle=0, end_angle=360 }, } -- Use these settings to define the origin and extent of your clock. clock_r=127 -- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window. clock_x=170 clock_y=170 -- Colour & alpha of the clock hands clock_colour=0xFFFFFF clock_alpha=1 -- Do you want to show the seconds hand? show_seconds=true require 'cairo' function rgb_to_r_g_b(colour,alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end function draw_ring(cr,t,pt) local w,h=conky_window.width,conky_window.height local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle'] local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha'] local angle_0=sa*(2*math.pi/360)-math.pi/2 local angle_f=ea*(2*math.pi/360)-math.pi/2 local t_arc=t*(angle_f-angle_0) -- Draw background ring cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f) cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga)) cairo_set_line_width(cr,ring_w) cairo_stroke(cr) -- Draw indicator ring cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc) cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga)) cairo_stroke(cr) end function draw_clock_hands(cr,xc,yc) local secs,mins,hours,secs_arc,mins_arc,hours_arc local xh,yh,xm,ym,xs,ys secs=os.date("%S") mins=os.date("%M") hours=os.date("%I") secs_arc=(2*math.pi/60)*secs mins_arc=(2*math.pi/60)*mins+secs_arc/60 hours_arc=(2*math.pi/12)*hours+mins_arc/12 -- Draw hour hand xh=xc+0.7*clock_r*math.sin(hours_arc) yh=yc-0.7*clock_r*math.cos(hours_arc) cairo_move_to(cr,xc,yc) cairo_line_to(cr,xh,yh) cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND) cairo_set_line_width(cr,5) cairo_set_source_rgba(cr,rgb_to_r_g_b(clock_colour,clock_alpha)) cairo_stroke(cr) -- Draw minute hand xm=xc+clock_r*math.sin(mins_arc) ym=yc-clock_r*math.cos(mins_arc) cairo_move_to(cr,xc,yc) cairo_line_to(cr,xm,ym) cairo_set_line_width(cr,3) cairo_stroke(cr) -- Draw seconds hand if show_seconds then xs=xc+clock_r*math.sin(secs_arc) ys=yc-clock_r*math.cos(secs_arc) cairo_move_to(cr,xc,yc) cairo_line_to(cr,xs,ys) cairo_set_line_width(cr,1) -- (cr,1) cairo_stroke(cr) end end function conky_clock_rings() local function setup_rings(cr,pt) local str='' local value=0 str=string.format('${%s %s}',pt['name'],pt['arg']) str=conky_parse(str) value=tonumber(str) if value == nil then value = 0 end pct=value/pt['max'] draw_ring(cr,pct,pt) end -- Check that Conky has been running for at least 5s if conky_window==nil then return end local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height) local cr=cairo_create(cs) local updates=conky_parse('${updates}') update_num=tonumber(updates) if update_num>5 then for i in pairs(settings_table) do setup_rings(cr,settings_table[i]) end end draw_clock_hands(cr,clock_x,clock_y) end
blinkingdLED
Code TEXT :
${image $HOME/.conky/cronograph/images/Blank.png -p 145, 32 -s 40x40}${if_match ${execi 1 num=$(date +%-S);rem=$(( num % 2 ));if [ $rem -eq 0 ] ; then echo 0 ; else echo 1 ; fi}==0}${image $HOME/.conky/cronograph/images/Blue.png -p 145, 32 -s 40x40}${endif} ${image $HOME/.conky/cronograph/images/Blank.png -p 145, 258 -s 40x40}${if_match ${execi 1 num=$(date +%-S);rem=$(( num % 2 ));if [ $rem -eq 0 ] ; then echo 0 ; else echo 1 ; fi}==0}${image $HOME/.conky/cronograph/images/Blue.png -p 145, 258 -s 40x40}${endif} ${image $HOME/.conky/cronograph/images/Blank.png -p 33, 145 -s 40x40}${if_match ${execi 1 num=$(date +%-S);rem=$(( num % 2 ));if [ $rem -eq 0 ] ; then echo 0 ; else echo 1 ; fi}==0}${image $HOME/.conky/cronograph/images/Blue.png -p 33, 145 -s 40x40}${endif} ${image $HOME/.conky/cronograph/images/Blank.png -p 257, 145 -s 40x40}${if_match ${execi 1 num=$(date +%-S);rem=$(( num % 2 ));if [ $rem -eq 0 ] ; then echo 0 ; else echo 1 ; fi}==0}${image $HOME/.conky/cronograph/images/Blue.png -p 257, 145 -s 40x40}${endif}

.gif)
Linuxmint 19.1 Tessa - Mageia 7rc Mate sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 19.04 en xfce sur ASUS Rog STRIX
loutch
Membre non connecté

Re
Non les plasmoïdes sont des specialités de kde comme les widgets et autre pour xfce et autre bureau
plus de détails ici .
https://www.mageialinux-online.org/wiki/conky-bases-et
Le truc ,c'est que conky est passer en version 1.10 et avec du lua c'est pas trop top. Là ou avec l'ancienne version 1 conky suffisait maintenant c'est un conky par script lua .
Prenons comme exemple le cronograph plus haut ,ici il y à deux conkys car deux scripts lua .
@+
Edité par loutch Le 08/06/2019 à 16h30
Non les plasmoïdes sont des specialités de kde comme les widgets et autre pour xfce et autre bureau
plus de détails ici .
https://www.mageialinux-online.org/wiki/conky-bases-et
Le truc ,c'est que conky est passer en version 1.10 et avec du lua c'est pas trop top. Là ou avec l'ancienne version 1 conky suffisait maintenant c'est un conky par script lua .
Prenons comme exemple le cronograph plus haut ,ici il y à deux conkys car deux scripts lua .
@+
Edité par loutch Le 08/06/2019 à 16h30
Linuxmint 19.1 Tessa - Mageia 7rc Mate sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 19.04 en xfce sur ASUS Rog STRIX
magnux77
Membre non connecté

Heu... Salut Loutch, tu as l'air d'être le king en conky !
J'en avais fait en Mageia 6. En Mageia 7, plus rien ne fonctionne. Et je ne retrouve les versions que tu indiques :
En Magiea6 :
- conky version 1.10.6 révision 1.mga6
- conky-manager version 2.3.4 révison 1.mga6
En Magiea7 :
- conky version 1.11.3 révision 2.mga7
- conky-manager version 2.4 révison 2.mga7
Il doit y avoir un gros truc que je n'ai pas compris. Si tu peux éclairer un peu ma lanterne et me donner quelques pistes pour la migration. Est-ce trop demander ?...

J'en avais fait en Mageia 6. En Mageia 7, plus rien ne fonctionne. Et je ne retrouve les versions que tu indiques :
En Magiea6 :
- conky version 1.10.6 révision 1.mga6
- conky-manager version 2.3.4 révison 1.mga6
En Magiea7 :
- conky version 1.11.3 révision 2.mga7
- conky-manager version 2.4 révison 2.mga7
Il doit y avoir un gros truc que je n'ai pas compris. Si tu peux éclairer un peu ma lanterne et me donner quelques pistes pour la migration. Est-ce trop demander ?...

...depuis Mandrake 7
Membre de l'April - « promouvoir et défendre le Logiciel Libre»
Soutien Framasoft - « Changer le monde, un octet à la fois»
Config n°1 : cpu=AMD64x6 mem=16G SSD=64G HDD=1T OS=Mageia7-64 DE=Xfce, Config n°2 : Dell Latitude E6410 SSD=120G OS=Mageia7 DE=Xfce, Config n°3 : ThinkpadR40 SSD=32G OS=[Manjaro, Parabola, Mageia6] DE=Xfce, Config n°4 : EeePC901 SSD=20Gb, OS=[SliTaz5/Lxde, Mageia6/Xfce]
loutch
Membre non connecté

Re
Non no problemo
j'ai pas conky 1.11 mais il devrait quand même le faire .
Attention aux chemins des scripts (se sont mes chemins vers les scripts -comme les noms des scripts )
il faut aussi le pack meteo 1_accuweather de Théo
http://bit.ly/1_2019-3-17
toutes les explications ici https://forums.bunsenlabs.org/viewtopic.php?id=189
Le cronograph est à prendre ici https://www.deviantart.com/hfcf/art/Conky-Cronograph-Station-278646771
@+ .
Edité par loutch Le 09/06/2019 à 11h10
Non no problemo
j'ai pas conky 1.11 mais il devrait quand même le faire .
Attention aux chemins des scripts (se sont mes chemins vers les scripts -comme les noms des scripts )
il faut aussi le pack meteo 1_accuweather de Théo
http://bit.ly/1_2019-3-17
toutes les explications ici https://forums.bunsenlabs.org/viewtopic.php?id=189
Le cronograph est à prendre ici https://www.deviantart.com/hfcf/art/Conky-Cronograph-Station-278646771
@+ .
Edité par loutch Le 09/06/2019 à 11h10
Linuxmint 19.1 Tessa - Mageia 7rc Mate sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 19.04 en xfce sur ASUS Rog STRIX
magnux77
Membre non connecté

loutch :
Ben, non. As-tu essayé ?j'ai pas conky 1.11 mais il devrait quand même le faire
Perso, en 6 ce sont des scripts persos qui tournent correctement, à part le démarrage qui se loupe parfois. Mais en 7, nada !
...depuis Mandrake 7
Membre de l'April - « promouvoir et défendre le Logiciel Libre»
Soutien Framasoft - « Changer le monde, un octet à la fois»
Config n°1 : cpu=AMD64x6 mem=16G SSD=64G HDD=1T OS=Mageia7-64 DE=Xfce, Config n°2 : Dell Latitude E6410 SSD=120G OS=Mageia7 DE=Xfce, Config n°3 : ThinkpadR40 SSD=32G OS=[Manjaro, Parabola, Mageia6] DE=Xfce, Config n°4 : EeePC901 SSD=20Gb, OS=[SliTaz5/Lxde, Mageia6/Xfce]
loutch
Membre non connecté

loutch
Membre non connecté

RE
ok m7 xfce en vb conky 1.11.3
le conky (sans la météo pour le moment) fonctionne voir cidessous

regarde les chemins de lancement des .lua
conkyrc
conkyrc1
ok m7 xfce en vb conky 1.11.3
le conky (sans la météo pour le moment) fonctionne voir cidessous

regarde les chemins de lancement des .lua
conkyrc
lua_load = '~/.conky/cronograph/cups.lua',
lua_draw_hook_post = 'main',
lua_draw_hook_post = 'main',
conkyrc1
lua_load = '~/.conky/cronograph/clock_rings.lua',
lua_draw_hook_pre = 'clock_rings',
lua_draw_hook_pre = 'clock_rings',
Linuxmint 19.1 Tessa - Mageia 7rc Mate sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 19.04 en xfce sur ASUS Rog STRIX
magnux77
Membre non connecté

Ça m'énervait que ces conkies sur lesquels j'avais passé quelques heures, ne fonctionnent plus du tout en M7xfce.
J'ai fini par découvrir que la syntaxe avait changé : les paramètres de configuration doivent être insérés dnas un block de config "conky.config = { ...}, le couple paramètre-valeur séparés par un espace passe ne "paramètre = valeur", et les valeurs deviennent typées. Pfff !
Le gros problème qui me reste est que le paramètre font (ancien xftfont) est toujours incapable de trouver les polices citées. Comment fournir un nom de police reconnaissable par conky ?
J'ai fini par découvrir que la syntaxe avait changé : les paramètres de configuration doivent être insérés dnas un block de config "conky.config = { ...}, le couple paramètre-valeur séparés par un espace passe ne "paramètre = valeur", et les valeurs deviennent typées. Pfff !
Le gros problème qui me reste est que le paramètre font (ancien xftfont) est toujours incapable de trouver les polices citées. Comment fournir un nom de police reconnaissable par conky ?
...depuis Mandrake 7
Membre de l'April - « promouvoir et défendre le Logiciel Libre»
Soutien Framasoft - « Changer le monde, un octet à la fois»
Config n°1 : cpu=AMD64x6 mem=16G SSD=64G HDD=1T OS=Mageia7-64 DE=Xfce, Config n°2 : Dell Latitude E6410 SSD=120G OS=Mageia7 DE=Xfce, Config n°3 : ThinkpadR40 SSD=32G OS=[Manjaro, Parabola, Mageia6] DE=Xfce, Config n°4 : EeePC901 SSD=20Gb, OS=[SliTaz5/Lxde, Mageia6/Xfce]
magnux77 :
Ça m'énervait que ces conkies sur lesquels j'avais passé quelques heures, ne fonctionnent plus du tout en M7xfce.
J'ai fini par découvrir que la syntaxe avait changé : les paramètres de configuration doivent être insérés dnas un block de config "conky.config = { ...}, le couple paramètre-valeur séparés par un espace passe ne "paramètre = valeur", et les valeurs deviennent typées. Pfff !
Le gros problème qui me reste est que le paramètre font (ancien xftfont) est toujours incapable de trouver les polices citées. Comment fournir un nom de police reconnaissable par conky ?
J'ai fini par découvrir que la syntaxe avait changé : les paramètres de configuration doivent être insérés dnas un block de config "conky.config = { ...}, le couple paramètre-valeur séparés par un espace passe ne "paramètre = valeur", et les valeurs deviennent typées. Pfff !
Le gros problème qui me reste est que le paramètre font (ancien xftfont) est toujours incapable de trouver les polices citées. Comment fournir un nom de police reconnaissable par conky ?
Bonjour,
Cette FAQ sur Conky est-elle toujours correcte ?
Toco y se gausos !
Asus P8Z68-V/GEN3 + Intel Core i2700k + RAM G-Skill 4x4Go PC 12800 + Gainward Geforce GTX 560 - 2 Go + Western Digital Velociraptor 300 Go (Mageia Cauldron / Fedora / Debian / Manjaro / Windows 10) + Seagate Barracuda 7200t/mn - 2 To - Sata 3 (data) + SSD Samsung 64 Go - Sata 3 (Mageia stable)
loutch
Membre non connecté


conky lune
le pack @ prendre ici
https://drive.google.com/open?id=0B1AG9vJlTZL-bVlQWUtncUE4LTg
@ extraire dans votre home (pas le .conky)
Le conkyrc
Code :
conky.config = {
background = true,
use_xft = true,
font = 'Monofur:bold:size=7',
update_interval = 1.0,
total_run_times = 0,
own_window = true,
own_window_type = 'normal',
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 = 500,
minimum_height = 500,
gap_x = 130,
gap_y = 230,
no_buffers = false,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
use_spacer = right,
text_buffer_size = 8192,
imlib_cache_size = 16384,
default_outline_color = '000000',
color1 = '000000',
color2 = '000000',
color3 = '828200',
color4 = '323200',
lua_load = '~/.conky/lua/image.lua',
};
conky.text = [[
${font Monofur:bold:size=12}${color5}${voffset -9}Phases de la lune ${color}${texeci 9500 bash $HOME/4_Moon/moon_MoonGiant}
${alignc 40}${color5}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$2" "$3}'`}${color}${font}
${lua fDrawImage $HOME/4_Moon/-2.png 10 65 60 60}
${lua fDrawImage $HOME/4_Moon/-1.png 80 65 60 60}
${lua fDrawImage $HOME/4_Moon/0.png 157 35 90 90}
${lua fDrawImage $HOME/4_Moon/1.png 265 65 60 60}
${lua fDrawImage $HOME/4_Moon/2.png 340 65 60 60}
${voffset 40}
${alignc 60}${execpi 600 sed -n '7p' $HOME/4_Moon/raw-fr | awk '{print $1}'}
${alignc 60}${execpi 600 sed -n '7p' $HOME/4_Moon/raw-fr | awk '{print $2}'}
${alignc 60}${execpi 600 sed -n '1p' $HOME/4_Moon/raw-fr}
${voffset -42}${color5}${goto 15}${color5}${execi 3600 echo `date --date="-2 day" | awk '{print $2" "$3}'`}\
${goto 87}${execi 3600 echo `date --date="-1 day" | awk '{print $2" "$3}'`}\
${goto 347}${execi 3600 echo `date --date="+2 day" | awk '{print $2" "$3}'`}\
${goto 272}${execi 3600 echo `date --date="+1 day" | awk '{print $2" "$3}'`}${color}
${goto 15}${execpi 600 sed -n '19p' $HOME/4_Moon/raw-fr | awk '{print $1}'}\
${goto 87}${execpi 600 sed -n '27p' $HOME/4_Moon/raw-fr | awk '{print $1}'}\
${goto 272}${execpi 600 sed -n '35p' $HOME/4_Moon/raw-fr | awk '{print $1}'}\
${goto 347}${execpi 600 sed -n '43p' $HOME/4_Moon/raw-fr | awk '{print $1}'}
${goto 15}${execpi 600 sed -n '19p' $HOME/4_Moon/raw-fr | awk '{print $2}'}\
${goto 87}${execpi 600 sed -n '27p' $HOME/4_Moon/raw-fr | awk '{print $2}'}\
${goto 272}${execpi 600 sed -n '35p' $HOME/4_Moon/raw-fr | awk '{print $2}'}\
${goto 347}${execpi 600 sed -n '43p' $HOME/4_Moon/raw-fr | awk '{print $2}'}
${goto 15}${execpi 600 sed -n '13p' $HOME/4_Moon/raw-fr}\
${goto 87}${execpi 600 sed -n '21p' $HOME/4_Moon/raw-fr}\
${goto 272}${execpi 600 sed -n '29p' $HOME/4_Moon/raw-fr}\
${goto 347}${execpi 600 sed -n '37p' $HOME/4_Moon/raw-fr}
${alignc 40}${color5}Details pour ${execi 3600 echo `date --date="0 day" | awk '{print $1" "$2" "$3" "$6}'`}${color}
Visibilité: ${execpi 600 sed -n '1p' $HOME/4_Moon/raw-fr}${goto 250}Age: ${execpi 600 sed -n '5p' $HOME/4_Moon/raw} J
Angle du Soleil: ${execpi 600 sed -n '2p' $HOME/4_Moon/raw} ° ${goto 250}Angle de Lune: ${execpi 600 sed -n '6p' $HOME/4_Moon/raw} °
Distance du Soleil: ${execpi 600 sed -n '3p' $HOME/4_Moon/raw} kms${goto 250}Distance de la Lune: ${execpi 600 sed -n '4p' $HOME/4_Moon/raw} kms
${alignc 50}${color5}Position de la Lune${color}\
${lua fDrawImage $HOME/4_Moon/rise.png 0 294 400 130}\
${lua fDrawImage $HOME/4_Moon/0.png 45 370 30 30}\
${lua fDrawImage $HOME/4_Moon/0.png 325 370 30 30}\
${Lua fDrawImage $HOME/4_Moon/0.png 185 296 30 30}
]];
monn_MoonGiant (Je l'ai mis en françois)
Code :
#!/bin/bash
#function: moonrise_set
moonrise_set () {
case "$1" in
"FirstQuarter")
echo "Noon/Midnight"
cp $HOME/4_Moon/riseicons/rise_FirstQuarter.png $HOME/4_Moon/rise.png
;;
"FullMoon")
echo "6PM/6AM"
cp $HOME/4_Moon/riseicons/rise_FullMoon.png $HOME/4_Moon/rise.png
;;
"LastQuarter")
echo "Midnight/Noon"
cp $HOME/4_Moon/riseicons/rise_LastQuarter.png $HOME/4_Moon/rise.png
;;
"NewMoon")
echo "6AM/6PM"
cp $HOME/4_Moon/riseicons/rise_NewMoon.png $HOME/4_Moon/rise.png
;;
"WaningCrescent")
echo "3AM/3PM"
cp $HOME/4_Moon/riseicons/rise_WaningCrescent.png $HOME/4_Moon/rise.png
;;
"WaningGibbous")
echo "9PM/9AM"
cp $HOME/4_Moon/riseicons/rise_WaningGibbous.png $HOME/4_Moon/rise.png
;;
"WaxingCrescent")
echo "9AM/9PM"
cp $HOME/4_Moon/riseicons/rise_WaxingCrescent.png $HOME/4_Moon/rise.png
;;
"WaxingGibbous")
echo "3PM/3AM"
cp $HOME/4_Moon/riseicons/rise_WaxingGibbous.png $HOME/4_Moon/rise.png
;;
*)
echo "Unavailable"
esac
}
kill -STOP $(pidof conky)
#put your hemisphere here: north or south
hemisphere=north
wget -O $HOME/4_Moon/raw "http://www.moongiant.com/phase/today"
rm $HOME/4_Moon/*.png
sed -i -e '/^ *$/d' -e 's/^ *//g' $HOME/4_Moon/raw
sed -i '/var jArray=\|"todayMoonContainer"\|"moonNotToday"/!d' $HOME/4_Moon/raw
sed -i -e '/var jArray/s/","/\n/g' -e 's/<span>\|<b>\|<\\\/span>\|<\\\/b>\|\\n//g' /$HOME/4_Moon/raw
sed -i -e '/var jArray/d' -e 's/^.*\:\[\"//g' /$HOME/4_Moon/raw
sed -i -e 's/"\]};//g' -e 's/^.*today_phase\///g' -e 's/\.jpg.*$//g' /$HOME/4_Moon/raw
sed -i -e 's/^small\///g' -e 's/\.png.*$//g' /$HOME/4_Moon/raw
sed -i -e 's/Illumination: \|Sun Angle: \|Sun Distance: \|Moon Distance: \|Moon Age: \|Moon Angle: //g' -e '43d' /$HOME/4_Moon/raw
#September 30-October 1 fix
for (( i=11; i<=35; i+=8 ))
do
if [[ $(sed -n ${i}p /$HOME/4_Moon/raw) == "September 30" ]]; then
line=$((i+7))
sed -i "${line}s/^.*$/Waning Crescent/" /$HOME/4_Moon/raw
fi
if [[ $(sed -n ${i}p /$HOME/4_Moon/raw) == "October 1" ]]; then
line=$((i+7))
sed -i "${line}s/^.*$/New Moon/" /$HOME/4_Moon/raw
fi
done
today_phase=$(sed -n 8p /$HOME/4_Moon/raw| awk -F "," '{print $2}'| sed 's/ //')
if [[ $today_phase == "September 30" ]]; then
sed -i '7s/^.*$/Waning Crescent/' /$HOME/4_Moon/raw
sed -i '10s/^.*$/Phase: Waning Crescent/' /$HOME/4_Moon/raw
fi
if [[ $today_phase == "October 1" ]]; then
sed -i '7s/^.*$/New Moon/' /$HOME/4_Moon/raw
sed -i '10s/^.*$/Phase: New Moon/' /$HOME/4_Moon/raw
fi
phase=$(sed -n 7p $HOME/4_Moon/raw|sed 's/ //')
mrise_mset=$(moonrise_set $phase)
sed -i 7a$(moonrise_set $phase) /$HOME/4_Moon/raw
#Day before Yesterday
img_in=$(sed -n 44p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/-2.png
#Yesterday
img_in=$(sed -n 45p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/-1.png
#Today
img_in=$(sed -n 46p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/0.png
#Tomorrow
img_in=$(sed -n 47p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/1.png
#Day after Tomorrow
img_in=$(sed -n 48p $HOME/4_Moon/raw)
cp $HOME/4_Moon/moongiant_icons_$hemisphere/$img_in.png $HOME/4_Moon/2.png
## English to French
cp $HOME/4_Moon/raw $HOME/4_Moon/raw-fr
if [[ -s $HOME/4_Moon/raw-fr ]]; then
sed -i -e 's/Full Moon/Pleine Lune/' $HOME/4_Moon/raw-fr
sed -i -e 's/Waning Gibbous/Gibeuse décroissante/' $HOME/4_Moon/raw-fr
sed -i -e 's/Waxing Gibbous/Gibeuse croissante/' $HOME/4_Moon/raw-fr
sed -i -e 's/Waxing Crescent/Lune Montante/' $HOME/4_Moon/raw-fr
sed -i -e 's/First Quarter/Premier Quartier/' $HOME/4_Moon/raw-fr
sed -i -e 's/Last Quarter/Dernier Quartier/' $HOME/4_Moon/raw-fr
sed -i -e 's/Waning Crescent/Lune Déscendante/' /$HOME/4_Moon/raw-fr
fi
kill -CONT $(pidof conky)


P.S Mettre les icones du dossier riseicons .jpg en .png avec gimp (@ cause du image .lua) Edité par loutch Le 20/07/2019 à 16h09
Linuxmint 19.1 Tessa - Mageia 7rc Mate sur ssd sur HP Pavilion g7
Xubuntu 18.04 LTS et 19.04 en xfce sur ASUS Rog STRIX
Je commence tout d'abord par m'excuser, car je suis un chieur. Mais...
Bit.ly c'est pas un site que j'affectionne.
Utiliser un "raccourcisseur" de lien comme bit.ly pour aller sur un raccourcisseur de lien goo.gl pour aller sur un drive google,
Il y a un trackeur du milieu qui ne sert pas beaucoup, on peut directement le premier (ou second) raccourcisseur de lien vers la destination finale ?
Sinon, pourquoi le tar.gz n'est pas tout simplement hébergé sur MLO ? :/
Bit.ly c'est pas un site que j'affectionne.
Utiliser un "raccourcisseur" de lien comme bit.ly pour aller sur un raccourcisseur de lien goo.gl pour aller sur un drive google,
Il y a un trackeur du milieu qui ne sert pas beaucoup, on peut directement le premier (ou second) raccourcisseur de lien vers la destination finale ?
Sinon, pourquoi le tar.gz n'est pas tout simplement hébergé sur MLO ? :/
magnux77
Membre non connecté

Comme les google fonts dnas wordpress...
Tu as raison, Jybz,le diable est dans les détails... Edité par magnux77 Le 20/07/2019 à 14h14
Tu as raison, Jybz,le diable est dans les détails... Edité par magnux77 Le 20/07/2019 à 14h14
...depuis Mandrake 7
Membre de l'April - « promouvoir et défendre le Logiciel Libre»
Soutien Framasoft - « Changer le monde, un octet à la fois»
Config n°1 : cpu=AMD64x6 mem=16G SSD=64G HDD=1T OS=Mageia7-64 DE=Xfce, Config n°2 : Dell Latitude E6410 SSD=120G OS=Mageia7 DE=Xfce, Config n°3 : ThinkpadR40 SSD=32G OS=[Manjaro, Parabola, Mageia6] DE=Xfce, Config n°4 : EeePC901 SSD=20Gb, OS=[SliTaz5/Lxde, Mageia6/Xfce]
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie