Page 2050 of 2348 FirstFirst ... 1050155019502000204020482049205020512052206021002150 ... LastLast
Results 20,491 to 20,500 of 23480

Thread: Post your .conkyrc files w/ screenshots

  1. #20491
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by dk75 View Post
    That's disadvantages of cutting by counting chars.
    And you calls 3 times 'df' with GREP and CUT for every mounted device
    WoW and bash too!!!! dk75 that's great!

    @ Petro Dawg

    I owe you a huge THANK YOU because of helping you I discovered that that funny entry with df -h is actually showing /root for whichever system I am in:

    Logged into /dev/sda1
    Code:
    Filesystem                                              Size  Used Avail Use% Mounted on
    rootfs                                                  9.3G  4.6G  4.3G  52% /
    udev                                                     10M     0   10M   0% /dev
    tmpfs                                                   599M  384K  599M   1% /run
    /dev/disk/by-uuid/44ef4aec-4d2f-464f-9443-c2197895fe29  9.3G  4.6G  4.3G  52% /
    tmpfs                                                   5.0M     0  5.0M   0% /run/lock
    tmpfs                                                   2.0G     0  2.0G   0% /run/shm
    /dev/sda2                                                14G  3.2G   11G  24% /home
    /dev/sda5                                               117G   42G   70G  38% /media/5
    /dev/sda8                                                67G  1.1G   62G   2% /media/8
    fstab:
    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # / was on /dev/sda1 during installation
    UUID=44ef4aec-4d2f-464f-9443-c2197895fe29 /               ext4    errors=remount-ro 0       1
    # /home was on /dev/sda2 during installation
    UUID=e629141f-6e14-49c8-b5b3-4a60956fe00f /home           ext4    defaults        0       2
    # /media/5 was on /dev/sda5 during installation
    UUID=6fc763f2-2587-4572-bc51-39726ab34fc6 /media/5        ext4    defaults        0       2
    # /media/8 was on /dev/sda8 during installation
    UUID=a08073a4-f928-482b-9b34-ebe0b0b74ba6 /media/8        ext4    defaults        0       2
    # swap was on /dev/sda3 during installation
    UUID=054fc6c7-f89d-4112-a72c-b63f4b1ad12e none            swap    sw              0       0
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
    Logged into /dev/sda6
    Code:
    Filesystem                                              Size  Used Avail Use% Mounted on
    rootfs                                                  9.3G  6.6G  2.3G  75% /
    udev                                                     10M     0   10M   0% /dev
    tmpfs                                                   598M  428K  598M   1% /run
    /dev/disk/by-uuid/62874c9e-7f1b-4204-a273-f0699e31c62c  9.3G  6.6G  2.3G  75% /
    tmpfs                                                   5.0M     0  5.0M   0% /run/lock
    tmpfs                                                   2.0G     0  2.0G   0% /run/shm
    /dev/sda5                                               117G   42G   70G  38% /media/5
    /dev/sda7                                                14G  4.2G  9.2G  32% /home
    /dev/sda8                                                67G  1.1G   62G   2% /media/8
    fstab:
    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # / was on /dev/sda6 during installation
    UUID=62874c9e-7f1b-4204-a273-f0699e31c62c /               ext4    errors=remount-ro 0       1
    # /home was on /dev/sda7 during installation
    UUID=fff46aa2-f36b-4e78-8135-736f1754a2a3 /home           ext4    defaults        0       2
    # /media/5 was on /dev/sda5 during installation
    UUID=6fc763f2-2587-4572-bc51-39726ab34fc6 /media/5        ext4    defaults        0       2
    # /media/8 was on /dev/sda8 during installation
    UUID=a08073a4-f928-482b-9b34-ebe0b0b74ba6 /media/8        ext4    defaults        0       2
    # swap was on /dev/sda3 during installation
    UUID=054fc6c7-f89d-4112-a72c-b63f4b1ad12e none            swap    sw              0       0
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
    Now to find out WHY!

    And it clearly shows up in a modified conky using mrpeachys LUA script!

    dk75's coding works as advertised, always good.

    collaboration is a good thing.


    Not going to tweak the original "| cut -c xx-xx" because when I find out what's causing that strange entry in df -h (and fstab) I'll fix it and then I'll bet it works just fine.

  2. #20492
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    Not going to tweak the original "| cut -c xx-xx" because when I find out what's causing that strange entry in df -h (and fstab) I'll fix it and then I'll bet it works just fine.
    You have nothing in FSTAB and it is done by new rc.sysinit script: https://bbs.archlinux.org/viewtopic.php?id=99417
    Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
    Linux user No.: 483055 | My Conky Pitstop corner | One4All project

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

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Crinos512 View Post
    Mind == Blown

    I just thought I'd pop in to see what's up and I find this. Granted I lost track of things shortly after LUA came onto the scene, but making lua procedure calls in line with conky.... SWEET!

    Thanks Crinos512

    most of my newer scripts have the ability to be setup and run entirely through the conkyrc, without every having to touch the lua script itself.

    I even have an entire interactive conky setup this way

    @Sector11 - you would think after this long you would get my name right!
    hmm.. maybe my lua script needs an option to only display x number of characters in an output
    so that super long name could be cut down and not run over everything else

    also a way of outputting a bar based on the use%...
    Last edited by mrpeachy; September 2nd, 2012 at 07:39 PM.

  4. #20494
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by dk75 View Post
    You have nothing in FSTAB and it is done by new rc.sysinit script: https://bbs.archlinux.org/viewtopic.php?id=99417
    That link is two years old and they are still talking about /boot/grub/menu.lst, I have no /boot/grub/menu.lst - I'm using grub2

    I did a search there is no 'rc.sysinit' anywhere on my Debian system.

    This is something I have only just noticed.

    EDIT: What do you mean I have nothing in fstab - I have one for each OS and I showed them, they are created when the systems were installed. You lost me on this.
    Last edited by Sector11; September 2nd, 2012 at 07:38 PM.

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

    Re: Post your .conkyrc files w/ screenshots

    here is a verison that lets you specift the max length of text returned when using the fsys and mount options

    Code:
    --partitions for conky by mrpeachy
    conky_start=1
    function conky_get_mounted_data(interval)
    local updates=tonumber(conky_parse("${updates}"))
    timer=(updates % interval)
    if timer==0 or conky_start==1 then
    fsys={}
    size={}
    used={}
    avail={}
    uperc={}
    mount={}
    local file = io.popen("df -h")
    	for line in file:lines() do
    		if string.find(line,"/dev/")~=nil then
    		local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
    		table.insert(fsys,fs)
    		local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(size,sz)
    		local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(used,us)
    		local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(avail,av)
    		local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(uperc,up)
    		local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
    		table.insert(mount,mn)
    		end
    	end
    file:close()
    conky_start=nil
    end--timed section
    return ""
    end
    
    function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
    d=tostring(d)
    n=tonumber(n)
    c=tonumber(c) or 0
    if d=="total" then
    data=#fsys or 1
    elseif d=="fsys" then
    data=fsys[n] or ""
    	if c~=0 then
    	data=string.sub(data,1,c) or ""
    	end
    elseif d=="size" then
    data=size[n] or ""
    elseif d=="used" then
    data=used[n] or ""
    elseif d=="free" then
    data=avail[n] or ""
    elseif d=="use%" then
    data=uperc[n] or ""
    elseif d=="mount" then
    data=mount[n] or ""
    	if c~=0 then
    	data=string.sub(data,1,c) or ""
    	end
    else
    data="check data type"
    end
    return data
    end--end main function
    Code:
    ##instructions
    ##load script
    lua_load ~/lua/mounted.lua
    ## first lua command below text:
    ## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
    ## to get output:
    ## ${lua mount partition_number data_type text_length}, where partition number is a number
    ## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
    ## data_type can be
    ## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
    ## fsys - shows filesystem
    ## size - shows space used in appropriate units
    ## free - shows free space in appropriate units
    ## use% - shows % used
    ## mount - shows mountpoint
    
    TEXT
    CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
    TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
    FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
    ${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
    ${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
    ${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
    ${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}
    and bars

    Code:
    --partitions for conky by mrpeachy with bars
    conky_start=1
    function conky_get_mounted_data(interval)
    local updates=tonumber(conky_parse("${updates}"))
    timer=(updates % interval)
    if timer==0 or conky_start==1 then
    fsys={}
    size={}
    used={}
    avail={}
    uperc={}
    mount={}
    local file = io.popen("df -h")
    	for line in file:lines() do
    		if string.find(line,"/dev/")~=nil then
    		local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
    		table.insert(fsys,fs)
    		local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(size,sz)
    		local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(used,us)
    		local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(avail,av)
    		local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(uperc,up)
    		local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
    		table.insert(mount,mn)
    		end
    	end
    file:close()
    conky_start=nil
    end--timed section
    return ""
    end
    
    function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
    d=tostring(d)
    n=tonumber(n)
    c=tonumber(c) or 0
    if d=="total" then
    data=#fsys or 1
    elseif d=="fsys" then
    data=fsys[n] or ""
    	if c~=0 then
    	data=string.sub(data,1,c) or ""
    	end
    elseif d=="size" then
    data=size[n] or ""
    elseif d=="used" then
    data=used[n] or ""
    elseif d=="free" then
    data=avail[n] or ""
    elseif d=="use%" then
    data=uperc[n] or ""
    elseif d=="mount" then
    data=mount[n] or ""
    	if c~=0 then
    	data=string.sub(data,1,c) or ""
    	end
    else
    data="check data type"
    end
    return data
    end--end main function
    
    require 'cairo'
    function conky_mbar(m,x,y,w,h,c)
    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 m=tonumber(m)
    if m<=#fsys then
    local x=tonumber(x)+0.5
    local y=tonumber(y)+0.5
    local w=tonumber(w) or 100
    local h=tonumber(h) or 20
    local c=tonumber(c) or 0xffffff
    local perc=tonumber(string.sub(uperc[m],1,string.len(uperc[m])-1))
    local blen=(w/100)*perc
    cairo_set_source_rgba(cr,((c/0x10000) % 0x100)/255,((c/0x100) % 0x100)/255,(c % 0x100)/255,1)
    cairo_set_line_width (cr,h)
    cairo_rectangle (cr,x,y,blen,h)
    cairo_fill (cr)
    --cairo_set_source_rgba(cr,1,1,1,1)
    cairo_set_line_width (cr,1)
    cairo_rectangle (cr,x,y,w,h)
    cairo_stroke (cr)
    end
    --################################
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    return ""
    end--end main function
    Code:
    ##instructions
    ##load script
    lua_load ~/lua/mounted.lua
    ## first lua command below text:
    ## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
    ## to get output:
    ## ${lua mount partition_number data_type text_length}, where partition number is a number
    ## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
    ## data_type can be
    ## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
    ## fsys - shows filesystem
    ## size - shows space used in appropriate units
    ## free - shows free space in appropriate units
    ## use% - shows % used
    ## mount - shows mountpoint
    ## to get a bar
    ## ${lua mbar mount_number x y width height color}
    ## x and y coordinates are from top left of conky window
    
    TEXT
    CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
    TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
    FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
    ${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
    ${lua mbar 1 10 62 300 10 0xffffff}
    ${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
    ${lua mbar 2 10 90 300 10 0xffffff}
    ${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
    ${lua mbar 3 10 118 300 10 0xffffff}
    ${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}
    ${lua mbar 4 10 148 300 10 0xffffff}
    Last edited by mrpeachy; September 2nd, 2012 at 09:32 PM.

  6. #20496
    Join Date
    Jul 2012
    Location
    Oklahoma, USA
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    WoW and bash too!!!! dk75 that's great!

    @ Petro Dawg

    I owe you a huge THANK YOU because of helping you I discovered that that funny entry with df -h is actually showing /root for whichever system I am in:

    No prob, I am just happy my newb-ish solution revealed something significant.

    Its going to take me a while to process the LUA stuff and actually incorporate it into my design. I'm actually to the point were I am pretty satisfied with my conky so far, so I'm losing motivation to do more with it as I really don't care to have weather and a lot of that other stuff on my screen all the time.

    I guess my next step tonight will be to get a degree symbol next to my temperature. Don't know what I'll do after that. Perhaps memory bars for USB drives.
    Last edited by Petro Dawg; September 3rd, 2012 at 01:36 AM.

  7. #20497
    Join Date
    Jul 2012
    Location
    Oklahoma, USA
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Post your .conkyrc files w/ screenshots

    Well the degree symbol was easy enough... Not sure if I want to tackle the bars tonight though.



    Code:
    ############################################################################################
    #                                                                                          #
    #  .conkyrc (version 1.03.2)                                                               #
    #  A clean, simple, yet useful configuration code for conky                                #
    #                                                                                          #
    #  Written by Petro Dawg (aka Greg):                                                       #
    #  Last updated on 9/2/12 (version 1.03)                                                   #
    #    > Made USB file system output read any USB drive reguardless of name.  Supports up to #
    #      three USB drives.  Displays names of each USB drive and memory_used/memory_total    #
    #    > Added more color control                                                            #
    #    > Changed override_utf8_locale value from 'no' to 'yes' (stopped 12.04-3D flashing)   #
    #    > Changed font Ubuntu:bold:size=11 to xftfont Ubuntu:bold:size=11                     #
    #    > Changed no_buffers value from 'no' to 'yes' (fixed ram graph output)                #
    #    > Added degree symbol to temperature output                                           # 
    #  Updated on 8/31/12 (version 1.02)                                                       #
    #    > Deleted redundant outputs and adjusted format to make the display more concise.     # 
    #  Updated on 8/26/12  (version 1.01)                                                      #
    #    > Based on source code from http://lonelymachines.org/2012/08/16/simple-conky-config/ #
    #    > This version has been significately modified to meet my needs and reorganized to    #
    #      add clarity for anyone wanting to modify the code further to meet their own needs.  # 
    #                                                                                          #
    #  Displays the following PC information on the Desktop within an embedded window:         #
    #    > CPU temp                                                                            #
    #    > CPU operating speed                                                                 #
    #    > Individual core usage                                                               #
    #    > Top 3 processes using CPU resources                                                 #
    #    > Total RAM                                                                           #
    #    > Active RAM amount                                                                   #
    #    > Top 3 processes using RAM resources                                                 #
    #    > Root folder size and memory used                                                    #
    #    > Home folder size and memory used                                                    #
    #    > USB drive size and memory used                                                      #
    #    > IP Address                                                                          #
    #    > Download speed and data Received                                                    #
    #    > Upload speed and data Sent                                                          #
    #                                                                                          #
    #  Requires installation of:                                                               #
    #    > conky (available in software center)                                                #
    #    > lm-sensors (available in software center)                                           #
    #                                                                                          #
    #  Additional information and resources:                                                   #
    #    > To run conky at startup, create an empty file in your home folder, name it          #
    #      ".conky-startup.sh" and copy the following 2 lines in it:                           #
    #           !/bin/bash                                                                     #
    #           sleep 15 && conky ;                                                            #
    #      Add the path to the .conky-startup.sh file within Startup Applications.             #
    #    > http://conky.sourceforge.net/                                                       #
    #    > http://www.graphviz.org/doc/info/colors.html                                        #
    #    > http://www.december.com/html/spec/colorhex.html                                     #
    #                                                                                          #
    #  Upate Log:                                                                              #
    #    > Version 1.01 (8/26/12)                                                              #
    #      - USB output will disappear from Conky when USB drive is ejected                    #
    ############################################################################################ 
    
    #conky performance settings
      update_interval 3.0
      total_run_times 0
      cpu_avg_samples 4
      no_buffers yes
      double_buffer yes
      override_utf8_locale yes
    
    #overall position of conky window
      alignment bottom_right
      gap_x 12
      gap_y 35
      minimum_size 180 5
      maximum_width 180
    
    #overall appearance of conky window
      own_window yes
      own_window_type normal
      own_window_transparent yes
      own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
      draw_borders no
    
    #default text apperance
      use_xft yes
      xftalpha 0.9
      xftfont Ubuntu:bold:size=11
      default_color khaki1
      draw_shades yes
      draw_outline yes
      default_shade_color white
      default_outline_color black
      uppercase no
    
    #border around graphs
      draw_graph_borders yes
    
    #color assigned to bars/graphs
      color2 grey90 
    
    #colors assigned to items in top processes display
      color3 orangered
      color4 orange
      color5 yellow
    
    #color assigned to USB (removable) drive names
      color6 skyblue
    
    #color assigned to labels:
      color7 khaki1
    
    #color assigned to numerical outputs:
      color8 khaki1
    
    #color assigned to upload and download arrows
      color9 green
    
    
    ############################################################################################
    #                                                                                          #
    #  The code below 'TEXT' will control what is displayed by conky:                          #
    #   -> In the interest of clarity, the system outputs are divided into four related groups #
    #      (i.e. all code related to the CPU is in one grouping of adjacent lines while code   #
    #      related to RAM is in another grouping of adjacent lines).  Each group is hereafter  #
    #      refered to as a 'TEXT code block'.                                                  #
    #   -> To best fit your screen, adjust the overall vertical length of the display by       #
    #      adding or deleting empty lines either before or after the TEXT code blocks below.   #
    #                                                                                          #
    ############################################################################################ 
    TEXT
    
    # TEXT code block 1: START 
    ############################################################################################
    #                                                                                          #
    #  The first TEXT code block displays CPU information                                      #
    #   -> Temperature displayed is the PCI Adapter temp1 output on same line as 'high' output #
    #   -> Requires the installation of lm-sensors to work:  sudo apt-get lm-sensors           #
    #   -> After installation run:  sensors-detect      (answer yes to all)                    #
    #   -> Run 'sensors' in terminal to determine which line needs grep & which columns        #
    #      needs to be cut.                                                                    #
    #   -> Replace:  ${cpubar cpu1 10} with ${cpugraph cpu1 FFFF00 FF0000} to change to graph  #
    #      output of CPU1 usage.                                                               #
    #   -> 'FFFF00' and 'FF0000' are HEX color codes and can be replaced with whatever colors  #
    #      you like.  Goto www.graphviz.org/doc/info/colors.html for color information (hold   #
    #      mouse over color to see HEX code for that color).                                   #
    #   -> Add outputs for more cores by adding the following lines below the 'cpu2' lines:    #
    #           Core '#': ${alignr}${cpu cpu'#'}%                                              #
    #           ${color2}${cpubar cpu'#' 10}${color}                                           #
    #      (repeat for each additional core up to the total number of cores in the system)     #      
    #      (replace each '#' with the number of the core (i.e. 3 or 4))                        #
    #   -> If you have a single core simply delete the 2 lines containing 'cpu2'               #
    #                                                                                          #
    ############################################################################################
    ${color7}Core Temp${color}: ${color8}$alignr${exec sensors | grep 'high' | cut -c16-19}°C${color}
    ${color7}CPU Speed${color}: ${color8}${alignr}${freq}MHz
    ${color2}${cpubar cpu1 10}${color}
    ${color2}${cpubar cpu2 10}${color}
    ${font Ubuntu:size=10}${color3}${top name 1}$alignr${top cpu 1}
    ${color4}${top name 2}$alignr${top cpu 2}
    ${color5}${top name 3}$alignr${top cpu 3}${color}${font}
    # TEXT code block 1: END
       
    # TEXT code block 2: START
    ############################################################################################
    #                                                                                          #
    #  Second TEXT code block displays RAM information:                                        #
    #   -> Replace ${membar 10} with ${memgraph FFFF00 FF0000} to change to graph output of    #
    #      RAM usage. (I did not find this very useful as RAM usage is usually fairly steady   #
    #      on my sytem.)                                                                       #
    #                                                                                          #
    ############################################################################################
    ${color7}RAM Total${color}: ${color8}${alignr}$memmax
    ${color2}${membar 10}${color}
    ${font Ubuntu:size=10}${color3}${top_mem name 1}$alignr${top_mem mem 1}
    ${color4}${top_mem name 2}$alignr${top_mem mem 2}
    ${color5}${top_mem name 3}$alignr${top_mem mem 3}${font}${color}
    # TEXT code block 2: END
    
    # TEXT code block 3: START
    ############################################################################################
    #                                                                                          #
    #  Third TEXT code block displays Filesystem information:                                  #
    #   -> The USB information is specific to the USB drive settings on my computer (i.e. my   #
    #      1st USB mounts at /dev/sdb1). Run 'df -H' in terminal to determine drive locations. #
    #   -> To make conky display correctly the cut locations for sdb1, sdc1, and sdd1 may need #
    #      to be adjusted; do this by adjusting the #'s for all 9 "cut -c##-##" below.         #
    #                                                                                          #
    ############################################################################################
    ${color7}Root${color}: ${alignr}${color8}${fs_used /}${color} / ${color8}${fs_size /}
    ${color2}${fs_bar 10 /}${color}
    ${color7}Home${color}: ${alignr}${color8}${fs_used /home}${color} / ${color8}${fs_size /home}
    ${color2}${fs_bar 10 /home}${color}${if_existing  /dev/sdb1}
    ${color6}${exec df -h | grep 'sdb1' | cut -c46-55}${color}:${color8}${alignr}${exec df -H | grep 'sdb1' | cut -c23-27}${color} / ${color8}${exec df -h | grep 'sdb1' | cut -c17-20}${else}${endif}${if_existing  /dev/sdc1}
    ${color6}${exec df -h | grep 'sdc1' | cut -c46-55}${color}:${color8}${alignr}${exec df -H | grep 'sdc1' | cut -c23-27}${color} / ${color8}${exec df -h | grep 'sdc1' | cut -c17-20}${else}${endif}${if_existing  /dev/sdd1}
    ${color6}${exec df -h | grep 'sdd1' | cut -c46-55}${color}:${color8}${alignr}${exec df -H | grep 'sdd1' | cut -c23-27}${color} / ${color8}${exec df -h | grep 'sdd1' | cut -c17-20}${else}${endif}${color}
    # TEXT code block 3: END
    
    # TEXT code block 4: START
    ############################################################################################
    #                                                                                          #
    #  Fourth TEXT code block displays Network information:                                    #
    #   -> A graphical output of download information can be displayed by adding the following #
    #      line of code between the line starting with 'Down' and the line begining with       #
    #      'Up':                                                                               #
    #      ${color2}${downspeedgraph wlan0 FFFF00 FF0000}${color}                              #
    #   -> A graphical output of upload information can be displayed by adding the following   #
    #      line of code between after the line begining with 'Up':                             #
    #      ${color2}${upspeedgraph wlan0 FFFF00 FF0000}${color}                                #
    #   -> 'FFFF00' and 'FF0000' are HEX color codes and can be replaced with whatever colors  #
    #      you like.  Goto www.graphviz.org/doc/info/colors.html for color information (hold   #
    #      mouse over color to see HEX code for that color).                                   #
    #                                                                                          #
    ############################################################################################
    ${color7}IP Address${color}: ${color8}${alignr}${addr wlan0}
    ${color9}${font webdings:size=16}6${font}${color} ${color8}${downspeed wlan0}/s${alignr}${totaldown wlan0}
    ${color9}${font webdings:size=16}5${font}${color} ${color8}${upspeed wlan0}/s${alignr}${totalup wlan0}
    # TEXT code block 4: END
    Last edited by Petro Dawg; September 3rd, 2012 at 02:08 AM.

  8. #20498
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    thanks sector11, let me know if you try it and run into any problems!
    what about this one by mrpeachy
    Code:
    --mounted drive section in conky by mrpeachy, based on the bash script by George dH
    --[[in conkyrc
    ^regular cony settings
    
    lua_load /path-to-script/filename.lua #this line above text, function is called with lua_parse below TEXT
    
    TEXT
    stuff above mounted section
    ${lua_parse main}
    stuff below mounted section
    ]]
    function conky_main()
    --#########################################################################################################
    --settings, local settings help avoid memoery leaks
    --set location of mount directory
    local mount_directory="/media/"
    --set length of names
    local name_length=7
    --set exclusions that will not be shown #######################
    exclusions={--start exclusion list, enter exclusions below within quotes followed by comma
    "exclusion 1",
    "exclusion 2",
    }--close exclusion list
    --set location of the image file you want to use
    local image_file="/home/benjamin/Desktop/screenshots/parameciumdrop9_300.jpg"
    --set coordinates of the top left corner of top image, other images will adjust as needed
    local im_tl_x=0
    local im_tl_y=34
    --set image size
    local im_width=18
    local im_height=18
    --set diskiograph size and colors ###################
    --set height
    local dio_height=15
    --set width
    local dio_width=270
    --color1
    local col1="000000"
    --color2
    local col2="00dd00"
    --set vertical gals ##################################
    --adjust gap from bottom of section above to mounted section
    local voffset0=5
    --set gap between mount entries
    local gap_between_entries=25
    --adjust text into diskiograph box
    local voffset1=5
    --adjust gap at bottom of the mounted section to the next section when drives are shown
    local voffset2=-5
    --set horizontal gaps ################################
    --from left to diskio graph
    local goto1=25
    --from left to mount name
    local goto2=20
    --from left to file system type
    local goto3=70
    --from left to file system size
    local goto4=120
    --from left to fs free perc
    local goto5=185
    --from left to fs free amount
    local goto6=230
    --when no drives are shown ###########################
    --set message for no drives mounted, or set "" so that there is no message or gap
    local no_message="NO DRIVES"
    --if you have set a message set the following gap to the next conky section
    local voffset3=5
    --if you want no gap when no drives are displyed, set voffset amount that will close gap
    local voffset4=-10--will need to be negative
    --end settings
    
    --get things mounted
    local f = io.popen("ls -1 "..mount_directory.."")
    mount_list = f:read("*a")
    f:close()
    mounted=string.split(mount_list,"\n")
    --remove exclusions
    for i=1,#mounted do
    local n=i
        for i=1,#exclusions do
            if exclusions[i]==mounted[n] then
            table.remove(mounted,n)
            end
        end
    end
    --count things mounted
    local nmount=#mounted-1
    if nmount==nil then nmount=0 end
    if nmount>0 then
    command_line={}
    --create conky commands
        for i=1,tonumber(nmount) do
        local f = io.popen("mount | grep '"..mounted[i].."' | awk '{print $1}'")
        device = f:read("*a")
        f:close()
        local mountname=string.sub(mounted[i],1,name_length)
        command_line[i]="${voffset "..gap_between_entries-voffset1.."}${goto "..goto1.."}${image "..image_file.." -p "..im_tl_x..","..im_tl_y+(gap_between_entries*(i-1)).." -s "..im_height.."x"..im_width.."}${diskiograph "..device.." "..dio_height..","..dio_width.." "..col1.." "..col2.."}${color}${goto "..goto2.."}${voffset "..voffset1.."}${font} "..mountname.." ${goto "..goto3.."}${fs_type "..mount_directory..mounted[i].."}${goto "..goto4.."}${fs_size "..mount_directory..mounted[i].."}${goto "..goto5.."}${fs_free_perc "..mount_directory..mounted[i].."}%${goto "..goto6.."}${fs_free "..mount_directory..mounted[i].."}"
        end
    --return commands
    return "${voffset "..voffset0-gap_between_entries+voffset1.."}"..table.concat(command_line).."${voffset "..voffset2.."}"
    else
        if no_message~="" then
        return "${voffset "..voffset0.."}"..no_message.."${voffset "..voffset3.."}"
        else
        return "${voffset "..voffset4.."}"
        end
    end
    --#########################################################################################################
    end-- end main function
    
    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
    Quote Originally Posted by Crinos512 View Post
    Mind == Blown

    I just thought I'd pop in to see what's up and I find this. Granted I lost track of things shortly after LUA came onto the scene, but making lua procedure calls in line with conky.... SWEET!

    Always a pleasure Crinos512. you got me started intensly messing with my conky
    Quote Originally Posted by dk75 View Post
    That's disadvantages of cutting by counting chars.
    And you calls 3 times 'df' with GREP and CUT for every mounted device.

    Here's BASH solution for sdb1, sdc1 and sdd1:
    Code:
    ${color2}${fs_bar 10 /home}${color}${if_existing /dev/sdb1}
    $(color6}${execpi 3 df -H |mawk '/sdb1/ {gsub(/\/.*\//,"",$6); print $6"${color}:${color8}${alignr}"$3"${color} / ${color8}"$2}'}${color}${else}${endif}${if_existing /dev/sdc1}
    $(color6}${execpi 3 df -H |mawk '/sdc1/ {gsub(/\/.*\//,"",$6); print $6"${color}:${color8}${alignr}"$3"${color} / ${color8}"$2}'}${color}${else}${endif}${if_existing /dev/sdd1}
    $(color6}${execpi 3 df -H |mawk '/sdd1/ {gsub(/\/.*\//,"",$6); print $6"${color}:${color8}${alignr}"$3"${color} / ${color8}"$2}'}${color}${else}${endif}
    dk75 to the rescue making it as simple as possible
    I'm a super power user

  9. #20499
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    No prob, I am just happy my newb-ish solution revealed something significant.
    Well, I get carried away with conky. I know it, I like to tweak and play with them. In the end, they are all different. I like what you did with the "df -h" stuff. Showed imagination and that's what counts. Look at what came out of it. Some really nice stuff, which is good for everyone.

    The ° symbol? copy/paste?

    Let me tell you your first conky is light years ahead my first one.

    It looks great!

    Looking forward to seeing how you touch it up.

  10. #20500
    Join Date
    Jul 2007
    Location
    The U. S. of A.
    Beans
    163
    Distro
    Kubuntu Development Release

    Thumbs down Re: Post your .conkyrc files w/ screenshots

    @ Sector11 Thanks! it's nice to be recognized. I maintain that I used the bash scripts for efficiency, though. ... not to show off.

    @ djyoung4 From what I have seen you have truely become a force to be reckoned with. The Code-Fu is strong with this one!

    @ mrpeachy Have you considered collecting all of your LUA functions in a single package? (moving the usage info into the LUA comments itself) Can you load more than one LUA script into a conky at a time? Regardless, I have a feeling I'm going to be reading a lot of your blog.

    .
    .
    .
    OK, I guess there's nothing for it. Time to start changing things up... and catching up. You guys are inspiring!

    Well, here's where I'm starting from now...

    Fortress2.jpg

    Basically it's a modified version of the "Sunken Fortress" I did back in Natty. Has it really been that long? eesh.

    Time to go drum up some ideas.
    || Kubuntu x86_64 (15.10 Dev.) || KDE 4.9.00 ||
    || Dell Inspiron 570 || 8GB PC3-10600 DDR3 RAM || AMD Phenom II X4 820 @ 2.8Ghz ||
    || Logitech M570 Trackball || Logitech G15 Gaming Keyboard ||
    Conky: ... no such configuration: 'normal'

Page 2050 of 2348 FirstFirst ... 1050155019502000204020482049205020512052206021002150 ... 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
  •