Page 2268 of 2328 FirstFirst ... 126817682168221822582266226722682269227022782318 ... LastLast
Results 22,671 to 22,680 of 23277

Thread: Post your .conkyrc files w/ screenshots

  1. #22671
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by sbjaved View Post
    This would solve one part of the issue. But most RTL languages use words that join together (e.g. خ و ش is actually written as خوش ).
    i have a lua function that can decode utf8 unicode numbers
    it works in the terminal but when i send the output to conky i get boxes (for some characters)

    if i could get conky to play along you could then use any unicode character you liked (as long as it had a 4 digit code)
    but you would have to type in unicode

  2. #22672
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    I could write a script that encodes output in unicode. Can you post the lua function with a working example (you can use the characters I posted) + screenshot?

  3. #22673
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by sbjaved View Post
    I could write a script that encodes output in unicode. Can you post the lua function with a working example (you can use the characters I posted) + screenshot?
    i picked some random arabic characters to test on
    you can see they are good in the terminal, but not in conky


    this is the lua script
    Code:
    function string:split(delimiter)--#########################################################################
    local result = { }
    local from  = 1
    local delim_from, delim_to = string.find( self, delimiter, from  )
    while delim_from do
    table.insert( result, string.sub( self, from , delim_from-1 ) )
    from  = delim_to + 1
    delim_from, delim_to = string.find( self, delimiter, from  )
    end
    table.insert( result, string.sub( self, from  ) )
    return result
    end--string split
       local function utf8(num)
         num = tonumber(num,16)
         local char = string.char
         local floor = math.floor
         local highbits = 7
         local sparebytes = 0
         while num >= 2^(highbits + sparebytes * 6) do
           highbits = highbits - 1
           if highbits < 1 then error "utf-8 sequence out of range" end
           sparebytes = sparebytes + 1
         end
         if sparebytes == 0 then
           return char(num)
         else
           local bytes = {}
           for i=1, sparebytes do
             local byte = floor((num / 2^((i-1)*6)) % 2^6)
             bytes[sparebytes+2-i] = char(byte + 2^7)
           end
           local byte = floor(num / 2^(sparebytes*6))
           bytes[1] = char(byte + 2^8 - 2^(highbits))
           return table.concat(bytes)
         end
       end--utf8
    function conky_utf8(t)
    local t=loadstring("return "..t)()
    local t=t.txt
    local utf8t=t:split("U")
    local out={}
        for i=2,#utf8t do
            local ch=utf8(utf8t[i])
            table.insert(out,1,ch)
        end
    local r=(table.concat(out))
    return r
    end--function
    this is how it works in the conkyrc
    Code:
    lua_load /home/mcdowall/lua/rtl.lua
    lua_load /home/mcdowall/lua/utf8.lua
    
    TEXT
    ${color yellow}${lua_parse rtl {hello world here is some reversed text}}
    ${color yellow}${lua utf8 {txt="U0609U060FU0620"}}
    you enter the code with U then the 4 digit code
    the lua cuts up the string at each U and sends the 4 digits to the decoding function, then reverses the order

    got the decoder here : http://lua-users.org/lists/lua-l/2011-12/msg00072.html

    but now that i come to think about it U might not be a good delimiter, as it could occur in the unicode 4 digit code
    but having just looked through some examples, i dont see that it does

    EDIT - unfortunately i dont know the ins and outs of unicode, or languages other than English, to go much further
    Last edited by mrpeachy; February 8th, 2014 at 06:20 AM.

  4. #22674
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    If conky could handle unicode

  5. #22675
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    i'm pretty sure it is possible, ive seen it done with Japanese characters
    just not sure how exactly

    edit - it may just be having the right font installed and set before the lua call
    or maybe not lol

    actually i may be right changed the font and the symbol that was appearing turned into a box
    so if you can find a font that has all the symbols then it should work
    Last edited by mrpeachy; February 8th, 2014 at 06:43 AM.

  6. #22676
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    freemono had the ones i was testing with

  7. #22677
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    modified the script a little bit, now direction is selectable

    utf8.lua
    Code:
    function string:split(delimiter)
    local result = { }
    local from  = 1
    local delim_from, delim_to = string.find( self, delimiter, from  )
    while delim_from do
    table.insert( result, string.sub( self, from , delim_from-1 ) )
    from  = delim_to + 1
    delim_from, delim_to = string.find( self, delimiter, from  )
    end
    table.insert( result, string.sub( self, from  ) )
    return result
    end--string split
    local function utf8(num)
        num = tonumber(num,16)
        local char = string.char
        local floor = math.floor
        local highbits = 7
        local sparebytes = 0
        while num >= 2^(highbits + sparebytes * 6) do
        highbits = highbits - 1
        if highbits < 1 then error "utf-8 sequence out of range" end
        sparebytes = sparebytes + 1
        end
        if sparebytes == 0 then
        return char(num)
        else
        local bytes = {}
            for i=1, sparebytes do
            local byte = floor((num / 2^((i-1)*6)) % 2^6)
            bytes[sparebytes+2-i] = char(byte + 2^7)
            end
        local byte = floor(num / 2^(sparebytes*6))
        bytes[1] = char(byte + 2^8 - 2^(highbits))
        return table.concat(bytes)
        end
    end--utf8
    function conky_utf8(t)
    local t=loadstring("return "..t)()
    local txt=t.txt
    local dir=t.dir or 1
    local utf8t=txt:split("U")
    local out={}
        for i=2,#utf8t do
        local ch=utf8(utf8t[i])
            if dir==2 then
            table.insert(out,1,ch)
            elseif dir==1 then
            table.insert(out,ch)
            end
        end
        return table.concat(out)
    end--function
    in conkyc
    Code:
    lua_load /home/mcdowall/lua/utf8.lua
    
    TEXT
    ${color yellow}${font freemono:size=30}hellooo${lua utf8 {txt="U00A5U00A3",dir=1}}
    dir=1 - left to right
    dir=2 - right to left



    all the unicode you could ever want here
    http://www.utf8-chartable.de/unicode-utf8-table.pl
    Last edited by mrpeachy; February 8th, 2014 at 07:49 AM.

  8. #22678
    Join Date
    Feb 2014
    Beans
    11

    Conky Conky Conky. My three conky scripts.

    After starting to migrate to linux, I selected Linux Mint 16 and ultimately went with Xfce. So I soon discovered conky and began poking around. I have no programming ability, but I am rumored to have at least two (2) active braincells - so I mangled various other scripts out there and came up with three (3) conky scripts. My desktop is 1920x1080, with one (1) 24-pixel panel (bar) at the bottom.

    The result looks like this (right-side of desktop):


    Now, I have a horizontal gradient desktop going from black (right) to burnt orange (left), thus the orange colors in the conky (ff6600). The white smudge is just blocking my external IP (at the time).

    I have the lua Clock Rings (reEdited by despot77) that I changed to show all 8 cores of my i7 the "top half" for cores 1-4, the bottom half for cores 5-8. Clunky, but was the best to fit the theme and design. I also added a bit more weather details and other tweaks. This was my first script, .conky_tr, and used a photo of my dog (transparent bg/clipped out) in the clock.

    Code for conky_tr:
    Code:
    #  conky_tr -> analog clock/date/weather/sysinfo circles
    #  mangled by myrkat
    
    # Basic Settings
    background no
    cpu_avg_samples 3
    double_buffer yes
    imlib_cache_size 0
    net_avg_samples 3
    no_buffers yes
    override_utf8_locale yes
    temperature_unit fahrenheit
    text_buffer_size 2048
    total_run_times 0
    update_interval 1
    uppercase no
    use_xft yes
    xftfont caviar dreams:size=8
    xftalpha 0.5
    
    # Window specifications #
    own_window_class Conky
    own_window yes
    own_window_type desktop
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_argb_visual yes
    own_window_argb_value 0
    border_inner_margin 0
    border_outer_margin 0
    
    # Graphics settings #
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders no
    
    # Positioning & Colors
    alignment tr
    gap_x 10
    gap_y 10
    minimum_size 200 250
    maximum_width 200
    default_color FF6600
    color0 FFFFFF
    color1 DD5500
    color2 BB4400
    color3 993300
    color4 772200
    color5 DDDDDD
    color6 BBBBBB
    color7 999999
    color8 777777
    color9 555555
    
    # Lua Load  #
    lua_load ~/.conky/clock_rings.lua
    lua_draw_hook_pre clock_rings
    
    TEXT
    ${voffset 8}${font caviar dreams:size=16}${time %A}${font}${voffset -8}${alignr 50}${color5}${font caviar dreams:size=38}${time %e}${font}
    ${color5}${voffset -30}${color6}${font caviar dreams:size=18}${time %b}${font}${voffset -3} ${color8}${font caviar dreams:size=20}${time %Y}${font}${color FF6600}${hr}
    ${color 995500}${alignr} ${time %l}:${time %M}${time %P}
    ${voffset 140}${font caviar dreams:size=10}${color FF6600}${alignr}San Luis Obispo${font}
    ${font caviar dreams:size=12}${color0}${voffset -2}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KSBP temperature 30} °F${font}
    ${font caviar dreams:size=8}${color6}${voffset -4}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KSBP cloud_cover 30}${font}
    ${font caviar dreams:size=10}${color5}${voffset -4}${goto 127}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KSBP humidity 30}${font caviar dreams:size=8}${color6}${alignr}${voffset 0}% humidity${font}
    ${font caviar dreams:size=8}${color6}${voffset 0}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KSBP weather 30}${font}
    ${image ~/.conky/roy.png -p 64,110 -s 70x70}
    ${color9}${goto 78}${voffset -19}cores 1-4
    ${color0}${goto 85}${voffset -1}${cpu cpu}%
    ${color}${goto 85}${voffset -2}CPU
    ${color9}${goto 78}${voffset -4}cores 5-8
    ${color0}${goto 65}${voffset 18}${memperc}%
    ${color}${goto 65}RAM
    ${color0}${goto 90}${voffset 23}${swapperc}%
    ${color}${goto 90}Swap
    ${color0}${goto 115}${voffset 26}${fs_used_perc /}%
    ${color}${goto 115}Disk
    ${color0}${alignr 32}${voffset 24}${if_up wlan0}${downspeed wlan0}${endif}${if_up eth0}${downspeed eth0}
    ${color0}${alignr 32}${if_up wlan0}${upspeed wlan0}${endif}${if_up eth0}${upspeed eth0}
    ${color}${alignr 58}Net
    Then I wanted some simple calendar display, but realized I like to keep a month or two nearby... rather than just using cal -3s, I wanted to see if I could have the previous 2 months and next 2 months = for a total of 5 months, with the current month in the middle (brightest) with current day highlighted. This was tricky (again, no programming experience, just poking around and trial-and-error). Finally got it like I wanted, then moved it in tight with .conky_tr to keep it aligned with .conky_br (next script). I called it .conky_tm because originally I had it in the top middle, but it ultimately got moved to top right, but I kept the name. Oh well. Two brain cells, right?

    Code for conky_tm:
    Code:
    #  conky_tr -> calendars/previous 2/next 2/fading
    #  mangled by myrkat
    
    # Basic Settings
    background no
    cpu_avg_samples 3
    double_buffer yes
    imlib_cache_size 0
    net_avg_samples 3
    no_buffers yes
    override_utf8_locale yes
    temperature_unit celsius  # fahrenheit
    text_buffer_size 2048
    total_run_times 0
    update_interval 1
    uppercase no
    use_xft yes
    xftfont Ubuntu Mono:size=9.5   # caviar dreams:size=8
    xftalpha 0.5
    
    # Window specifications #
    own_window_class Conky
    own_window yes
    own_window_type desktop
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_argb_visual yes
    own_window_argb_value 0
    border_inner_margin 0
    border_outer_margin 0
    
    # Graphics settings #
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders no
    
    # Positioning & Colors
    alignment tr
    gap_x 192
    gap_y 55
    # minimum_size 200 250
    # maximum_width 200
    default_color FF6600
    color0 FF6600
    color1 DD5500
    color2 BB4400
    color3 993300
    color4 772200
    color5 DDDDDD
    color6 BBBBBB
    color7 999999
    color8 777777
    color9 555555
    
    TEXT
    ${color 551100}${execpi 3600 YEAR=`date --date='2 months ago' +%_Y`; MONTH=`date --date='2 months ago' +%_m`; cal -m $MONTH $YEAR}
    ${hr}
    ${color4}${execpi 3600 YEAR=`date --date='1 month ago' +%_Y`; MONTH=`date --date='1 month ago' +%_m`; cal -m $MONTH $YEAR}
    ${hr}
    ${alignc}${color6}${time %B %G}
    ${color2}${execpi 3600 DJS=`date +%_d`; cal -h | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/ /' | sed /" $DJS "/s/" $DJS "/" "'${color5}'"$DJS"'${color2}'" "/}
    ${hr}
    ${color4}${execpi 3600 YEAR=`date --date='1 month' +%_Y`; MONTH=`date --date='1 month' +%_m`; cal -m $MONTH $YEAR}
    ${hr}
    ${color 551100}${execpi 3600 YEAR=`date --date='2 months' +%_Y`; MONTH=`date --date='2 months' +%_m`; cal -m $MONTH $YEAR}
    Finally, I had two other scripts, one with the system info and one with clementine info via anowplaying.py script... then I realized I could just combine them. I commented out redundant bars (that are in the lua rings in .conky_tr) which allowed it all to fit on my 1920x1080 screen. I grabbed a copy of the Danish flag and the Californian flag for the times at the bottom (I'm in CA, a friend in DK). I'm still used to seeing the time in the lower-right, but I removed it from my panel so I can use it in conky and have both times with flags near them.

    Code for conky_br:
    Code:
    #  conky_br -> clementine/detailed sysinfo/top-processes/multi-clock
    #  mangled by myrkat
    
    # Basic Settings
    background no
    cpu_avg_samples 3
    double_buffer yes
    imlib_cache_size 0
    net_avg_samples 3
    no_buffers yes
    override_utf8_locale yes
    temperature_unit celsius  # fahrenheit
    text_buffer_size 2048
    total_run_times 0
    update_interval 1
    uppercase no
    use_xft yes
    xftfont caviar dreams:size=8
    xftalpha 0.5
    
    # Window specifications #
    own_window_class Conky
    own_window yes
    own_window_type desktop
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_argb_visual yes
    own_window_argb_value 0
    border_inner_margin 0
    border_outer_margin 0
    
    # Graphics settings #
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders yes # just for conky_br
    
    # Positioning & Colors
    alignment br
    gap_x 15
    gap_y 15
    minimum_size 310 300
    maximum_width 310
    default_color FFFFFF
    color0 FF6600
    color1 DD5500
    color2 BB4400
    color3 993300
    color4 772200
    color5 DDDDDD
    color6 BBBBBB
    color7 999999
    color8 777777
    color9 555555
    
    TEXT
    ${color1}${voffset -1}$hr
    ${color0}${font :size=9}${goto 76}${execi 5 python2 ./.conky/anowplaying.py -a}
    ${color7}${font :bold:size=10}${goto 76}${execi 5 python2 ./.conky/anowplaying.py -t}
    ${color2}${font :size=8}${goto 76}${execi 5 python2 ./.conky/anowplaying.py -l} (${execi 5 python2 ./.conky/anowplaying.py -y})
    ${color8}${font :italic:size=7}${goto 76}Track ${execi 5 python2 ./.conky/anowplaying.py -n} -> ${execi 5 python2 ./.conky/anowplaying.py -m} total time
    ${color1}${voffset 3}$hr
    ${execi 5 python2 ./.conky/anowplaying.py -c /tmp/cover.jpg}${image /tmp/cover.jpg -p 0,7 -s 73x73 -n}
    ${color1}${font :size=9}$alignr $nodename ($machine) uptime: $uptime
    ${color2}$alignr${pre_exec cat /etc/issue.net} ~ $kernel
    ${color1}${voffset -8}$hr
    ${color0}CPU Usage: ${alignr}${color1}$cpu% @${freq_g cpu}GHz
    #${color2}${cpubar 8}
    ${color9}${voffset -4}${cpugraph 16,310 000000 ff6600}
    ${color0}RAM ${alignr}${color1}$mem / $memmax ($memperc%)
    #${color2}${membar 8}
    ${color0}SWAP ${alignr}${color1}$swap / $swapmax ($swapperc%)
    #${color2}${swapbar 8}
    ${color1}${voffset -6}$hr
    ${color0}Highest CPU & Memory $alignr CPU%  MEM%
    ${color6}${top name 1}$alignr${top cpu 1}  ${top mem 1} 
    ${color7}${top name 2}$alignr${top cpu 2}  ${top mem 2} 
    ${color8}${top name 3}$alignr${top cpu 3}  ${top mem 3} 
    ${color9}${top name 4}$alignr${top cpu 4}  ${top mem 4} 
    ${color 333333}${top name 5}$alignr${top cpu 5}  ${top mem 5} 
    ${color 222222}${top name 6}$alignr${top cpu 6}  ${top mem 6} 
    ${color2}${voffset -6}${hr}
    ${color1}HDD Read: ${alignc}${color2}${diskio_read}/s ${alignr}${color2}${diskio_write}/s ${color1} :HDD Write
    ${color9}${voffset -4}${diskiograph_read 16,150 000000 ff6600} ${alignr}${color9}${diskiograph_write 16,150 000000 ff6600}
    ${color2}${voffset -6}Ext IP: ${color0}${execpi 3600 wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//';} ${alignr}${color2}Int IP: ${color0}${addr eth0}
    ${color2}Download: ${color3}${downspeed eth0} k/s ${alignr}${color3}${upspeed eth0} k/s ${color2}:Upload
    ${color9}${voffset -4}${downspeedgraph eth0 16,150 000000 ff6600} ${alignr}${upspeedgraph eth0 16,150 000000 ff6600}
    ${color1}${voffset -6}Total Download: ${color7}${totaldown eth0} ${alignr}${color1}Total Upload: ${color7}${totalup eth0}
    #${color}${font caviar dreams:size=14}${alignr}${time %H}:${time %M}
    ${color8}${font caviar dreams:size=14}${goto 0}${tztime Europe/Copenhagen %H:%M}${color6}${alignr}${tztime America/Los_Angeles %H:%M}${image /home/myrkat/.conky/denmark.png -p 56,411}${image /home/myrkat/.conky/california.png -p 228,411}
    I suppose I could do this all in one giant conky if I knew lua or python or something, yeah? Or maybe even if I really got into the voffset and goto stuff... not sure; what I do know is that it all works this way! I keep everything in the .conky directory (clock_rings.lua, anowplaying.py, the graphic images, the scripts) and I have a #! /bin/bash that I added to the auto-start apps:
    Code:
    #! /bin/bash
    sleep 6 &
    conky -c ./.conky/.conky_tr &
    conky -c ./.conky/.conky_br &
    conky -c ./.conky/.conky_tm
    (the sleep 6 is there to let the desktop fully start up, etc.)

    Thank you for reading/viewing. PM me if you have questions, comments or snide remarks!

  9. #22679

    Re: Post your .conkyrc files w/ screenshots

    Good Job there. S.L.O.!
    Death drives an Airflow Chrysler on the streets of man
    A hit and run driver cruising since the world began

  10. #22680
    Join Date
    May 2011
    Beans
    4

    Re: Post your .conkyrc files w/ screenshots

    Cool conkys here!

Page 2268 of 2328 FirstFirst ... 126817682168221822582266226722682269227022782318 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •