logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).


L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT → ODT PDF Export

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
utilisateurs:jeremix:config:conky-1.10-lua-horloge-caps-num-lock-mail-clementine [01/11/2020 08:53]
jeremix créée
utilisateurs:jeremix:config:conky-1.10-lua-horloge-caps-num-lock-mail-clementine [01/11/2020 09:09] (Version actuelle)
jeremix
Ligne 14: Ligne 14:
 ====Conky lua Horloge, Caps/Num Lock, Mail, Clementine ==== ====Conky lua Horloge, Caps/Num Lock, Mail, Clementine ====
  
-{{/file-Rc014d8061527263bd6b142f52bc8333a.png}}+{{/file-R00f90730c9d3ff74dca73600622f4f77.png}}
  
  
Ligne 20: Ligne 20:
 <file lua .conkyrc>​ <file lua .conkyrc>​
 conky.config = { conky.config = {
-background = false, +--##  Begin Window Settings ​ #####################​
-update_interval = 1, +
-cpu_avg_samples = 2, +
-net_avg_samples = 2, +
-override_utf8_locale = true, +
-double_buffer = true, +
-no_buffers = true, +
-text_buffer_size = 2048, +
-temperature_unit = '​fahrenheit',​+
 own_window = true, own_window = true,
 own_window_type = '​normal',​ own_window_type = '​normal',​
 own_window_transparent = true, own_window_transparent = true,
-own_window_argb_visual = true, +own_window_hints = '​undecorated,​sticky,below,​skip_taskbar,​skip_pager', 
-own_window_hints = '​undecorated,​sticky,​skip_taskbar,​skip_pager,​below', +own_window_colour = '#​000000', 
-border_inner_margin ​0+own_window_class ​'​Conky'​
-border_outer_margin ​= 0, +own_window_title ​'​Sidepanes Conky',​ 
-minimum_width = 200+--## ARGB can be used for real transparency 
-minimum_height = 800,+--## NOTE that a composite manager is required for real transparency. 
 +--## This option will not work as desired (in most cases) in conjunction with 
 +--## own_window_type normal 
 +-- own_window_argb_visual yes # Options: yes or no 
 +-- own_window_argb_visual = true, 
 + 
 +--## When ARGB visuals are enabled, this use this to modify the alpha value 
 +--## Use: own_window_type normal 
 +--## Use: own_window_transparent no 
 +--## Valid range is 0-255where 0 is 0% opacity, and 255 is 100% opacity. 
 +-- own_window_argb_value 50 
 + 
 +minimum_width = 300,  
 +minimum_height = 670, 
 +maximum_width = 300, 
 alignment = '​top_right',​ alignment = '​top_right',​
-gap_x = 35+gap_x = 15,--## left | right 
-gap_y = 55+gap_y = 5,--## up | down 
-draw_shades = false, +--###################### ​ End Window Settings ​ ### 
-draw_outline = false, +--##  Font Settings ​ #############################​ 
-draw_borders = false, +-- Use Xft (anti-aliased font and stuff)
-draw_graph_borders = false,+
 use_xft = true, use_xft = true,
-font = 'caviar dreams:size=8', +font = 'Roboto Regular:size=10', 
-xftalpha = 0.5 ,+ 
 + 
 +-- Alpha of Xft font. Must be a value at or between 1 and 0 ### 
 +xftalpha = 1, 
 +-- Force UTF8? requires XFT ### 
 +override_utf8_locale = true, 
 uppercase = false, uppercase = false,
-temperature_unit ​= 'celsius', +--######################## ​ End Font Settings ​ ### 
-default_color = 'FFFFFF',+--##  Colour Settings ​ ###########################​ 
 +draw_shades = false,​--yes 
 +default_shade_color ​= 'black', 
 + 
 +draw_outline = false,-- amplifies text if yes 
 +default_outline_color = '​black',​ 
 + 
 +default_color = '#d8dee8',-- White 
 +color1 = '#​bf616a',​-- Red 
 +color2 = '#​a3be8c',​-- Green 
 +color3 = '#​ebcb8b',​-- Yellow 
 +color4 = '#​81a1c1',​-- Blue 
 +--###################### ​ End Colour Settings ​ ### 
 +--##  Borders Section ​ ###########################​ 
 +draw_borders = false, 
 +-- Stippled borders? 
 +stippled_borders = 0, 
 +-- border margins 
 +border_inner_margin = 0, 
 +border_outer_margin = 0, 
 +-- border width 
 +border_width = 0, 
 +-- graph borders 
 +draw_graph_borders = true,--no 
 +--default_graph_size 15 40 
 +--####################### ​ End Borders Secton ​ ### 
 +--##  Miscellaneous Section ​ #####################​ 
 +-- Boolean value, if true, Conky will be forked to background when started. 
 +background = true, 
 +-- Adds spaces around certain objects to stop them from moving other things 
 +-- around, this only helps if you are using a mono font 
 +-- Options: right, left or none 
 +use_spacer = '​none',​ 
 + 
 +-- Default and Minimum size is 256 - needs more for single commands that 
 +-- "​call"​ a lot of text IE: bash scripts 
 +--text_buffer_size 6144 
 + 
 +-- Subtract (file system) buffers from used memory? 
 +no_buffers = true, 
 + 
 +-- change GiB to G and MiB to M 
 +short_units = true, 
 + 
 +-- Like it says, ot pads the decimals on % values 
 +-- doesn'​t seem to work since v1.7.1 
 +pad_percents = 2, 
 + 
 +-- Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use 
 +-- $image lots. Set to 0 to disable the image cache. 
 +imlib_cache_size = 0, 
 + 
 +-- Use the Xdbe extension? (eliminates flicker) 
 +-- It is highly recommended to use own window with this one 
 +-- so double buffer won't be so big. 
 +double_buffer = true, 
 + 
 +--   ​Maximum size of user text buffer, i.e. layout below TEXT line in config file 
 +--  (default is 16384 bytes) 
 +-- max_user_text 16384 
 + 
 +-- Desired output unit of all objects displaying a temperature. Parameters are 
 +-- either "​fahrenheit"​ or "​celsius"​. The default unit is degree Celsius. 
 +-- temperature_unit Fahrenheit 
 +--################ ​ End Miscellaneous Section ​ ### 
 + 
 +update_interval = 1,
  
 lua_load = '​~/​.conky/​clock_rings.lua',​ lua_load = '​~/​.conky/​clock_rings.lua',​
 lua_draw_hook_pre = '​clock_rings',​ lua_draw_hook_pre = '​clock_rings',​
  
-}+ 
 +};
  
 conky.text = [[ conky.text = [[
 +
 ${voffset 8}${color 1B708D}${font caviar dreams:​size=16}${time %A}${font}${voffset -8}${alignr 0}${color FFFFFF}${font caviar dreams:​bold:​size=38}${time %e}${font} ${voffset 8}${color 1B708D}${font caviar dreams:​size=16}${time %A}${font}${voffset -8}${alignr 0}${color FFFFFF}${font caviar dreams:​bold:​size=38}${time %e}${font}
 ${color FFFFFF}${voffset -30}${color FFFFFF}${font caviar dreams:​size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font caviar dreams:​size=20}${time %Y}${font}${color 1B708D}${hr} ${color FFFFFF}${voffset -30}${color FFFFFF}${font caviar dreams:​size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font caviar dreams:​size=20}${time %Y}${font}${color 1B708D}${hr}
-${image ~/​.conky/​debian-logo.png -p 76,128 -s 40x40}+${image ~/​.conky/​debian-logo.png -p 155,150 -s 40x40
 +${execPi 2 ~/​.conky/​caps_num.sh} 
 +${voffset 90}
  
-${goto 5}${voffset 125+${image ~/​.conky/​icones/​weather.png -p 10,255 -s 72x72
-${font caviar dreams:​bold:​size=7}${voffset 5}${goto 20}${color FFFFFF}${freq_g cpu0} Ghz${goto 78}${alignr 330}${cpu cpu0}% +${offset 75Météo 
-${font caviar dreams:​bold:​size=6}${voffset ​3}${goto 20}${color 1B708D}CPU 1${goto 78}${alignr 330}${color FFFFFF}${cpu cpu1}% +${voffset 5}${offset ​75} Aujourd'​hui ​: ${execi 1800 ~/.conky/sidepanes/res/weather
-${font caviar dreams:​bold:​size=6}${voffset 3}${goto 20}${color 1B708D}CPU 2${goto 78}${alignr 330}${color FFFFFF}${cpu cpu2}% +${voffset 5}${offset 25}${font ​Roboto Regular:size=8}${execi 1800 ~/.conky/sidepanes/​res/​weather -t}
-${font caviar dreams:​bold:​size=6}${voffset 3}${goto 20}${color 1B708D}CPU 3${goto 78}${alignr 330}${color FFFFFF}${cpu cpu3}% +
-${font caviar dreams:​bold:​size=6}${voffset 3}${goto 20}${color 1B708D}CPU 4${goto 78}${alignr 330}${color FFFFFF}${cpu cpu4}% +
-${font caviar dreams:​bold:​size=6}${voffset 3}${goto 20}${color 1B708D}CPU ​5${goto 78}${alignr 330}${color FFFFFF}${cpu cpu5}% +
-${font caviar dreams:​bold:​size=6}${voffset 3}${goto 20}${color 1B708D}CPU 6${goto 78}${alignr 330}${color FFFFFF}${cpu cpu6}% +
-${font caviar dreams:​bold:​size=10}${color 1B708D}${goto 75}${voffset 3}CPU  +
-${font caviar dreams:size=7}${goto 5}${voffset 145}Root:​${color FFFFFF}${alignr 310}${fs_used ​/${fs_size ​/+
-${font caviar dreams:​size=7}${goto 5}${voffset 3}${color 1B708D}Home:​${alignr 310}${color FFFFFF}${fs_used ​/home} / ${fs_size /home+
-${font caviar dreams:​bold:​size=10}${color 1B708D}${goto 34}${voffset ​10}HARD ​ DRIVE +
-${goto ​5}${voffset 55} +
-${color FFFFFF}${font ​caviar dreams:size=8}Uptime: ​${uptime_short} +
-${color FFFFFF}${font caviar dreams:​size=8}Processes:​ ${processes} +
-${color FFFFFF}${font caviar dreams:​size=8}Running:​ ${running_processes} +
-${color 1B708D}${font caviar dreams:​size=8}${alignr}${exec cat /etc/issue.net} ​ $machine +
-${color 1B708D}${font caviar dreams:​size=8}${alignr}Kernel:​ ${kernel}+
  
 +${font Roboto Regular:​size=10}
 +${image ~/​.conky/​icones/​wifi.png -p 10,361 -s 72x72}
 +${offset 75} Wifi
 +${voffset 5}${offset 75} ${wireless_essid}
 +
 +${image ~/​.conky/​icones/​email.png -p 10,438 -s 72x72}
 +${offset 75} Email
 +${voffset 5}${offset 75} ${execi 600 ~/​.conky/​sidepanes/​res/​email} non lu
 +
 +${image ~/​.conky/​icones/​infos.png -p 10,510 -s 72x72}
 +${offset 75} Uptime: ${uptime_short}
 +${offset 75} Processes: ${processes}
 +${offset 75} Running: ${running_processes}
 +
 +${image ~/​.conky/​icones/​system_debian.png -p 10,597 -s 72x72}
 +${offset 75} ${exec cat /​etc/​issue.net} ​ $machine
 +${offset 75} Kernel: ${kernel}
 +
 +${image ~/​.conky/​icones/​music.png -p 10,664 -s 72x72}
 +${offset 75} Musique
 +${voffset 5}${offset 75} ${color b5f9ff}${voffset 2}${goto 91}${execi 10 ~//​.conky/​sidepanes/​res/​clementine artist}
 +${voffset 45} ${goto 40}${execi 10 ~//​.conky/​sidepanes/​res/​clementine title}
 +
 +
 +${image ~/​.conky/​cover.jpg -p 220, 690 -s 65x65 -f 10}
 +${execi 10 ~//​.conky/​sidepanes/​res/​clementine cover}
 +
 +]];
  
-]] 
 </​file>​ </​file>​
 Fichier Clock_rings.lua : \\ Fichier Clock_rings.lua : \\
Ligne 122: Ligne 217:
         fg_alpha=0.2,​         fg_alpha=0.2,​
         -- "​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"​ 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=100, y=150,+        x=180, y=170,
         -- "​radius"​ is the radius of the ring.         -- "​radius"​ is the radius of the ring.
         radius=50,         radius=50,
Ligne 140: Ligne 235:
         fg_colour=0x1B708D,​         fg_colour=0x1B708D,​
         fg_alpha=0.4,​         fg_alpha=0.4,​
-        x=100, y=150,+        x=180, y=170,
         radius=56,         radius=56,
         thickness=5,​         thickness=5,​
Ligne 154: Ligne 249:
         fg_colour=0x1B708D,​         fg_colour=0x1B708D,​
         fg_alpha=0.6,​         fg_alpha=0.6,​
-        x=100, y=150,+        x=180, y=170,
         radius=62,         radius=62,
         thickness=5,​         thickness=5,​
Ligne 168: Ligne 263:
         fg_colour=0x1B708D,​         fg_colour=0x1B708D,​
         fg_alpha=0.8,​         fg_alpha=0.8,​
-        x=100, y=150,+        x=180, y=170,
         radius=70,         radius=70,
         thickness=5,​         thickness=5,​
Ligne 182: Ligne 277:
         fg_colour=0x1B708D,​         fg_colour=0x1B708D,​
         fg_alpha=1,         fg_alpha=1,
-        x=100, y=150,+        x=180, y=170,
         radius=76,         radius=76,
         thickness=5,​         thickness=5,​
         start_angle=-90,​         start_angle=-90,​
         end_angle=90         end_angle=90
-    }, 
- { 
-        name='​cpu',​ 
-        arg='​cpu0',​ 
-        max=110, 
-        bg_colour=0xDCDCDC,​ 
-        bg_alpha=0.1,​ 
-        fg_colour=0x1B708D,​ 
-        fg_alpha=0.8,​ 
-        x=100, y=350, 
-        radius=97, 
-        thickness=4,​ 
-        start_angle=0,​ 
-        end_angle=240 
-    },    ​ 
- { 
-        name='​cpu',​ 
-        arg='​cpu1',​ 
-        max=100, 
-        bg_colour=0xDCDCDC,​ 
-        bg_alpha=0.6,​ 
-        fg_colour=0x1B708D,​ 
-        fg_alpha=0.8,​ 
-        x=100, y=350, 
-        radius=86, 
-        thickness=13,​ 
-        start_angle=0,​ 
-        end_angle=240 
-    }, 
-    { 
-        name='​cpu',​ 
-        arg='​cpu2',​ 
-        max=100, 
-        bg_colour=0xDCDCDC,​ 
-        bg_alpha=0.5,​ 
-        fg_colour=0x1B708D,​ 
-        fg_alpha=0.8,​ 
-        x=100, y=350, 
-        radius=71, 
-        thickness=12,​ 
-        start_angle=0,​ 
-        end_angle=240 
-    }, 
-{ 
-        name='​cpu',​ 
-        arg='​cpu3',​ 
-        max=100, 
-        bg_colour=0xDCDCDC,​ 
-        bg_alpha=0.4,​ 
-        fg_colour=0x1B708D,​ 
-        fg_alpha=0.8,​ 
-        x=100, y=350, 
-        radius=57, 
-        thickness=11,​ 
-        start_angle=0,​ 
-        end_angle=240 
-    }, 
-    { 
-        name='​cpu',​ 
-        arg='​cpu4',​ 
-        max=100, 
-        bg_colour=0xDCDCDC,​ 
-        bg_alpha=0.3,​ 
-        fg_colour=0x1B708D,​ 
-        fg_alpha=0.8,​ 
-        x=100, y=350, 
-        radius=44, 
-        thickness=10,​ 
-        start_angle=0,​ 
-        end_angle=240 
-    }, 
-{ 
-        name='​cpu',​ 
-        arg='​cpu5',​ 
-        max=100, 
-        bg_colour=0xDCDCDC,​ 
-        bg_alpha=0.2,​ 
-        fg_colour=0x1B708D,​ 
-        fg_alpha=0.8,​ 
-        x=100, y=350, 
-        radius=32, 
-        thickness=9,​ 
-        start_angle=0,​ 
-        end_angle=240 
-    }, 
-    { 
-        name='​cpu',​ 
-        arg='​cpu6',​ 
-        max=100, 
-        bg_colour=0xDCDCDC,​ 
-        bg_alpha=0.1,​ 
-        fg_colour=0x1B708D,​ 
-        fg_alpha=0.8,​ 
-        x=100, y=350, 
-        radius=21, 
-        thickness=8,​ 
-        start_angle=0,​ 
-        end_angle=240 
-    }, 
-    { 
-        name='​fs_used_perc',​ 
-        arg='/',​ 
-        max=100, 
-        bg_colour=0xDCDCDC,​ 
-        bg_alpha=0.2,​ 
-        fg_colour=0x1B708D,​ 
-        fg_alpha=0.8,​ 
-        x=110, y=550, 
-        radius=40, 
-        thickness=10,​ 
-        start_angle=0,​ 
-        end_angle=240 
-    }, 
-    { 
-        name='​fs_used_perc',​ 
-        arg='/​home',​ 
-        max=100, 
-        bg_colour=0xDCDCDC,​ 
-        bg_alpha=0.2,​ 
-        fg_colour=0x1B708D,​ 
-        fg_alpha=0.8,​ 
-        x=110, y=550, 
-        radius=28, 
-        thickness=10,​ 
-        start_angle=0,​ 
-        end_angle=240 
     },     },
 } }
Ligne 322: Ligne 291:
 -- "​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"​ and "​clock_y"​ are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.
  
-clock_x=100 +clock_x=180 
-clock_y=150+clock_y=170
  
 show_seconds=true show_seconds=true
Ligne 463: Ligne 432:
  
 </​file>​ </​file>​
 +
 +Fichier caps_num.sh : \\
 +<file bash caps_num.sh>​
 +#!/bin/bash
 +caps=$(xset -q | grep -c "Caps Lock:   ​on"​)
 +num=$(xset -q | grep -c "Num Lock:    on")
 +
 +function bottom_align(){
 + if [ $caps -gt 0 ]; then
 + echo "​\${color red} Maj\${color}"​
 + else
 + echo " min"
 + fi
 + if [ $num -gt 0 ]; then
 + echo "​\${color 6495ee} Num${color}"​
 + else
 + echo " nv"
 + fi
 +}
 +
 +function top_align(){
 + if [ $caps -gt 0 ]; then
 + echo -n "​\${color red} Maj\${color}"​
 + else
 + echo -n " min "
 + fi
 + if [ $num -gt 0 ]; then
 + echo "​\${color 6495ee} Num${color}"​
 + else
 + echo " nv"
 + fi
 +}
 +
 +
 +#check alignment
 +alignbl=$(grep "​alignment bottom_left"​ ~/​.conkyrc|grep -c "#"​)
 +alignbr=$(grep "​alignment bottom_right"​ ~/​.conkyrc|grep -c "#"​)
 +if [ $alignbl -gt 0 ] && [ $alignbr -gt 0 ]; then
 + top_align
 +else
 + bottom_align
 +fi
 +</​file>​
 +
 +Fichier météo : \\
 +Fichier email : \\
 +Fichier Clementine : \\
 +Icones : \\
 +
 Logo Debian au centre de la pendule (debian-logo.png):​ \\ Logo Debian au centre de la pendule (debian-logo.png):​ \\
 {{/​file-Rd3fc65ac2073d97efe310365961d75c6.png}} {{/​file-Rd3fc65ac2073d97efe310365961d75c6.png}}
  
  
utilisateurs/jeremix/config/conky-1.10-lua-horloge-caps-num-lock-mail-clementine.1604217216.txt.gz · Dernière modification: 01/11/2020 08:53 par jeremix

Pied de page des forums

Propulsé par FluxBB