Page 1339 of 2348 FirstFirst ... 3398391239128913291337133813391340134113491389143918392339 ... LastLast
Results 13,381 to 13,390 of 23480

Thread: Post your .conkyrc files w/ screenshots

  1. #13381
    Join Date
    Nov 2009
    Location
    Florida, USA
    Beans
    242
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    @ Martin

    Sometimes fonts have virtual space which wrap around them which creates a border around them that when directly typed don't utilize the full width of the conky measurements you allow. So when you call info within tags such as ${top name x}, it prints to your screen without that text virtual buffer. (most likely an aliasing thing). Anyways, this is fixed easily with an ${offset} tag, and in this case {$offset 10}.
    Also, instead of relying on mono fonts to correctly align things with spaces, ${Goto} tags are very useful. You'll have to play with the x-axis alignment to get your {goto} to align properly, but once established, anything left or right of it that moves doesn't push/pull it. Which allows you to use a variety of fonts.
    Code:
    TEXT
    ${font Andale Mono:bold:size=14}${alignc}${color} Martins Laptop
    ${font Arial:bold:size=8}${color} SYSTEM ${color 32B4CB}${hr 2}
    $color Time Wasted: ${color 32B4CB}${uptime}
    $color Updates Available: ${font Arial:bold:size=8}${color yellow}${execi 1200 aptitude search "~U" | wc -l | tail}
    ${offset 10}${color 32B4CB}${hr 2}
    $color Temp: ${color 32B4CB}${acpitemp}
    $color Processes: ${color 32B4CB}${processes}   $color Running: ${color 32B4CB}${running_processes}
    
    $color NAME             PID       CPU%      MEM%${color 32B4CB}
    ${offset 10}${top name 1} ${top pid 1}   ${top cpu 1}    ${top mem 1}
    ${offset 10}${top name 2} ${top pid 2}   ${top cpu 2}    ${top mem 2}
    ${offset 10}${top name 3} ${top pid 3}   ${top cpu 3}    ${top mem 3}
    ${offset 10}${top name 4} ${top pid 4}   ${top cpu 4}    ${top mem 4}
    ${offset 10}${top name 5} ${top pid 5}   ${top cpu 5}    ${top mem 5}
    ${font Arial:bold:size=8}$color DISK ${color 32B4CB}${hr 2}$color
    ${offset 10}${color 32B4CB}${fs_used /} / ${fs_size /}
    ${font Arial:bold:size=8}$color NETWORK: ${color 32B4CB}${hr 2}
    $color Internet Usage${color 32B4CB}${hr 2}
    ${font Arial:bold:size=8}$color Today:${color 32B4CB} ${execi 300 vnstat | grep "today" | awk '{print $2 $3}'}${goto 140}${color9}${execi 300 vnstat | grep "today" | awk '{print $5 $6}'}${goto 205}${color yellow}${execi 300 vnstat | grep "today" | awk '{print $8 $9}'}
    $color Week:  ${color 32B4CB}${execi 300 vnstat -w | grep "current week" | awk '{print $3 $4}'}${goto 140}${color9}${execi 300 vnstat -w | grep "current week" | awk '{print $6 $7}'}${goto 205}${color yellow}${execi 300 vnstat -w | grep "current week" | awk '{print $9 $10}'}
    $color Month: ${color 32B4CB}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $3 $4}'}${goto 140}${color9}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}${goto 205}${color yellow}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $9 $10}'}
    ${offset 10}${color 32B4CB}${hr 2}
    ${font Arial:bold:size=8}$color Outbound Connections${alignr}Port${font Arial:bold:size=7}${color 32B4CB}
    ${offset 10}${tcp_portmon 32768 61000 rhost 0}${alignr}${tcp_portmon 32768 61000 rservice 0}
    ${offset 10}${tcp_portmon 32768 61000 rhost 1}${alignr}${tcp_portmon 32768 61000 rservice 1}
    ${offset 10}${tcp_portmon 32768 61000 rhost 2}${alignr}${tcp_portmon 32768 61000 rservice 2}
    $color Down:${color 32B4CB} ${downspeed eth1}$color k/s $alignr$color Up:${color 32B4CB} ${upspeed eth1}$color k/s
    ${offset 10}Total Down ${color 32B4CB}${totaldown eth1}$color $alignr Total Up${color 32B4CB}${totalup eth1}
    Attached Images Attached Images
    Last edited by Mahngiel; August 12th, 2010 at 03:52 PM.
    Ubuntu User #29918 | Linux User #501271 |

  2. #13382
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by martinblunn View Post
    The problem with conky is that it's addictive. I already want to do something a bit more subtle and advanced.
    then you need to take a look at writing your own Lua scripts. It is absolutely possible, even if you have no previous programming skills (like me!).

    With Lua and cairo the possibilities for conky displays are enormous.

    Just start small (look at how other scripts work) learn what you need to know and build on your experience script to script


  3. #13383
    Join Date
    Nov 2009
    Location
    Florida, USA
    Beans
    242
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by martinblunn View Post
    I already want to do something a bit more subtle and advanced.
    Also, look into minimalism and image usage. Check on this sleek calendar:

    Code:
    TEXT
    ${voffset 5}${font URW Chancery L:size=25}${time %h}${font}${voffset 5}${execpi 1 ~/Conky/Blue2/scripts/calendar.sh}
    ${offset 80}${voffset -40}${font URW Chancery L}${time %A}${font}
    Code:
    #!/bin/bash
    # horizontal calendar for conky by ans
    # Updated by: mobilediesel, dk75, Bruce, Crinos512, et al.
    #     Adjusted by Mahngiel for larger today and Day name only
    # locale depend week day names
    lang=$1
    case ${lang:=$LANG} in
            en*  ) Sun="Su";   Mon="Mo";   Tue="Tu";   Wed="We";   Thu="Th";   Fri="Fr";   Sat="Sa" ;;
    esac
    
     
    COLOROLD="8996B3" #LightBlue
    COLORTODAY="FFFFFF" #Darkorange
    COLORREST="8996B3" #MidSlateGrey
    COLORNEXT="778899" #LightSlateGrey
     
    TODAY=$(date +%d)
    LASTDAY=$(date -d "-$TODAY days +1 month" +%d)
    FIRSTDAY=$(date -d "-$[${TODAY/#0/}-1] days" +%u)
    TODAYC="\${color $COLORTODAY}\${font Secret Code:size=18} $TODAY\${font}\${color}"
     
    # Build $TOPLINE
    j=31
    k=$FIRSTDAY
    while [ $j -gt 0 ]; do
      case "$k" in
        1) TOPLINE="$TOPLINE $Mon";;
        2) TOPLINE="$TOPLINE $Tue";;
        3) TOPLINE="$TOPLINE $Wed";;
        4) TOPLINE="$TOPLINE $Thu";;
        5) TOPLINE="$TOPLINE $Fri";;
        6) TOPLINE="$TOPLINE \${color FF8C00}$Sat\${color}";;
        7) TOPLINE="$TOPLINE \${color FFFF00}$Sun\${color}"
           k=0
           ;;
      esac
      j=$[$j-1]
      k=$[$k+1]
    done
     
    # Build $OVER
    i=1
    OVER="\${color $COLOROLD}"
    while [ $i -lt $TODAY ]; do
      case $i in
        [1-9])   OVER="$OVER 0$i" ;;
        *)       OVER="$OVER $i"  ;;
      esac
      i=$[$i+1]
    done
    OVER="$OVER\${color}"
     
    # skip i where value of i=$TODAY
    i=$[$i+1] 
     
    # Build $REST
    REST="\${color $COLORREST}"
    while [ $i -le $LASTDAY ]; do
      case $i in
        [1-9])   REST="$REST 0$i" ;;
        *)       REST="$REST $i"  ;;
      esac
      i=$[$i+1]
    done
    REST="$REST\${color}"
     
    # Build $NEXTMONTH
    i=$LASTDAY
    j=1
    NEXTMONTH=""
    if [ $i -ne 31 ] ; then
      NEXTMONTH="\${color $COLORNEXT}"
      while [ $i -lt 31 ] ; do
         NEXTMONTH="$NEXTMONTH 0$j"
         i=$[$i+1]
         j=$[$j+1]
      done
      NEXTMONTH="$NEXTMONTH\${color}"
    fi
     
    #echo "$TOPLINE\${tab 20}"
    #echo "\${offset 40}\${offset 30}\${color $COLORTODAY}\${time %A}\${font}\${color}"
    echo "$OVER$TODAYC\${voffset -5}$REST$NEXTMONTH\${tab 20}"
    Attached Images Attached Images
    Last edited by Mahngiel; August 12th, 2010 at 04:48 PM. Reason: added 2nd screenie w/ image
    Ubuntu User #29918 | Linux User #501271 |

  4. #13384
    Join Date
    Jul 2010
    Location
    Poole, Dorset, England
    Beans
    8
    Distro
    Kubuntu

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Mahngiel View Post
    @ Martin

    Sometimes fonts have virtual space which wrap around them which creates a border around them that when directly typed don't utilize the full width of the conky measurements you allow. So when you call info within tags such as ${top name x}, it prints to your screen without that text virtual buffer. (most likely an aliasing thing). Anyways, this is fixed easily with an ${offset} tag, and in this case {$offset 10}.
    Also, instead of relying on mono fonts to correctly align things with spaces, ${Goto} tags are very useful. You'll have to play with the x-axis alignment to get your {goto} to align properly, but once established, anything left or right of it that moves doesn't push/pull it. Which allows you to use a variety of fonts.
    Code:
    TEXT
    ${font Andale Mono:bold:size=14}${alignc}${color} Martins Laptop
    ${font Arial:bold:size=8}${color} SYSTEM ${color 32B4CB}${hr 2}
    $color Time Wasted: ${color 32B4CB}${uptime}
    $color Updates Available: ${font Arial:bold:size=8}${color yellow}${execi 1200 aptitude search "~U" | wc -l | tail}
    ${offset 10}${color 32B4CB}${hr 2}
    $color Temp: ${color 32B4CB}${acpitemp}
    $color Processes: ${color 32B4CB}${processes}   $color Running: ${color 32B4CB}${running_processes}
    
    $color NAME             PID       CPU%      MEM%${color 32B4CB}
    ${offset 10}${top name 1} ${top pid 1}   ${top cpu 1}    ${top mem 1}
    ${offset 10}${top name 2} ${top pid 2}   ${top cpu 2}    ${top mem 2}
    ${offset 10}${top name 3} ${top pid 3}   ${top cpu 3}    ${top mem 3}
    ${offset 10}${top name 4} ${top pid 4}   ${top cpu 4}    ${top mem 4}
    ${offset 10}${top name 5} ${top pid 5}   ${top cpu 5}    ${top mem 5}
    ${font Arial:bold:size=8}$color DISK ${color 32B4CB}${hr 2}$color
    ${offset 10}${color 32B4CB}${fs_used /} / ${fs_size /}
    ${font Arial:bold:size=8}$color NETWORK: ${color 32B4CB}${hr 2}
    $color Internet Usage${color 32B4CB}${hr 2}
    ${font Arial:bold:size=8}$color Today:${color 32B4CB} ${execi 300 vnstat | grep "today" | awk '{print $2 $3}'}${goto 140}${color9}${execi 300 vnstat | grep "today" | awk '{print $5 $6}'}${goto 205}${color yellow}${execi 300 vnstat | grep "today" | awk '{print $8 $9}'}
    $color Week:  ${color 32B4CB}${execi 300 vnstat -w | grep "current week" | awk '{print $3 $4}'}${goto 140}${color9}${execi 300 vnstat -w | grep "current week" | awk '{print $6 $7}'}${goto 205}${color yellow}${execi 300 vnstat -w | grep "current week" | awk '{print $9 $10}'}
    $color Month: ${color 32B4CB}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $3 $4}'}${goto 140}${color9}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}${goto 205}${color yellow}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $9 $10}'}
    ${offset 10}${color 32B4CB}${hr 2}
    ${font Arial:bold:size=8}$color Outbound Connections${alignr}Port${font Arial:bold:size=7}${color 32B4CB}
    ${offset 10}${tcp_portmon 32768 61000 rhost 0}${alignr}${tcp_portmon 32768 61000 rservice 0}
    ${offset 10}${tcp_portmon 32768 61000 rhost 1}${alignr}${tcp_portmon 32768 61000 rservice 1}
    ${offset 10}${tcp_portmon 32768 61000 rhost 2}${alignr}${tcp_portmon 32768 61000 rservice 2}
    $color Down:${color 32B4CB} ${downspeed eth1}$color k/s $alignr$color Up:${color 32B4CB} ${upspeed eth1}$color k/s
    ${offset 10}Total Down ${color 32B4CB}${totaldown eth1}$color $alignr Total Up${color 32B4CB}${totalup eth1}
    Thanks for the amazingly quick advice.

    I've implemented it already and its looking much nicer!


    Cheers!

  5. #13385
    Join Date
    Jul 2010
    Location
    Poole, Dorset, England
    Beans
    8
    Distro
    Kubuntu

    Coding

    OK. I obviously need to learn to write scripts/code!

    Thanks guys, will be back in a decade or two when I've got the hang of it

    Is there a thread for coding that I should look at?

  6. #13386
    Join Date
    Nov 2009
    Location
    Florida, USA
    Beans
    242
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    Your welcome. But I can see you already have spacing problems due to a large PID such as 'ubuntuone-synced'. Notice how it pushes the rest of the numbers? I would do something like this instead:

    NAME${Goto 80}PID${Goto 140}CPU%${alignr}MEM%
    ${offset 10}${top name 1}${goto 80}${top pid 1}${goto 140}${top cpu 1}${alignr}${top mem 1}
    Attached Images Attached Images
    Last edited by Mahngiel; August 12th, 2010 at 05:10 PM. Reason: formatting
    Ubuntu User #29918 | Linux User #501271 |

  7. #13387
    Join Date
    Nov 2009
    Location
    Florida, USA
    Beans
    242
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Coding

    Quote Originally Posted by martinblunn View Post
    OK. I obviously need to learn to write scripts/code!

    Thanks guys, will be back in a decade or two when I've got the hang of it

    Is there a thread for coding that I should look at?
    Best place to start looking is at other people's scripts. If you can visualize what is being written in the code, you can start to pick it apart. Try to emulate the script in bash or (gedit if it's complex) and see if you can replicate it.

    Sources? Among others, here's a post I started at the conky forums hosted by linux-hardcore (thanks, Rich!)
    Mahn's scripts
    Conky Blog (scroll down to near the bottom, the page is under construction (hurry up merlin))
    Bash Scripting Guide
    Also references and manuals on piping (awk, sed, grep, etc) and see if the Linux Shell Handbook is still available on a newsstand or borders near you.
    Ubuntu User #29918 | Linux User #501271 |

  8. #13388
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    ive tried to help out prospective lua coders on my blog:

    http://thepeachyblog.blogspot.com/p/...home-page.html

    written from the point of view of someone with no scripting experience

  9. #13389
    Join Date
    Jul 2010
    Location
    Poole, Dorset, England
    Beans
    8
    Distro
    Kubuntu

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Mahngiel View Post
    Your welcome. But I can see you already have spacing problems due to a large PID such as 'ubuntuone-synced'. Notice how it pushes the rest of the numbers? I would do something like this instead:

    NAME${Goto 80}PID${Goto 140}CPU%${alignr}MEM%
    ${offset 10}${top name 1}${goto 80}${top pid 1}${goto 140}${top cpu 1}${alignr}${top mem 1}
    Thanks m8!

    This did the trick:-
    Code:
    ${offset 7}${voffset -10}$color NAME${Goto 85}PID${Goto 165}CPU%${alignr}MEM%${color 32B4CB}
    ${offset 10}${top name 1}${goto 80}${top pid 1}${goto 160}${top cpu 1}${alignr}${top mem 1}
    ${offset 10}${top name 2}${goto 80}${top pid 2}${goto 160}${top cpu 2}${alignr}${top mem 2}
    ${offset 10}${top name 3}${goto 80}${top pid 3}${goto 160}${top cpu 3}${alignr}${top mem 3}
    ${offset 10}${top name 1}${goto 80}${top pid 4}${goto 160}${top cpu 4}${alignr}${top mem 4}
    ${offset 10}${top name 4}${goto 80}${top pid 5}${goto 160}${top cpu 5}${alignr}${top mem 5}



  10. #13390
    Join Date
    Nov 2009
    Location
    Florida, USA
    Beans
    242
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    @ mrpeachy
    I never got into lua drawing, I'd prefer to use graphics, but I understand most people like me use KDE instead (i find it garbage). But since you seem to be at minimum a talent, I've got a challege for you. My current theme i'm working on is in favor of the upcoming football season, and will center around fantasy players. I'm curious what you can do in regards to drawing me a realistic-ish football. Use whatever you'd like for monitoring.

    Perhaps you could persuade me into using lua more. =P
    Last edited by Mahngiel; August 12th, 2010 at 06:00 PM.
    Ubuntu User #29918 | Linux User #501271 |

Page 1339 of 2348 FirstFirst ... 3398391239128913291337133813391340134113491389143918392339 ... 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
  •