• What about conky?


    In the future, is the conky will include?

    This is my dekstop, with an awesome conky script.

    Don't forget to mark as [SOLVED], if your problem was solved!

  • In the future, is the conky will include?

    This is my dekstop, with an awesome conky script.

    Don't forget to mark as [SOLVED], if your problem was solved!

  • Hi,

    I want to add a conky script in the Openbox “version” of Antergos. But I also feel it can be a bit intrusive. I’m sure there’s a lot of people that wouldn’t like a preinstalled conky at all. So I haven’t make up my mind yet.

    By the way, where did you get that script? It’s really cool!

  • This is the “official” deviantart page: [http://la-manoue.deviantart.com/art/Dark-Mixed-Conky-on-Cinnamon-396225134][0]">[http://la-manoue.deviantart.com/art/Dar][1] … -396225134
    Who not like conky?

    Or, should be a check box in the openbox “Version”. “I want use the antergos team’s default conky script.”

    This script is very cool, and usefull.
    I customized the default script.

    [0]: <a href=
    [1]: http://la-manoue.deviantart.com/art/Dar

    Don't forget to mark as [SOLVED], if your problem was solved!

  • Added to our TODO list

    Thanks!

  • Oh, thank you!

    This is my conky script:

    \# Conky settings \#  
    background yes  
    update\_interval 1  
      
    cpu\_avg\_samples 2  
    net\_avg\_samples 2  
      
    override\_utf8\_locale yes  
      
    double\_buffer yes  
    no\_buffers yes  
      
    text\_buffer\_size 2048  
    imlib\_cache\_size 0  
      
    temperature\_unit celsius  
      
    \# XFCE lightdm backround issue  
    \#own\_window\_argb\_visual yes  
    \#own\_window\_argb\_value 0  
      
    \# Window specifications \#  
    own\_window\_class Conky  
    own\_window yes  
    own\_window\_type normal  
    own\_window\_transparent yes  
    \#own\_window\_hints undecorate  
    own\_window\_hints undecorate,sticky,skip\_taskbar,skip\_pager,below  
      
    border\_inner\_margin 0  
    border\_outer\_margin 0  
      
    minimum\_size 520 450  
    maximum\_width 520  
      
    alignment br  
    gap\_x -30  
    gap\_y 0  
      
    \# Graphics settings \#  
    draw\_shades no  
    draw\_outline no  
    draw\_borders no  
    draw\_graph\_borders no  
      
    \#default\_color gray  
    default\_shade\_color red  
    default\_outline\_color green  
      
    \# Text settings \#  
    use\_xft yes  
    override\_utf8\_locale yes  
    xftfont Play:normal:size=8  
    xftalpha 0.9  
    uppercase no  
      
    default\_color 333333  
    color0 b2ff34  
    color1 efefef  
    color2 1994D1  
    \#color3 1994D1   
      
    \# Lua Load \#${voffset 550}  
    lua\_load ~/.conky/rings-v1.2.1.lua  
    \#lua\_draw\_hook\_pre ring\_stats  
    lua\_draw\_hook\_pre conky\_main  
      
    TEXT  
    ${font Play:normal:size=8}${voffset 16}${color1}${goto 106}${freq\_g cpu0} GHz${alignr 330}${acpitemp} °C  
    ${font Play:normal:size=8}${voffset 0}${goto 120}${color1}CORE 1 ${alignr 330}${color1}${cpu cpu0}%  
    ${font Play:normal:size=8}${voffset 2}${goto 120}${color1}CORE 2${alignr 330}${color1}${cpu cpu1}%  
    ${font Play:normal:size=8}${voffset 2}${goto 120}${color1}CORE 3${alignr 330}${color1}${cpu cpu2}%  
    ${font Play:normal:size=8}${voffset 2}${goto 120}${color1}CORE 4${alignr 330}${color1}${cpu cpu3}%  
    ${goto 50}${voffset 16}${font Play:normal:size=8}${color1}${top name 1}${alignr 306}${top cpu 1}%  
    ${goto 50}${font Play:normal:size=8}${color1}${top name 2}${alignr 306}${top cpu 2}%  
    ${goto 50}${font Play:normal:size=8}${color1}${top name 3}${alignr 306}${top cpu 3}%  
    ${font Michroma:size=10}${color0}${goto 90}${voffset 4}CPU   
    ${font Michroma:size=10}${color0}${goto 394}${voffset 48}MEMORY  
    ${goto 324}${voffset -2}${font Play:normal:size=8}${color1}${top\_mem name 1}${alignr 40}${top\_mem mem 1}%  
    ${goto 324}${font Play:normal:size=8}${color1}${top\_mem name 2}${alignr 40}${top\_mem mem 2}%  
    ${goto 324}${font Play:normal:size=8}${color1}${top\_mem name 3}${alignr 40}${top\_mem mem 3}%  
    ${font Play:normal:size=8}${voffset 12}${goto 348}${color1}SWAP${alignr 40}${color1}${swap} / ${color1}${swapmax}  
    ${font Play:normal:size=8}${voffset 2}${goto 348}${color1}RAM ${alignr 40}${color1}${mem} / ${color1}${memmax}  
    ${font Play:normal:size=8}${goto 80}${voffset -68}Root${color1}${alignr 310}${fs\_used /} / ${fs\_size /}  
    ${font Play:normal:size=8}${goto 80}${voffset 0}Home${alignr 310}${color1}${fs\_used /home} / ${fs\_size /home}  
    ${font Play:normal:size=8}${goto 80}${voffset 0}Usr${alignr 310}${color1}${fs\_used /usr} / ${fs\_size /usr}  
    ${font Michroma:size=10}${color0}${goto 76}${voffset 10}HARD DRIVE  
    ${font Michroma:size=10}${color0}${voffset 34}${goto 324}INTERNET INFO  
      
    \# EDITION FINIR WLAN  
    ${if\_existing /proc/net/route wlp2s0}${font Play:normal:size=8}${color1}${goto 298}${voffset -8}WiFi ${color1}${goto 370}${wireless\_bitrate wlp2s0}  
    ${font Play:normal:size=8}${color1}${goto 298}${voffset 2}Up${goto 370}${color1}${totalup wlp2s0} / ${color1}${upspeed wlp2s0}  
    ${font Play:normal:size=8}${goto 298}${color1}Down${goto 370}${color1}${totaldown wlp2s0} / ${color1}${downspeed wlp2s0}  
    ${font Play:bold:size=8}${goto 300}${voffset 2}Local IP${goto 370}${addr wlp2s0}  
    ${font Play:bold:size=8}${goto 300}${voffset 1}Public IP${goto 370}${execi 360 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\\|.]//g'}  
    \#${font Michroma:size=9}${goto 90}${voffset -42}${color0}${time %a} ${color0}${time %x}  
    \#${font Michroma:size=18}${goto 60}${color1}${voffset -4}${time %H}:${time %M}  
    \#${font Michroma:size=8}${color0}${goto 296}${voffset 20}BATTERIE  
    \#${font Play:size=8}${color0}${goto 278}${voffset 9}${color1}${battery\_percent BAT1}%  
    \# |--ETH0  
    ${else}${if\_existing /proc/net/route enp1s0}${font Play:normal:size=8}${color1}${goto 298}${voffset 6}Up${goto 370}${color1}${totalup enp1s0} / ${color1}${upspeed enp1s0}  
    ${font Play:normal:size=8}${goto 298}${color1}Down${goto 370}${color1}${totaldown enp1s0} / ${color1}${downspeed enp1s0}  
    ${font Play:bold:size=8}${goto 300}${voffset 2}Local IP${goto 370}${addr enp1s0}  
    ${font Play:bold:size=8}${goto 300}${voffset 1}Public IP${goto 370}${execi 3600 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\\|.]//g'}  
    \#${font Michroma:size=9}${alignr 280}${voffset -42}${color0}${time %a} ${color0}${time %x}  
    \#${font Michroma:size=18}${goto 75}${color1}${voffset -4}${time %I:%M:%S}  
    \#${font Michroma:size=8}${color0}${goto 296}${voffset 20}BATTERY  
    \#${font Play:size=8}${color0}${goto 278}${voffset 8}${color1}${battery\_percent BAT1}%  
    ${endif}${endif}  
      
    \#${font Play:normal:size=8}${goto 180}Uptime${color1}${alignr 100}${uptime\_short}  
      
    ${font Michroma:size=9}${alignr 300}${voffset -95}${color0}${time %a} ${color0}${time %x}  
    ${font Michroma:size=18}${goto 75}${color1}${voffset -4}${time %I:%M:%S}  
    ${font Michroma:size=8}${color0}${goto 296}${voffset 20}BATTERY  
    ${font Play:size=8}${color0}${goto 278}${voffset 8}${color1}${battery\_percent BAT1}%  
    ${font Michroma:bold:size=10}${color0}${voffset 10}${alignc}$nodename $kernel  
    \#${font Play:normal:size=8}${color1}${voffset 10}${alignc}$moc\_title - $moc\_timeleft / $moc\_totaltime - $moc\_state  
    \#${execpi 53 $HOME/.conky/nagios.sh}  
    
    

    And this is the rings script:

    --[[  
    Ring Meters by londonali1010 (2009)  
      
    This script draws percentage meters as rings. It is fully customisable; all options are described in the 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/rings-v1.2.1.lua  
    lua\_draw\_hook\_pre ring\_stats  
      
    Changelog:  
    + v1.2.1 -- Fixed minor bug that caused script to crash if conky\_parse() returns a nil value (20.10.2009)  
    + v1.2 -- Added option for the ending angle of the rings (07.10.2009)  
    + v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009)  
    + v1.0 -- Original release (28.09.2009)  
      
    arg=conky\_parse("${if\_up wlan0}wlan0${else}enp1s0${endif}"),  
    fg\_colour=0xf0651f,  
    fg\_colour=conky\_parse("${if\_up wlan0}wlan0${else}enp1s0${endif}"),  
    conky\_parse("${cpu}")  
    name=conky\_parse("${acpitemp}"),  
    ]]  
      
    -- A TESTER  
    --set alarm value, this is the value at which bar color will change  
    --alarm\_value=80  
    ----set alarm bar color, 1,0,0,1 = red fully opaque  
    --ar,ag,ab,aa=1,0,0,1  
      
    -- couleurs 1  
    -- AAF334  
    -- f0651f  
    -- f01f42  
    -- couleurs 2 + flashy  
    -- 008cff  
    -- ff7200  
    -- ff000d  
      
    --normal\_temp="0xAAF334"  
    --warn\_temp="0xf0651f"  
    --crit\_temp="0xf01f42"  
    -- Un mélange des deux  
    normal="0xAAF334"  
    warn="0xff7200"  
    crit="0xff000d"  
      
    -- seulement quand fond nécessaire  
    corner\_r=35  
    bg\_colour=0x333333  
    bg\_alpha=0.2  
      
      
    settings\_table = {  
      
    {  
    name='acpitemp',  
    arg='',  
    max=110,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.8,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=200, y=120,  
    radius=97,  
    thickness=4,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='cpu',  
    arg='cpu0',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.8,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=200, y=120,  
    radius=86,  
    thickness=13,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='cpu',  
    arg='cpu1',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.7,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=200, y=120,  
    radius=71,  
    thickness=12,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='cpu',  
    arg='cpu2',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.6,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=200, y=120,  
    radius=57,  
    thickness=11,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='cpu',  
    arg='cpu3',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.5,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=200, y=120,  
    radius=44,  
    thickness=10,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='memperc',  
    arg='',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.8,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=340, y=234,  
    radius=60,  
    thickness=15,  
    start\_angle=180,  
    end\_angle=420  
    },  
    {  
    name='swapperc',  
    arg='',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.4,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=340, y=234,  
    radius=45,  
    thickness=10,  
    start\_angle=180,  
    end\_angle=420  
    },  
    {  
    name='fs\_used\_perc',  
    arg='/',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.8,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=220, y=280,  
    radius=40,  
    thickness=10,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='fs\_used\_perc',  
    arg='/home',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.6,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=220, y=280,  
    radius=28,  
    thickness=10,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='fs\_used\_perc',  
    arg='/usr',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.4,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=220, y=280,  
    radius=16,  
    thickness=10,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='downspeedf',  
    arg='',  
    max=2000,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.8,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=290, y=346,  
    radius=30,  
    thickness=12,  
    start\_angle=180,  
    end\_angle=420  
    },  
    {  
    name='upspeedf',  
    arg='',  
    max=200,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.6,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=290, y=346,  
    radius=18,  
    thickness=8,  
    start\_angle=180,  
    end\_angle=420  
    },  
    {  
    name='time',  
    arg='%S',  
    max=60,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.8,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=230, y=410,  
    radius=30,  
    thickness=12,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='time',  
    arg='%M',  
    max=60,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.6,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=230, y=410,  
    radius=18,  
    thickness=8,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='time',  
    arg='%H',  
    max=24,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.4,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=230, y=410,  
    radius=10,  
    thickness=4,  
    start\_angle=0,  
    end\_angle=240  
    },  
    {  
    name='battery\_percent',  
    arg='BAT1',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.6,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.8,  
    x=274, y=464,  
    radius=18,  
    thickness=10,  
    start\_angle=180,  
    end\_angle=420  
    },  
    {  
    name='',  
    arg='',  
    max=100,  
    bg\_colour=0xdddddd,  
    bg\_alpha=0.6,  
    fg\_colour=0xAAF334,  
    fg\_alpha=0.6,  
    x=274, y=464,  
    radius=3,  
    thickness=13,  
    start\_angle=0,  
    end\_angle=360  
    },  
    }  
      
    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 conky\_ring\_stats()  
    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  
      
    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  
    display\_temp=temp\_watch()  
    setup\_rings(cr,settings\_table[i])  
    end  
    end  
    cairo\_surface\_destroy(cs)  
    cairo\_destroy(cr)  
    end  
      
    -- Contrôle de l'espace disque  
    function disk\_watch()  
      
    warn\_disk=93  
    crit\_disk=98  
      
    -- poser une boucle plus tard... pas simple  
      
    disk=tonumber(conky\_parse("${fs\_used\_perc /}"))  
      
    if disk<warn\_disk then  
    settings\_table[8]['fg\_colour']=normal  
    elseif disk<crit\_disk then  
    settings\_table[8]['fg\_colour']=warn  
    else  
    settings\_table[8]['fg\_colour']=crit  
    end  
      
    disk=tonumber(conky\_parse("${fs\_used\_perc /home}"))  
      
    if disk<warn\_disk then  
    settings\_table[9]['fg\_colour']=normal  
    elseif disk<crit\_disk then  
    settings\_table[9]['fg\_colour']=warn  
    else  
    settings\_table[9]['fg\_colour']=crit  
    end  
      
    disk=tonumber(conky\_parse("${fs\_used\_perc /usr}"))  
      
    if disk<warn\_disk then  
    settings\_table[10]['fg\_colour']=normal  
    elseif disk<crit\_disk then  
    settings\_table[10]['fg\_colour']=warn  
    else  
    settings\_table[10]['fg\_colour']=crit  
    end  
    end  
      
    -- Contrôle de la température  
    function temp\_watch()  
      
    warn\_value=70  
    crit\_value=80  
      
    temperature=tonumber(conky\_parse("${acpitemp}"))  
      
    if temperature<warn\_value then  
    settings\_table[1]['fg\_colour']=normal  
    elseif temperature<crit\_value then  
    settings\_table[1]['fg\_colour']=warn  
    else  
    settings\_table[1]['fg\_colour']=crit  
    end  
    end  
      
    -- Contrôle de l'interface active  
    function iface\_watch()  
      
    iface=conky\_parse("${if\_existing /proc/net/route enp1s0}enp1s0${else}wlan0${endif}")  
      
    settings\_table[11]['arg']=iface  
    settings\_table[12]['arg']=iface  
    end  
      
    function conky\_draw\_bg()  
    if conky\_window==nil then return end  
    local w=conky\_window.width  
    local h=conky\_window.height  
    local cs=cairo\_xlib\_surface\_create(conky\_window.display, conky\_window.drawable, conky\_window.visual, w, h)  
    cr=cairo\_create(cs)  
      
    cairo\_move\_to(cr,corner\_r,0)  
    cairo\_line\_to(cr,w-corner\_r,0)  
    cairo\_curve\_to(cr,w,0,w,0,w,corner\_r)  
    cairo\_line\_to(cr,w,h-corner\_r)  
    cairo\_curve\_to(cr,w,h,w,h,w-corner\_r,h)  
    cairo\_line\_to(cr,corner\_r,h)  
    cairo\_curve\_to(cr,0,h,0,h,0,h-corner\_r)  
    cairo\_line\_to(cr,0,corner\_r)  
    cairo\_curve\_to(cr,0,0,0,0,corner\_r,0)  
    cairo\_close\_path(cr)  
      
    cairo\_set\_source\_rgba(cr,rgb\_to\_r\_g\_b(bg\_colour,bg\_alpha))  
    cairo\_fill(cr)  
    end  
      
      
    function conky\_main()  
    temp\_watch()  
    disk\_watch()  
    iface\_watch()  
    conky\_ring\_stats()  
    -- quand fond nécessaire  
    -- conky\_draw\_bg()  
    end  
    
    

    Don't forget to mark as [SOLVED], if your problem was solved!

Posts 6Views 1430
Log in to reply