Page 2227 of 2300 FirstFirst ... 122717272127217722172225222622272228222922372277 ... LastLast
Results 22,261 to 22,270 of 22995

Thread: Post your .conkyrc files w/ screenshots

  1. #22261
    Join Date
    Feb 2012
    Beans
    50
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    Didn't have time to read all the thread, but I think I see quite a lot of discussion. Maybe there'll eventually be ConkyOS?

    Here's mine: (Computer model is a ThinkPad X200)



    Code:
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_hints undecorated,below,skip_taskbar
    background no
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # fiddle with window
    use_spacer yes
    use_xft yes
    
    # Update interval in seconds
    update_interval 3.0
    
    # Minimum size of text area
    minimum_size 400 5
    
    # Draw shades?
    draw_shades yes
    
    # Text stuff
    draw_outline no # amplifies text if yes
    draw_borders no
    
    uppercase no # set to yes if you want all text to be in uppercase
    
    # Stippled borders?
    stippled_borders 8
    
    # border margins
    border_margin 4
    
    # border width
    border_width 1
    
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color white
    default_shade_color black
    default_outline_color white
    
    own_window_colour brown
    own_window_transparent yes
    
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    
    # Gap between borders of screen and text
    gap_x 10
    gap_y 30
    
    # stuff after 'TEXT' will be formatted on screen
    
    override_utf8_locale yes
    xftfont Terminus:size=8
    xftalpha 0.8
    
    TEXT
    ${offset 240}${color #FF6666}         SYSTEM PROFILE
    ${offset 240}${color slate grey}Computer Name: ${color }$nodename
    ${offset 240}${color slate grey}Kernel:${color }$kernel
    ${offset 240}${color slate grey}Distro: ${color } ${pre_exec lsb_release -d | cut -f 2 } 
    ${offset 240}${color slate grey}Uptime: ${color }$uptime
    ${offset 240}${color slate grey}Free Storage Space: ${color }${fs_free /home}
    ${offset 240}${fs_bar 9,160 /home}
    ${offset 240}${color slate grey}Partition Size: ${color }${fs_size /}
    ${offset 240}${color slate grey}Battery Status: ${color }${battery}
    #${offset 240}${battery BAT0}#${if_match ${battery_percent BAT0} <= 30}${color orange}${battery_bar}{color}${endif}${battery_bar} ${if_match ${battery_percent BAT0} <= 20}${color red}${battery_bar}{color}${endif} ${if_match ${battery_percent BAT0} => 31}${color green}${battery_bar}{color}${endif}
    ${offset 240}${battery_bar}
    
    ${offset 240}${color #FF6666}           CPU SUMMARY             
    ${offset 240}${color slate grey}CPU Freq: ${color } $freq MHz at ${acpitemp}°C
    ${offset 240}${color slate grey}CPU A: ${color }${cpu cpu1}% ${alignr}${cpubar cpu1 9,80}
    ${offset 240}${color slate grey}CPU B: ${color }${cpu cpu2}% ${alignr}${cpubar cpu2 9,80}
    ${offset 240}${color slate grey}Load: ${color } ${loadavg 1} ${color #3366FF}1min ${alignr}${color }${loadavg 2} ${color #3366FF}5min
    
    ${offset 240}${color #FF6666}        ACTIVE PROCESSES
    ${offset 240}${color slate grey}Processes: ${color }$processes   ${color slate grey}Running: ${color }$running_processes
    
    ${offset 240}${color #3366FF}Process Name: ${alignr}% CPU
    ${offset 240}${color #ddaa00}${top name 1} ${alignr}${top_mem cpu 1}
    ${offset 240}${color slate grey}${top name 2} ${alignr}${top cpu 2}
    ${offset 240}${color slate grey}${top name 3} ${alignr}${top cpu 3}
    ${offset 240}${color slate grey}${top name 4} ${alignr}${top cpu 4}
    ${offset 240}${color slate grey}${top name 5} ${alignr}${top cpu 5}
    
    ${offset 240}${color #FF6666}         MEMORY STATUS
    ${offset 240}${color slate grey}System:${color } ${alignr}$mem/$memmax
    ${offset 240}$memperc% ${alignr}${membar 9,100}
    ${offset 240}${color slate grey}Swap Space: ${color } ${alignr}$swap/$swapmax
    ${offset 240}$swapperc% ${alignr}${swapbar 9,100}
    
    #${offset 240}${color slate grey}Highest Memory:
    #${offset 240}${color #ddaa00} ${top_mem name 1}${top_mem mem 1}
    #${offset 240}${color slate grey} ${top_mem name 2}${top_mem mem 2}
    #${offset 240}${color slate grey} ${top_mem name 3}${top_mem mem 3}
    #${offset 240}${color slate grey} ${top_mem name 4}${top_mem mem 4}
    #${offset 240}${color slate grey} ${top_mem name 5}${top_mem mem 5}
    
    ${offset 240}${color #FF6666}         NETWORK NUMBERS
    ${offset 240}${color #FF0000}${if_empty ${exec cat /proc/net/arp | grep eth0}}${if_empty ${exec cat /proc/net/arp | grep wlan0}}No network connection 
    ${offset 240}${else}${color slate grey}Internal IP: ${alignr}${color }${addr wlan0}
    ${offset 240}${color slate grey}External IP: ${color } ${alignr}${execi 1800 wget -O - http://ip.tupeux.com | tail}
    ${offset 240}${color slate grey}Router: ${alignr}${color }${wireless_essid wlan0}  at ${wireless_bitrate wlan0}
    ${offset 240}${color slate grey}Range: ${color }${wireless_link_qual_perc wlan0}%  ${alignr}${wireless_link_bar 9,70 wlan0}
    ${offset 240}${color slate grey}Down: ${color }${downspeed wlan0} ${color slate grey}${alignr}Up: ${color }${upspeed wlan0}
    ${offset 240}${color slate grey}Total Down: ${alignr}${color }${totaldown wlan0}
    ${offset 240}${color slate grey}Total Up: ${alignr}${color }${totalup wlan0}${endif}
    
    ${offset 240}${else}${color slate grey}LAN IP:  ${alignr}${color }${addr eth0}
    ${offset 240}${color slate grey}External IP: ${color } ${alignr}${execi 1800 wget -O - http://ip.tupeux.com | tail}
    ${offset 240}${color slate grey}Down: ${color }${downspeed eth0} ${alignr}${color slate grey}Up: ${color }${upspeed eth0}
    ${offset 240}${color slate grey}Total Down: ${alignr}${color }${totaldown eth0}
    ${offset 240}${color slate grey}Total Up: ${alignr}${color }${totalup eth0}
    ${endif}
    
    ${offset 240}${color #FF6666}         ACTIVE CONNECTIONS
    ${offset 240}${color slate grey}Inbound: ${color }${tcp_portmon 1 32767 count}  ${color slate grey}Outbound: ${color }${tcp_portmon 32768 61000 count}${color slate grey}${alignr}All: ${color }${tcp_portmon 1 65535 count}
    ${offset 240}${color #0077ff}Inbound
    ${offset 240}${color slate grey}${color }${tcp_portmon 1 32767 rhost 0}
    ${offset 240}${color slate grey}${color }${tcp_portmon 1 32767 rhost 1}
    ${offset 240}${color slate grey}${color }${tcp_portmon 1 32767 rhost 2}
    ${offset 240}${color slate grey}${color }${tcp_portmon 1 32767 rhost 3}
    ${offset 240}${color slate grey}${color }${tcp_portmon 1 32767 rhost 4}
    
    ${offset 240}${color #0077ff}Outbound
    ${offset 240}${color slate grey}${color }${tcp_portmon 32768 61000 rhost 0}
    ${offset 240}${color slate grey}${color }${tcp_portmon 32768 61000 rhost 1}
    ${offset 240}${color slate grey}${color }${tcp_portmon 32768 61000 rhost 2}
    ${offset 240}${color slate grey}${color }${tcp_portmon 32768 61000 rhost 3}
    ${offset 240}${color slate grey}${color }${tcp_portmon 32768 61000 rhost 4}
    Sources: Lots -- from here, for the "intelligent" eth0 vs wlan0 network monitor, and a bunch of other places.

    Want: 1) Put it back to "integrated desktop mode" (own_window no) because if it's "yes" then it makes my desktop icons disappear until I move the cursor over them, then after I removed the curser they reappear; otherwise I have to contend with that silly verticle line going up the display; 2) using [urlhttp://crunchbang.org/forums/viewtopic.php?id=4485]some code like this[/url], make the battery gauge go from green from 100% to 35%, orange from 34% to 20%, and red from 19% down; and probably a few other tiny tweaks here and there.

    It's good for my laptop here, 1280x800 doesn't really have the room; I need the other part of the display to even display XGA webpages . I also slightly envy this guy's work http://img24.imageshack.us/img24/462/nelisnetbook2.png (found it here) and also about halfway down here there are some designs/methods that make me turn green.

    iMac G4 800MHz, Compaq E500, ThinkPad X200
    Likes: Ubuntu 9.10, 10.04LTS with 9.10 back-theme
    Classic Mac Networking v3.1 http://applefool.com/se30/
    "Linux assumes you know exactly what you are doing." -oboedad55, ubuntuforums.org

  2. #22262
    Join Date
    Jul 2012
    Location
    Oklahoma, USA
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    @ Mk32

    Looks good, a lot like the one I first started out with.

    Here's my most recent...

    Last edited by Petro Dawg; September 1st, 2013 at 06:47 PM.
    Who's Awesome? You're Awesome.

  3. #22263
    Join Date
    Feb 2012
    Beans
    50
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    Love that desktop image, where did you get it from?

    Would you also mind posting your conkyrc?

    As for me, I ended up removing the connection list but kept the active outgoing and incoming counter. When long server names were connected it would mess with the location positioning on of the conky window and go whacky.

    Initially I had the memory allocation % thingy but as you can see 10.04LTS has yet to even use 1GB of RAM and with 6GB installed I doubt it would need it. In fact I haven't seen the swap space volume increment by one byte yet.

    I noticed the other day that the traffic downspeed and upspeed wasn't being calculated right. Anybody have any clues/suggestions? Also any clues for the color-changing battery bar?

    P.S. Love those slant // things for your bar graphs.

    iMac G4 800MHz, Compaq E500, ThinkPad X200
    Likes: Ubuntu 9.10, 10.04LTS with 9.10 back-theme
    Classic Mac Networking v3.1 http://applefool.com/se30/
    "Linux assumes you know exactly what you are doing." -oboedad55, ubuntuforums.org

  4. #22264
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    colored battery bar?
    Code:
    ${battery_percent}${if_match ${battery_percent}<50}${if_match ${battery_percent}<30}${color red}${else}${color orange}${endif}${else}${color green}${endif} ${battery_bar 10,200}${color}
    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

  5. #22265
    Join Date
    Jul 2012
    Location
    Oklahoma, USA
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Mk32 View Post
    Love that desktop image, where did you get it from?
    Mr Google gave it to me; can't remember how I asked him for it, so here it is...




    Quote Originally Posted by Mk32 View Post
    Would you also mind posting your conkyrc?
    I'd be happy to post my conkyrc, but keep in mind it really doesn't port well to other computers without a lot of work. The music player section requires Pithos to be installed (along with a php script), the mail has to be configured for your accounts, the storage has to have cut points changed depending on your system, and the fancy ///// bar graphs will crash a standard installation of Conky (which is the real bugger).

    I think half the fun is trying to figure out how to get Conky to do the things I want; its like a puzzle. But if you want still want my conkyrc, here it is in its full glory...

    conkyrc
    Code:
    ############################################################################################
    #                                                                                          #
    #  conkyrc (version 3.2)                                                                   #
    #                                                                                          #
    #  Written by Petro Dawg (aka Greg):                                                       #
    #  Last updated on 9/1/13 (version 3.2)                                                    #
    #    > Added USB Port 3 which also doubles as Andriod Phone info when plugged in           #
    #    > Added System Volume output when Music Player is on                                  #
    #    > Theme changed to Robot                                                              #
    #  Updated on 8/22/13 (version 3.1.1)                                                      #
    #    > Mail now included in main conky                                                     #
    #    > Changed layout, fixed length, unused items grey out instead of dissapearing         #
    #    > Launcher only opens and closes main and opens config files                          #
    #  Updated on 8/18/13 (version 3.0)                                                        #
    #    > Each Conky Window Launchable/Killable through a Desktop Icon "Conky.desktop"        # 
    #    > Mail indicator as seperate conky "conkyemailrc"                                     #
    #      - includes text files "gmailcount" and "utulsacount" as variable placeholders       #
    #      ] requires conkycal.sh script -no longer used-                                      #
    #    > Added DVD Drive info                                                                #
    #    > Private IP addresses for wireless and wired connections added                       #
    #    > Theme changed to Tux Super Hero                                                     #
    #  Updated on 5/28/13 (version 2.0.1)                                                      #
    #    > Added some trivial system info to a scrolling section at top of conky               #
    #    > Simplified custom bar code to make color control much easier and help stability     #
    #    > Added background image files to handle semi-transparent background                  #
    #    > Calendar separated into seperate conky "conkycalrc"                                 #  
    #  Updated on 5/5/13 (version 2.0)                                                         #
    #    > Replaced bar graphs with my own design                                              #
    #    > Added bar graph for upload and download speeds                                      #
    #    > Reduced number of font switches to prevent crash                                    #
    #  Updated on 4/16/13 (version 1.10)                                                       #
    #    > Added Pithos music player information                                               #
    #    ] System updates only display if updates are available -now displays 0 if none-       #
    #  Updated on 4/2/13 (version 1.09)                                                        #
    #    ] Added calendar -later removed-                                                      #
    #  Updated on 4/1/13 (version 1.08)                                                        #
    #    > Ported to my XCFE system                                                            #
    #      - Changed USB check location to begin at sdc1 (was sdb1)                            #
    #      - Deleted CPU2 info (now 1 core system)                                             #
    #      - Deleted Temp info (sensors not compatible)                                        #
    #    > Changed color scheme to Blue and White                                              #
    #    > Limited system update checking to once per hour due to high resource cost of        #
    #      apt-check process                                                                   #
    #    > Edited to correct some text alignment issues                                        #
    #  Updated on 1/4/13 (version 1.07)                                                        #
    #    > Added available sytem update fields                                                 #
    #    ] Added router name and signal strength field (deleted to make room for better bars)  #
    #    > Changed most of the grep commands to awk                                            #
    #  Updated on 12/30/12 (version 1.06)                                                      #
    #    ] Changed to grey and orange color scheme -later changed-                             #
    #    > revamped fonts, reverted many changes made in last version                          #
    #    ] Added date field -later removed/replace by calendar-                                #
    #  Updated on 12/24/12 (version 1.05)                                                      #
    #    > Changed color scheme to neon -later changed-                                        #
    #    ] Added fonts for Ubuntu symbol and CPU bar numbers -no longer used-                  # 
    #  Updated on 9/14/12 (version 1.04)                                                       #
    #    ] Added MAC and Public IP addresses to output -now deactivated but still in code-     #
    #    > USB output will disappear from Conky when USB drive is ejected                      #
    #  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 -no longer used-                          # 
    #  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:         #
    #    > Operating System details                                                            #
    #    > Number of available system updates                                                  #
    #    > 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 (when attached)                                      #
    #    > Private IP Addresses                                                                #
    #    > Download speed and data Received                                                    #
    #    > Upload speed and data Sent                                                          #
    #    > DVD drive Disk Title                                                                #
    #    > Pithos Music Title, Artist, Album                                                   #
    #    > Monthly Calendar (through another script)                                           #
    #    > Email count (through another script)                                                #
    #    > Sytem Volume when music player is on                                                #
    #                                                                                          #
    #  Requires installation of:                                                               #
    #    > conky (available in software center)                                                #
    #    ] lm-sensors (available in software center) -not needed in current version-           #
    #    > Pithos (http://kevinmehall.net/p/pithos/)                                           #
    #    > php5-cli (sudo apt-get install php5-cli)                                            #
    #    > notify-send (pre-installed notifier program in Ubuntu 12.04)                        #
    #                                                                                          #
    #  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                                     #
    #    > alfios, monofonto (for calendar) fonts required                                     #
    #    > Save fonts to .fonts folder in home screen                                          #
    #    > To load fonts into Conky after font installation run the following in terminal:     #
    #         fc-cache -fv                                                                     #
    #      then reboot system if needed                                                        #
    #    > Conky will crash with this configuraton unless the Fonts.C file is modified         #
    #                                                                                          #
    ############################################################################################ 
    
    
    #conky performance settings
      update_interval 3
      total_run_times 0
      cpu_avg_samples 4
      no_buffers yes 
      double_buffer yes
      override_utf8_locale yes
      max_specials 2000       #a little high, but keeps me from having to worry about it
      #text_buffer_size 2048  #might be needed to prevent crashes
      #max_user_text 65000    #probably never needed, but here if crashes start occuring
    
    
    #overall position of conky window
      alignment br
      gap_x 5
      gap_y 0
      minimum_size 185 200
      maximum_width 185
    
    
    #overall appearance of conky window
      own_window yes
      own_window_type override
      own_window_transparent yes
      #own_window_hints undecorated,above,sticky,skip_taskbar,skip_pager
      draw_borders no
      #own_window_argb_visual yes
      #own_window_argb_value 100
    
    
    #default text apperance
      use_xft yes
      xftalpha 1
      xftfont Alfios:size=12
      default_color FFFFFF 
      draw_shades true
      draw_outline no
      default_shade_color black
      default_outline_color black
      uppercase no
    
    
    #border around graphs
      draw_graph_borders no
    
    
    #colors 
      color1 33EE99 #FFFF00 #color 1 - 8 is for gradual color change bars
      color2 33DD99 #FFDD00 
      color3 33CC99 #FFBB00 
      color4 33BB99 #FF9900 
      color5 33AA99 #FF7700 
      color6 339999 #FF5500 
      color7 338899 #FF3300 
      color8 337799 #FF1100
      color9 2B3856 #445566 #grey unused bar segments use 444444 or 666666
      color0 33FFEE #FF99FF #orange #green #red #FF9900 #highlighed text (main sections)
    
    
    TEXT 
    ############################################################################################
    #                                                                                          #
    #                        Images loaded into Conky and Header Displayed                     # 
    #                                                                                          #
    ############################################################################################
    ###
    ##  two sizes of backgound images are used, a longer one if pithos is running 
    ##  set to "_light" for dark wallpapers, "_dark" for light wallpapers, and "_medium" for in between
    #
    
    
    ${voffset 25}${image ~/.conky/Main/main_light.png -p -5,33 -s 200x876}\
    ${if_running pithos}${else}${image ~/.conky/Main/grey-music-note-md.png -p 65,823 -s 60x60}${endif}
    ${image ~/.conky/Main/robot2.png -p 12,40 -s 55x72}\
    ${color0}${font Alfios:bold:size=12}${goto 76}${execi 1800 lsb_release -a | awk '/Description/ {print $2, $3}'}${color}${font}
    ###
    ##  the scrolling information below will have to be formated differently if using other 
    ##  fonts or if your system outputs are longer than 16 characters long
    ##  scroll (length of display) (step of display) (information to display)
    #
    ${goto 76}${scroll 16 16 ${color}Conky 1.9.1     ${kernel}CPU ${freq_g}GHz     RAM ${memmax}     Updates  ${execi 900 /usr/lib/update-notifier/apt-check --human-readable | awk '/can/ {print $1}'}}
    ############################################################################################
    #                                                                                          #
    #                 CPU Information with Custom Color Changing Bars                          #
    #                                                                                          #
    ############################################################################################
    ${voffset -3}${color8}${hr 1}${color}
    ${color8}${hr 1}${color}
    ${voffset -28}${color1}${alignc}RESOURCES${color}
    ${voffset 7}${color0}CPU${voffset 1}${goto 45}${font Impact:size=10}${color9}/////////////////////${goto 45}\
    ${if_match ${cpu cpu0} >    0}${color1}/\
    ${if_match ${cpu cpu0} >    5}${color1}/\
    ${if_match ${cpu cpu0} >   10}${color2}/\
    ${if_match ${cpu cpu0} >   15}${color2}/\
    ${if_match ${cpu cpu0} >   20}${color3}/\
    ${if_match ${cpu cpu0} >   25}${color3}/\
    ${if_match ${cpu cpu0} >   30}${color3}/\
    ${if_match ${cpu cpu0} >   35}${color4}/\
    ${if_match ${cpu cpu0} >   40}${color4}/\
    ${if_match ${cpu cpu0} >   45}${color4}/\
    ${if_match ${cpu cpu0} >   50}${color5}/\
    ${if_match ${cpu cpu0} >   55}${color5}/\
    ${if_match ${cpu cpu0} >   60}${color5}/\
    ${if_match ${cpu cpu0} >   65}${color6}/\
    ${if_match ${cpu cpu0} >   70}${color6}/\
    ${if_match ${cpu cpu0} >   75}${color6}/\
    ${if_match ${cpu cpu0} >   80}${color7}/\
    ${if_match ${cpu cpu0} >   85}${color7}/\
    ${if_match ${cpu cpu0} >   90}${color7}/\
    ${if_match ${cpu cpu0} >   95}${color8}/\
    ${if_match ${cpu cpu0} == 100}${color8}/\
    ${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
    ${color}${font}${voffset -1}${alignr}${cpu cpu0}%
    ###
    ##  Top 3 CPU using processes
    #
    ${voffset 2}${goto 15}${color}${top name 1}${color}${alignr}${top cpu 1}   
    ${goto 15}${color}${top name 2}${color}${alignr}${top cpu 2}   
    ${goto 15}${color}${top name 3}${color}${alignr}${top cpu 3}   
     
    ############################################################################################
    #                                                                                          #
    #                   RAM Information with Custom Color Changing Bars                        #
    #                                                                                          #
    ############################################################################################
    ${color0}RAM${voffset 1}${goto 45}${font Impact:size=10}${color9}/////////////////////${goto 45}\
    ${if_match ${memperc} >    0}${color1}/\
    ${if_match ${memperc} >    5}${color1}/\
    ${if_match ${memperc} >   10}${color2}/\
    ${if_match ${memperc} >   15}${color2}/\
    ${if_match ${memperc} >   20}${color3}/\
    ${if_match ${memperc} >   25}${color3}/\
    ${if_match ${memperc} >   30}${color3}/\
    ${if_match ${memperc} >   35}${color4}/\
    ${if_match ${memperc} >   40}${color4}/\
    ${if_match ${memperc} >   45}${color4}/\
    ${if_match ${memperc} >   50}${color5}/\
    ${if_match ${memperc} >   55}${color5}/\
    ${if_match ${memperc} >   60}${color5}/\
    ${if_match ${memperc} >   65}${color6}/\
    ${if_match ${memperc} >   70}${color6}/\
    ${if_match ${memperc} >   75}${color6}/\
    ${if_match ${memperc} >   80}${color7}/\
    ${if_match ${memperc} >   85}${color7}/\
    ${if_match ${memperc} >   90}${color7}/\
    ${if_match ${memperc} >   95}${color8}/\
    ${if_match ${memperc} == 100}${color8}/\
    ${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
    ${color}${font}${voffset -1}${alignr}${memperc}%
    ###
    ##  Top 3 RAM using processes
    #
    ${voffset 2}${goto 15}${color}${top_mem name 1}${color}${alignr}${top_mem mem 1}   
    ${goto 15}${color}${top_mem name 2}${color}${alignr}${top_mem mem 2}   
    ${goto 15}${color}${top_mem name 3}${color}${alignr}${top_mem mem 3}   
    
    
    ###
    ##  Amount of Swap Memory Used
    #
    ${color0}SWAP ${color}${alignr}$swap / $swapmax
    ############################################################################################
    #                                                                                          #
    #                               Storage Media Information                                  #
    #                                                                                          #
    ############################################################################################
    ###
    ##  Hard-drive information
    #
    ${voffset -3}${color8}${hr 1}${color}
    ${color8}${hr 1}${color}
    ${voffset -28}${color1}${alignc}STORAGE${color}
    ${voffset 7}${color0}Linux ${color}${alignr}${execp df -H | awk '/sda1/ {print $3, "/", $2}'}
    ${if_empty ${execp df -H | awk '/sdb1/ {print $3, "/", $2}'}}${color9}WinXP${alignr}Not Mounted${color}${else}${color0}WinXP${color}${alignr}${execp df -H | awk '/sdb1/ {print $3, "/", $2}'}${endif}
    ###
    ##  Displays DVD and USB drive info when plugged in  (3 ports)
    ##  Cut points and mount location may need to be adjusted depending on your system
    #
    ${if_empty ${execp df -H | grep 'sr0' | cut -c46-66}}${color9}DVD/CD${alignr}Empty${color}${else}${color0}${execp df -H | grep 'sr0' | cut -c46-66}${color}${alignr}${execp df -H | awk '/sr0/ {print $3, "/", $2}'}${endif}
    ${if_existing  /dev/sdc1}${color0}${execp df -H | grep 'sdc' | cut -c46-58}${color}${alignr}${execp df -H | awk '/sdc1/ {print $3, "/", $2}'}${else}${color9}USB Port 1${alignr}Empty${color}${endif}
    ${if_existing  /dev/sdd1}${color0}${execp df -H | grep 'sdd' | cut -c46-58}${color}${alignr}${execp df -H | awk '/sdd1/ {print $3, "/", $2}'}${else}${color9}USB Port 2${alignr}Empty${color}${endif}
    ${if_existing  /dev/sde1}${color0}${execp df -H | grep 'sde' | cut -c46-58}${color}${alignr}${execp df -H | awk '/sde1/ {print $3, "/", $2}'}${else}${if_existing  /media/18DC-5C04}${color0}Andriod${color}${alignr}${execp df -H | awk '/sdc/ {print $3, "/", $2}'}${else}${color9}USB Port 3${alignr}Empty${color}${endif}${endif}
    ############################################################################################
    #                                                                                          #
    #                                Network Information                                       #
    #                                                                                          #
    ############################################################################################
    ${voffset -3}${color8}${hr 1}${color}
    ${color8}${hr 1}${color}
    ${voffset -28}${color1}${alignc}NETWORK${color}
    ${voffset 7}${color0}Wired${color}${alignr}${addr eth0}
    ###
    ##  Download speed information, range varies depending on your ISP provided speed
    ##  Bar values will have to be adjusted to reflect your max speed
    #
    ${goto 15}DLS${voffset 1}${goto 50}${font Impact:size=10}${color9}///////////${goto 50}\
    ${if_match ${downspeedf eth0} >    1}${color1}/\
    ${if_match ${downspeedf eth0} >  1.7}${color1}/\
    ${if_match ${downspeedf eth0} >  2.9}${color2}/\
    ${if_match ${downspeedf eth0} >  4.8}${color2}/\
    ${if_match ${downspeedf eth0} >  8.2}${color3}/\
    ${if_match ${downspeedf eth0} >   14}${color3}/\
    ${if_match ${downspeedf eth0} >   23}${color4}/\
    ${if_match ${downspeedf eth0} >   40}${color5}/\
    ${if_match ${downspeedf eth0} >   67}${color6}/\
    ${if_match ${downspeedf eth0} >  114}${color7}/\
    ${if_match ${downspeedf eth0} >= 192}${color8}/\
    ${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
    ${color}${font}${color}${voffset -1}${alignr}${totaldown eth0}  
    ###
    ##  Upload speed information, range varies depending on your ISP provided speed
    ##  Bar values will have to be adjusted to reflect your max speed
    #
    ${goto 15}ULS${voffset 1}${goto 50}${font Impact:size=10}${color9}///////////${goto 50}\
    ${if_match ${upspeedf eth0} >   1}${color1}/\
    ${if_match ${upspeedf eth0} > 1.5}${color1}/\
    ${if_match ${upspeedf eth0} > 2.2}${color2}/\
    ${if_match ${upspeedf eth0} > 3.2}${color2}/\
    ${if_match ${upspeedf eth0} > 4.7}${color3}/\
    ${if_match ${upspeedf eth0} > 6.9}${color3}/\
    ${if_match ${upspeedf eth0} >  10}${color4}/\
    ${if_match ${upspeedf eth0} >  15}${color5}/\
    ${if_match ${upspeedf eth0} >  22}${color6}/\
    ${if_match ${upspeedf eth0} >  33}${color7}/\
    ${if_match ${upspeedf eth0} >= 48}${color8}/\
    ${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
    ${color}${font}${color}${voffset -1}${alignr}${totalup eth0}  
    
    
    ${color0}${wireless_essid wlan0}${color}  ${wireless_link_qual_perc wlan0}%${alignr}${addr wlan0}
    ###
    ##  Download speed information, range varies depending on your ISP provided speed
    ##  Bar values will have to be adjusted to reflect your max speed
    #
    ${goto 15}DLS${voffset 1}${goto 50}${font Impact:size=10}${color9}///////////${goto 50}\
    ${if_match ${downspeedf wlan0} >    1}${color1}/\
    ${if_match ${downspeedf wlan0} >  1.7}${color1}/\
    ${if_match ${downspeedf wlan0} >  2.9}${color2}/\
    ${if_match ${downspeedf wlan0} >  4.8}${color2}/\
    ${if_match ${downspeedf wlan0} >  8.2}${color3}/\
    ${if_match ${downspeedf wlan0} >   14}${color3}/\
    ${if_match ${downspeedf wlan0} >   23}${color4}/\
    ${if_match ${downspeedf wlan0} >   40}${color5}/\
    ${if_match ${downspeedf wlan0} >   67}${color6}/\
    ${if_match ${downspeedf wlan0} >  114}${color7}/\
    ${if_match ${downspeedf wlan0} >= 192}${color8}/\
    ${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
    ${color}${font}${color}${voffset -1}${alignr}${totaldown wlan0}   
    ###
    ##  Upload speed information, range varies depending on your ISP provided speed
    ##  Bar values will have to be adjusted to reflect your max speed
    #
    ${goto 15}ULS${voffset 1}${goto 50}${font Impact:size=10}${color9}///////////${goto 50}\
    ${if_match ${upspeedf wlan0} >   1}${color1}/\
    ${if_match ${upspeedf wlan0} > 1.5}${color1}/\
    ${if_match ${upspeedf wlan0} > 2.2}${color2}/\
    ${if_match ${upspeedf wlan0} > 3.2}${color2}/\
    ${if_match ${upspeedf wlan0} > 4.7}${color3}/\
    ${if_match ${upspeedf wlan0} > 6.9}${color3}/\
    ${if_match ${upspeedf wlan0} >  10}${color4}/\
    ${if_match ${upspeedf wlan0} >  15}${color5}/\
    ${if_match ${upspeedf wlan0} >  22}${color6}/\
    ${if_match ${upspeedf wlan0} >  33}${color7}/\
    ${if_match ${upspeedf wlan0} >= 48}${color8}/\
    ${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
    ${color}${font}${color}${voffset -1}${alignr}${totalup wlan0}   
    ############################################################################################
    #                                                                                          #
    #                                E-mail Notification                                       #
    #   -> Requires installation of conkyEmail                                                 #
    #        sudo add-apt-repository ppa:conky-companions/ppa                                  #
    #        sudo apt-get update && sudo apt-get install conkyemail                            #
    #                                                                                          #
    ############################################################################################
    ${voffset -3}${color8}${hr 1}${color}
    ${color8}${hr 1}${color}
    ${voffset -28}${color1}${alignc}E-MAIL${color}
    ${voffset 7}${color0}U-Tulsa${color}${alignr}${execi 300 conkyEmail -m IMAP -s imap.googlemail.com -o 993 --ssl -u USERNAME_ACCOUNT1_HERE -p PASSWORD_HERE} \
    ${if_match ${execi 300 conkyEmail -m IMAP -s imap.googlemail.com -o 993 --ssl -u USERNAME_ACCOUNT1_HERE -p PASSWORD_HERE} > ${execi 300 cat ~/.conky/Main/utulsacount.txt}}${execi 300 notify-send -i MailBox "     New E-Mail in U-Tulsa"}${endif}\
    ${execi 300 echo $(conkyEmail -m IMAP -s imap.googlemail.com -o 993 --ssl -u USERNAME_ACCOUNT1_HERE -p PASSWORD_HERE) > ~/.conky/Main/utulsacount.txt}
    ${color0}G-Mail${color}${alignr}${execi 300 conkyEmail -m IMAP -s imap.googlemail.com -o 993 --ssl -u USERNAME_ACCOUNT2_HERE -p PASSWORD_HERE} \
    ${if_match ${execi 300 conkyEmail -m IMAP -s imap.googlemail.com -o 993 --ssl -u USERNAME_ACCOUNT2_HERE -p PASSWORD_HERE} > ${execi 300 cat ~/.conky/Main/gmailcount.txt}}${execi 300 notify-send -i MailBox "     New E-Mail in G-Mail"}${endif}\
    ${execi 300 echo $(conkyEmail -m IMAP -s imap.googlemail.com -o 993 --ssl -u USERNAME_ACCOUNT2_HERE -p PASSWORD_HERE) > ~/.conky/Main/gmailcount.txt}
    ############################################################################################
    #                                                                                          #
    #                                 Music info from Pithos                                   #
    #   -> Requires installation of pithos and php5-cli to run a php script                    #
    #        http://kevinmehall.net/p/pithos/                                                  #
    #        sudo apt-get install php5-cli                                                     #
    #                                                                                          #
    ############################################################################################
    ${voffset -3}${color8}${hr 1}${color}
    ${color8}${hr 1}${color}
    ${voffset -28}${color1}${alignc}MUSIC PLAYER${color}
    ${voffset 7}${if_running pithos}${color0}Pithos${color}${alignr}${if_match "${execp amixer get Master | awk '/Front Right:/ {print $7}'}" == "[off]"}Mute${else}\
    Volume ${execp amixer get Master | awk '/Front Right:/ {gsub(/[:[]/,"");gsub(/[]]/,"");print $5}'}${endif}\
    ${else}${alignr}${color9}OFF${color}${endif}
    ${if_running pithos}${goto 15}${execp php ~/.conky/Main/pithos.php 'title'}
    ${goto 15}${execp php ~/.conky/Main/pithos.php 'artist'}
    ${goto 15}${execp php ~/.conky/Main/pithos.php 'album'}
    ${else}
    
    
    
    
    ${endif}
    Quote Originally Posted by Mk32 View Post
    Initially I had the memory allocation % thingy but as you can see 10.04LTS has yet to even use 1GB of RAM and with 6GB installed I doubt it would need it. In fact I haven't seen the swap space volume increment by one byte yet.
    Lucky you. All my computers are old Pentium4s (or Celerons) donated to me from work (they were headed to the dumpster) that I had to clean, rebuild, and upgrade. I have 2 Gig RAM and tend to hover around 20% - 30%. My max swap gets used around 170K - 200K. Eventually (once I finish my degree), I'll build an ungodly powerful PC that will be a borderline Supercomputer, which will probably be out of date in a matter of months . Till then I'll live with my dumpster diving treasures with RAM and Swap on my Conky.

    Also, hasn't 10.04LTS reached its end of life yet? Assuming you are not running a Pentium III Xeon or something, don't let your 6 Gig of RAM go to waste. You (or somebody) paid for that RAM, might as well put it to use with the latest and greatest or at least the current 12.04LTS (which will probably still use no more than a Gig).

    Quote Originally Posted by Mk32 View Post
    I noticed the other day that the traffic downspeed and upspeed wasn't being calculated right.
    How did you check it? Is it too high, or too low? We need details man .

    Quote Originally Posted by Mk32 View Post
    Love those slant // things for your bar graphs.
    Yup so do I; of course you have to download the Conky source code, edit the fonts.c file, compile, and install to get them to work (well, work without eventually crashing anyways). If you are actually interested in doing that, the modified fonts.c file is given below.

    fonts.c
    Code:
    /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
     * vim: ts=4 sw=4 noet ai cindent syntax=c
     *
     * Conky, a system monitor, based on torsmo
     *
     * Any original torsmo code is licensed under the BSD license
     *
     * All code written since the fork of torsmo is licensed under the GPL
     *
     * Please see COPYING for details
     *
     * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
     * Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al.
     *    (see AUTHORS)
     * All rights reserved.
     *
     * This program is free software: you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation, either version 3 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     * You should have received a copy of the GNU General Public License
     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     *
     */
    #include "conky.h"
    #include "fonts.h"
    #include "logging.h"
    
    
    int selected_font = 0;
    int font_count = -1;
    struct font_list *fonts = NULL;
    char fontloaded = 0;
    
    
    
    
    void set_font(void)
    {
    #ifdef XFT
        if (use_xft) return;
    #endif /* XFT */
        if (font_count > -1 && fonts[selected_font].font) {
            XSetFont(display, window.gc, fonts[selected_font].font->fid);
        }
    }
    
    
    void setup_fonts(void)
    {
        if ((output_methods & TO_X) == 0) {
            return;
        }
    #ifdef XFT
        if (use_xft) {
            if (window.xftdraw) {
                XftDrawDestroy(window.xftdraw);
                window.xftdraw = 0;
            }
            window.xftdraw = XftDrawCreate(display, window.drawable,
                    window.visual, window.colourmap);
        }
    #endif /* XFT */
        set_font();
    }
    
    
    int add_font(const char *data_in)
    {
        if ((output_methods & TO_X) == 0) {
            return 0;
        }
    
    
    
    
    
    
    
    
      /* This code fixes a bug just for my Conky, stops font_count from reaching max and crashing */
        
        if (font_count > 200) {
            font_count--;
            }
            if (font_count < 200) {
            font_count++;
            }
    
    
      /*end of my changes*/
    
    
    
    
    
    
    
    
        if (font_count == 0) {
            if (fonts != NULL) {
                free(fonts);
            }
            if ((fonts = (struct font_list *) malloc(sizeof(struct font_list)))
                    == NULL) {
                CRIT_ERR(NULL, NULL, "malloc");
            }
            memset(fonts, 0, sizeof(struct font_list));
        }
        fonts = realloc(fonts, (sizeof(struct font_list) * (font_count + 1)));
        memset(&fonts[font_count], 0, sizeof(struct font_list));
        if (fonts == NULL) {
            CRIT_ERR(NULL, NULL, "realloc in add_font");
        }
        // must account for null terminator
        if (strlen(data_in) < DEFAULT_TEXT_BUFFER_SIZE) {
            strncpy(fonts[font_count].name, data_in, DEFAULT_TEXT_BUFFER_SIZE);
    #ifdef XFT
            fonts[font_count].font_alpha = 0xffff;
    #endif
        } else {
            CRIT_ERR(NULL, NULL, "Oops...looks like something overflowed in add_font().");
        }
        return font_count;
    }
    
    
    void set_first_font(const char *data_in)
    {
        if ((output_methods & TO_X) == 0) {
            return;
        }
        if (font_count < 0) {
            if ((fonts = (struct font_list *) malloc(sizeof(struct font_list)))
                    == NULL) {
                CRIT_ERR(NULL, NULL, "malloc");
            }
            memset(fonts, 0, sizeof(struct font_list));
            font_count++;
        }
        if (strlen(data_in) > 1) {
            strncpy(fonts[0].name, data_in, DEFAULT_TEXT_BUFFER_SIZE);
    #ifdef XFT
            fonts[0].font_alpha = 0xffff;
    #endif
        }
    }
    
    
    void free_fonts(void)
    {
        int i;
    
    
        if ((output_methods & TO_X) == 0) {
            return;
        }
        if(fontloaded == 0) {
            free(fonts);
            return;
        }
        for (i = 0; i <= font_count; i++) {
    #ifdef XFT
            if (use_xft) {
                /*
                 * Do we not need to close fonts with Xft? Unsure.  Not freeing the
                 * fonts seems to incur a slight memory leak, but it also prevents
                 * a crash.
                 *
                 * XftFontClose(display, fonts[i].xftfont);
                 */
                fonts[i].xftfont = 0;
            } else
    #endif /* XFT */
            {
                XFreeFont(display, fonts[i].font);
                fonts[i].font = 0;
            }
        }
        free(fonts);
        fonts = 0;
        font_count = -1;
        selected_font = 0;
    #ifdef XFT
        if (window.xftdraw) {
            XftDrawDestroy(window.xftdraw);
            window.xftdraw = 0;
        }
    #endif /* XFT */
    }
    
    
    void load_fonts(void)
    {
        int i;
    
    
        if ((output_methods & TO_X) == 0)
            return;
        for (i = 0; i <= font_count; i++) {
    #ifdef XFT
            /* load Xft font */
            if (use_xft && fonts[i].xftfont) {
                continue;
            } else if (use_xft) {
                fonts[i].xftfont = XftFontOpenName(display, screen,
                        fonts[i].name);
                if (fonts[i].xftfont) {
                    continue;
                }
    
    
                NORM_ERR("can't load Xft font '%s'", fonts[i].name);
                if ((fonts[i].xftfont = XftFontOpenName(display, screen,
                        "courier-12")) != NULL) {
                    continue;
                }
    
    
                NORM_ERR("can't load Xft font '%s'", "courier-12");
    
    
                if ((fonts[i].font = XLoadQueryFont(display, "fixed")) == NULL) {
                    CRIT_ERR(NULL, NULL, "can't load font '%s'", "fixed");
                }
                use_xft = 0;
    
    
                continue;
            }
    #endif
            /* load normal font */
            if (!fonts[i].font && (fonts[i].font = XLoadQueryFont(display, fonts[i].name)) == NULL) {
                NORM_ERR("can't load font '%s'", fonts[i].name);
                if ((fonts[i].font = XLoadQueryFont(display, "fixed")) == NULL) {
                    CRIT_ERR(NULL, NULL, "can't load font '%s'", "fixed");
                }
            }
        }
        fontloaded = 1;
    }
    Last edited by Petro Dawg; September 3rd, 2013 at 03:12 AM.
    Who's Awesome? You're Awesome.

  6. #22266
    Join Date
    Feb 2012
    Beans
    50
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    Re: The color battery bar: yes it works but it doesn't fill up like a regular bar. There's no progression: only the outline is filled. I'd give a screenshot but I need to box this thing up and get it out the door soon.

    Quote Originally Posted by Petro Dawg View Post
    Lucky you. All my computers are old Pentium4s (or Celerons) donated to me from work (they were headed to the dumpster) that I had to clean, rebuild, and upgrade. I have 2 Gig RAM and tend to hover around 20% - 30%. My max swap gets used around 170K - 200K. Eventually (once I finish my degree), I'll build an ungodly powerful PC that will be a borderline Supercomputer, which will probably be out of date in a matter of months . Till then I'll live with my dumpster diving treasures with RAM and Swap on my Conky.

    Also, hasn't 10.04LTS reached its end of life yet? Assuming you are not running a Pentium III Xeon or something, don't let your 6 Gig of RAM go to waste. You (or somebody) paid for that RAM, might as well put it to use with the latest and greatest or at least the current 12.04LTS (which will probably still use no more than a Gig).
    This laptop is a ThinkPad X200 that I've cobbled together for a hair over $200. Right in my ballpark. 7200RPM 250GB HDD, 6GB RAM, 2.26GHz C2D. Works fine, sounds like it might fit in your budget. It also has to go back because the ThinkLight isn't working. 6GB of RAM is more than I've ever had before, and 250GB is also more than I've had before in a computer (the Intel Mac mini which needs to be sold soon has 2GB RAM (max) and the stock original 60GB HDD).

    As for 10.04LTS, the desktop version is EOL but updates still come on down the pipe, even for this AMD64 version. I can't live without GNOME 2 and I don't want to deal with the fallback. It will get very interesting since I might save up for a ThinkPad X220 with a Intel 510 series mSATA SSD and internal standby 7200RPM 250GB HDD (but I'll keep this thing around to run XP and 10.04LTS along with Windows 7). I don't like or want Windows 8 either and Ubuntu seems to be getting worse. Moving on.

    Quote Originally Posted by Petro Dawg View Post
    How did you check it? Is it too high, or too low? We need details man .
    Low. Definitely inaccurate. I'll check back again when I get this thing back, using a online speed test.

    iMac G4 800MHz, Compaq E500, ThinkPad X200
    Likes: Ubuntu 9.10, 10.04LTS with 9.10 back-theme
    Classic Mac Networking v3.1 http://applefool.com/se30/
    "Linux assumes you know exactly what you are doing." -oboedad55, ubuntuforums.org

  7. #22267
    Join Date
    Mar 2011
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    I got a question for the experts!

    I want my script to display some drive infos only if they're plugged in. So far the relevant part is, for the /dev/sdc1 partition:

    Code:
    ${if_empty ${exec df | grep /dev/sdc1}}${else}${voffset -45}
    ${goto 30}${font Poky:pixelsize=52}H${font}
    ${voffset -40}${alignc}sdc1: ${fs_free /} / ${fs_size /}} 
    ${alignc}${color 83A1FF}${fs_bar  4,150 /}${color}
    ${goto 118}Read ${diskio_read sdc1}/s ${goto 260}Write ${diskio_write sdc1}/s
    ${goto 118}${diskiograph_read sdc1 25,107 cccccc ffffff -l} ${alignr}${diskiograph_write sdc1 25,107 cccccc ffffff -l}
    ${goto 40}${voffset -35}${exec mount | grep sdc1 | awk '{print $3}'}${endif}
    My problem, is that I can't give the correct mount point argument to fs_free, fs_size and fs_bar command as it's not know until the partition is mounted (I want it to work with any usb-sticks/sd-card). Though I can get the mount point of a drive using
    Code:
    ${exec mount | grep sdc1 | awk '{print $3}'}}
    I tried doing the following, but it seems the result of exec isn't passed as an arguemnt to fs_free (unlike the behaviour of if_empty).
    Code:
    ${fs_free ${exec mount | grep sdc1 | awk '{print $3}'}}
    If anyone knows how to fix my problem, it'd be greatly appreciated!

  8. #22268
    Join Date
    Jul 2012
    Location
    Oklahoma, USA
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by FamillyGuy View Post
    I got a question for the experts!

    I want my script to display some drive infos only if they're plugged in...
    Hopefully I understand what you are after...

    Typically I will use "df" to pull my used and available space on USB drives and other removable media. My code is something like this...

    Code:
    ${execp df -H | awk '/sdc1/ {print $3, "/", $2}'}
    You can look at the conkyrc code I posted a couple posts back for its full implementation. My code shows the name of the drive plugged in as well as the used and total space only when the drive is plugged in (which sounds like what you are after).

    UPDATE: I've posted the relevant block of code below for easier reference...
    Code:
    ############################################################################################
    #                                                                                          #
    #                               Storage Media Information                                  #
    #                                                                                          #
    ############################################################################################
    ###
    ##  Hard-drive information
    #
    ${voffset -3}${color8}${hr 1}${color}
    ${color8}${hr 1}${color}
    ${voffset -28}${color1}${alignc}STORAGE${color}
    ${voffset 7}${color0}Linux ${color}${alignr}${execp df -H | awk '/sda1/ {print $3, "/", $2}'}
    ${if_empty ${execp df -H | awk '/sdb1/ {print $3, "/", $2}'}}${color9}WinXP${alignr}Not Mounted${color}${else}${color0}WinXP${color}${alignr}${execp df -H | awk '/sdb1/ {print $3, "/", $2}'}${endif}
    ###
    ##  Displays DVD and USB drive info when plugged in  (3 ports)
    ##  Cut points and mount location may need to be adjusted depending on your system
    #
    ${if_empty ${execp df -H | grep 'sr0' | cut -c46-66}}${color9}DVD/CD${alignr}Empty${color}${else}${color0}${execp df -H | grep 'sr0' | cut -c46-66}${color}${alignr}${execp df -H | awk '/sr0/ {print $3, "/", $2}'}${endif}
    ${if_existing  /dev/sdc1}${color0}${execp df -H | grep 'sdc' | cut -c46-58}${color}${alignr}${execp df -H | awk '/sdc1/ {print $3, "/", $2}'}${else}${color9}USB Port 1${alignr}Empty${color}${endif}
    ${if_existing  /dev/sdd1}${color0}${execp df -H | grep 'sdd' | cut -c46-58}${color}${alignr}${execp df -H | awk '/sdd1/ {print $3, "/", $2}'}${else}${color9}USB Port 2${alignr}Empty${color}${endif}
    ${if_existing  /dev/sde1}${color0}${execp df -H | grep 'sde' | cut -c46-58}${color}${alignr}${execp df -H | awk '/sde1/ {print $3, "/", $2}'}${else}${if_existing  /media/18DC-5C04}${color0}Andriod${color}${alignr}${execp df -H | awk '/sdc/ {print $3, "/", $2}'}${else}${color9}USB Port 3${alignr}Empty${color}${endif}${endif}

    I have not been able to get a bar graph code working for this purpose to my liking as of yet.
    Last edited by Petro Dawg; September 9th, 2013 at 12:20 AM.
    Who's Awesome? You're Awesome.

  9. #22269
    Join Date
    Mar 2011
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    Thank you for the fast answer!

    I got it working as the fs_free and fs_size functions doing
    Code:
    ${exec df -H | awk '/sdd1/ {print $3, "/", $2}' | sed s/G/GiB/g}
    I'd still like to make it works with bar graph, as you mentionned.

  10. #22270
    Join Date
    Sep 2007
    Location
    house
    Beans
    79
    Distro
    Lubuntu Development Release

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    @ Mk32

    Looks good, a lot like the one I first started out with.

    Here's my most recent...

    Cool

    I like the slanted bars
    Geek by nature, Linux by choice

Page 2227 of 2300 FirstFirst ... 122717272127217722172225222622272228222922372277 ... 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
  •