Conky & .conkyrc - Examples & Screenshots
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 16 1 2 3 11 ... LastLast
Results 1 to 15 of 232
  1. #1
    Join Date
    Jan 2008
    Location
    Witham, Essex, UK
    Age
    32
    Posts
    341
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Conky & .conkyrc - Examples & Screenshots

    I've only just found out about this brilliant little system monitor tool called Conky - and I'm amazed at how configurable and expandable it is. I'm also amazed that there isn't a topic already on Fedora user's .conkyrc files - and yes, I have searched . So, here is my config file:

    Code:
    # .conkyrc - Edited from various examples across the 'net
    # Used by Craig Watson [ www.cwatson.org ] on Fedora 8
    
    # --- Window Layout & Options --- #
    own_window yes
    own_window_colour brown
    own_window_transparent yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    use_spacer right
    use_xft yes
    alignment bottom_left
    gap_x 10
    gap_y 40
    
    # --- Colours, Sizes, Fonts & Margins --- #
    update_interval 2.0
    maximum_width 250
    stippled_borders 3
    border_margin 9
    border_width 10
    default_color grey
    
    # --- Text --- #
    draw_outline no
    draw_borders no
    font Monospace:size=8:weight=bold
    uppercase no
    draw_shades yes
    
    TEXT
    ${color orange}SYSTEM INFORMATION ${hr 2}$color
    ${color white}${time %A},${time %e} ${time %B} ${time %G}${alignr}${time %H:%M:%S}
    ${color white}Machine$color $nodename ${alignr}${color white}Uptime$color $uptime
    ${color white}Kernel$color  $kernel ${alignr}${color white}Arch$color $machine
    
    ${color orange}CPU ${hr 2}$color
    ${font Arial:bold:size=8}${color #ff9999}${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -d" " -f2- | sed 's#Processor ##'}$font$color
    ${color white}Freq:$color ${execi 20 sensors |grep "Core0 Temp" | cut -d" " -f4}$font$color$alignr${freq_g 2}GHz ${color #c0ff3e}${execi 20 sensors |grep "Core1 Temp" | cut -d" " -f4}  $color${alignr}${color white}Processes:$color $running_processes/ $processes
    ${cpugraph cpu1 25,120 000000 ff6600 } ${cpugraph cpu2 25,120 000000 cc0033}
    ${color #ff6600}${cpubar cpu1 3,120} ${color #cc0033}${cpubar cpu2 3,120}$color
    
    ${color orange}TOP 5 PROCESSES ${hr 2}$color
    ${color #ff9999}NAME               PID      CPU      MEM
    ${color #ffff99}1. ${top name 1}${top pid 1}   ${top cpu 1}   ${top mem 1}$color
    2. ${top name 2}${top pid 2}   ${top cpu 2}   ${top mem 2}
    3. ${top name 3}${top pid 3}   ${top cpu 3}   ${top mem 3}
    4. ${top name 4}${top pid 4}   ${top cpu 4}   ${top mem 4}
    5. ${top name 5}${top pid 5}   ${top cpu 5}   ${top mem 5}
    
    ${color orange}MEMORY & SWAP ${hr 2}$color
    ${color white}RAM$color   $memperc%   ${membar 6}$color
    ${color white}Swap$color  $swapperc%   ${swapbar 6}$color
    
    ${color orange}DRIVES - FREE SPACE ${hr 2}$color
    ${color white}Fedora$color  ${fs_free_perc /}%$alignr${fs_free /}/ ${fs_size /}
    ${fs_bar 3 /}$color 
    ${color white}Data$color    ${fs_free_perc /mnt/data}%$alignr${fs_free /mnt/data}/ ${fs_size /mnt/data}
    ${fs_bar 3 /mnt/data}$color 
    ${color white}XP$color      ${fs_free_perc /mnt/xp}%$alignr${fs_free /mnt/xp}/ ${fs_size /mnt/xp}
    ${fs_bar 3 /mnt/xp}$color 
    ${color white}Vista$color   ${fs_free_perc /mnt/vista}%$alignr${fs_free /mnt/vista}/ ${fs_size /mnt/vista}
    ${fs_bar 3 /mnt/vista}$color 
    
    ${color orange}ETHERNET (${addr eth0}) ${hr 2}$color
    ${color white}Down:$color  ${downspeed eth0} KB/s${alignr}${color white}Up:$color ${upspeed eth0} KB/s
    ${downspeedgraph eth0 25,120 000000 00ff00} ${alignr}${upspeedgraph eth0 25,120 000000 ff0000}$color
    Screenshots are attached below .

    Installing & Configuring Conky

    To get conky up and running, just type into a terminal:
    Code:
    sudo yum install conky
    Then create your .conkyrc file and paste in the contents (you can either use mine as a starting point or some of these:
    Code:
    gedit ~/.conkyrc
    After that, you need to create a script to load Conky after any running window managers (e.g. Compiz) so that it integrates nicely:
    Code:
    nano ~/.conkyscript.sh
    Either copy/paste or type this:
    Code:
    #!/bin/bash
    sleep 10 && conky;
    Then make it executable and add it to your GNOME session:
    Code:
    chmod a+x ~/.conkyscript.sh
    System --> Preferences --> Personal --> Sessions --> Add
    Name: Conky
    Command: ~/.conkyscript.sh
    (you may need to put the full path to the script - e.g. /home/user/.conkyscript.sh)

    Have fun and post back your screenshots and config files!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	conky-closeup.jpg 
Views:	8678 
Size:	58.6 KB 
ID:	15869   Click image for larger version. 

Name:	conky-fullscreen.jpg 
Views:	5178 
Size:	227.9 KB 
ID:	15870  
    Last edited by CraigWatson; 10th May 2008 at 07:06 PM.
    Personal Website | Windows to Linux - Tips from Experience

    Desktop - Galileo
    Dual-Boot: Fedora 13 x64, Windows 7 x64
    Intel Core2Quad Q6600 @3.6GHz, 8GB PC2-8500 DDR2, ATI HD4870, 23" @ 1920x1080 + 20" @ 1600x900 (both DVI-D), 2TB ICH10R RAID0 array, Custom Watercooling

    Laptop - MacBook 5.1 ('08 Aluminium)
    Dual-Boot: Fedora 13 x64, Apple OS X
    Intel Core2Duo, 2GB 1066MHz DDR3, nVidia 9400M, 13" LCD @ 1280x800, 160GB SATA

  2. #2
    laduch Guest


    Thanks for tutorial! Nice stuff!

    Some color alternatives can refer to this site: http://html-color-codes.com/

  3. #3
    Join Date
    Apr 2005
    Location
    earth
    Posts
    1,361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Craig,
    Thanks for putting this up. A lot of the gurus around here use conky.
    I tried it but when it came up it was not to pretty and I couldn't figure out how to get it working for me.

    Thanks Again,
    Pat Jr
    x--x--x
    http://www.gnu.org/philosophy/free-sw.html
    Freedom is never Free.
    Pat Jr.

  4. #4
    Join Date
    Oct 2005
    Location
    Puerto Rico
    Posts
    602
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the info Craig. As a linux (mostly Fedora) user for years, I always tried to get a system information program I liked enough (gkrellm, gdesklets, screenlets), but Conky fits the bill for me better than the others. It's transparent, informative yet elegant and light. So thanks once again.

  5. #5
    Join Date
    Jan 2008
    Location
    Witham, Essex, UK
    Age
    32
    Posts
    341
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    laduch and Francisco_PR: No problem, glad I could help My own .conkyrc took quite a bit of playing with to get looking decent, so I can only take some of the credit - a lot of it goes to the other makers of the .conkyrc files that I yoinked and used.

    PatMcLJr: It would help if you could post a screenshot of what Conky looks like under your configuration. If it launches in a standard window and is pretty basic with a black background and grey text, then you probably haven't created the .conkyrc file.

    You can use Gedit or any other text editor of your choice, just create a file called .conkyrc within your home directory and paste whatever you want inside it. You can use my file above as a starting point, or you can take some of the other examples I've linked to .
    Personal Website | Windows to Linux - Tips from Experience

    Desktop - Galileo
    Dual-Boot: Fedora 13 x64, Windows 7 x64
    Intel Core2Quad Q6600 @3.6GHz, 8GB PC2-8500 DDR2, ATI HD4870, 23" @ 1920x1080 + 20" @ 1600x900 (both DVI-D), 2TB ICH10R RAID0 array, Custom Watercooling

    Laptop - MacBook 5.1 ('08 Aluminium)
    Dual-Boot: Fedora 13 x64, Apple OS X
    Intel Core2Duo, 2GB 1066MHz DDR3, nVidia 9400M, 13" LCD @ 1280x800, 160GB SATA

  6. #6
    LocutusOfBorg Guest
    Something that bugs me is that I can't get pop3_unseen to work...
    Any hint, Craig?

  7. #7
    Join Date
    Oct 2005
    Location
    Puerto Rico
    Posts
    602
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    nVidia GeForce 8500 GT?

    I have spent a couple of hours looking for other conky configurations and screenshots (it's Sunday after all ) and found that I prefer Craig's configuration. What I have not been able to find are hints as to how to include my nVidia card in conky's display. So if anybody knows and wish to share the knowledge I will appreaciate it . It doesn't need to be anything fancy, although having the nVidia logo would be nice .

  8. #8
    Join Date
    Jan 2008
    Location
    Witham, Essex, UK
    Age
    32
    Posts
    341
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can run standard terminal commands through Conky (an example being the CPU information in my setup) so I'm assuming if you can find a command that gives you your graphics card (a combination of lspci and some search pipes like grep, awk or sed may help).

    Also, the Ubuntu forums' Conky thread has some pretty decent setups: http://ubuntuforums.org/showthread.php?t=281865
    Last edited by CraigWatson; 8th June 2008 at 10:27 PM.
    Personal Website | Windows to Linux - Tips from Experience

    Desktop - Galileo
    Dual-Boot: Fedora 13 x64, Windows 7 x64
    Intel Core2Quad Q6600 @3.6GHz, 8GB PC2-8500 DDR2, ATI HD4870, 23" @ 1920x1080 + 20" @ 1600x900 (both DVI-D), 2TB ICH10R RAID0 array, Custom Watercooling

    Laptop - MacBook 5.1 ('08 Aluminium)
    Dual-Boot: Fedora 13 x64, Apple OS X
    Intel Core2Duo, 2GB 1066MHz DDR3, nVidia 9400M, 13" LCD @ 1280x800, 160GB SATA

  9. #9
    Join Date
    Oct 2005
    Location
    Puerto Rico
    Posts
    602
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perfect, I will take a look. Thanks again Craig.

  10. #10
    Join Date
    Mar 2008
    Location
    Nottingham, UK
    Age
    25
    Posts
    271
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Belated thanks Craig, but I ripped off your settings to get where I am today....
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Screenshot1.jpg 
Views:	3689 
Size:	110.0 KB 
ID:	16334  

  11. #11
    Join Date
    Feb 2008
    Location
    Sydney Australia
    Age
    64
    Posts
    2,617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Francisco_PR
    I have spent a couple of hours looking for other conky configurations and screenshots (it's Sunday after all ) and found that I prefer Craig's configuration. What I have not been able to find are hints as to how to include my nVidia card in conky's display. So if anybody knows and wish to share the knowledge I will appreaciate it . It doesn't need to be anything fancy, although having the nVidia logo would be nice .
    I found this which displays the temp of my nividia card. It may help you find other options, please share if you do.

    Code:
    ${color orange}GPU Tempature $color ${execi 30 nvidia-settings -q gpucoretemp | grep '):' | awk '{print $4}' | cut -c -2}degC
    sorry no logo

  12. #12
    Join Date
    Feb 2008
    Location
    Rio de Janeiro, Brazil
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, Conky rocks! You can display just about anything with it. I run two Conkys at the same time, one showing the system and one with rss feeds.

    This is my conkyrc-sys for the system:

    Code:
    # set to yes if you want Conky to be forked in the background
    background no
    
    # X font when Xft is disabled, you can pick one with program xfontsel
    #font 5x7
    #font 6x10
    #font 7x13
    #font 8x13
    #font 9x15
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
    
    # Use Xft?
    use_xft yes
    
    # Xft font when Xft is enabled
    xftfont Terminus:size=8
    #xftfont Monospace:size=8
    #xftfont DejaVu Sans Mono:pixelsize=10
    
    # Text alpha when using Xft
    xftalpha 1
    
    # Print everything to stdout?
    out_to_console no
    
    # MPD host/port
    # mpd_host localhost
    # mpd_port 6600
    # mpd_password vista_killer
    
    # Print everything to console?
    out_to_console no
    
    # mail spool
    #mail_spool $MAIL
    
    # Update interval in seconds
    update_interval 3.0
    
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    
    # If own_window is yes, you may use type normal, desktop or override
    own_window_type override
    
    # Use pseudo transparency with own_window?
    own_window_transparent yes
    
    # If own_window_transparent is set to no, you can set the background colour here
    own_window_colour white
    
    # If own_window is yes, these window manager hints may be used
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # Minimum size of text area
    minimum_size 280 5
    #maximum_width 348
    maximum_width 260
    
    # Max buffers for conky!
    # Default - max_specials 512
    # Default - max_user_text 16384 #bytes
    # Default - text_buffer_size 1280 #bytes
    max_specials 1024
    max_user_text 65536
    text_buffer_size 10240
    
    # Draw shades?
    draw_shades no
    
    # Draw outlines?
    draw_outline no
    
    # Draw borders around text
    draw_borders no
    
    # Draw borders around graphs
    draw_graph_borders yes
    
    # Stippled borders?
    stippled_borders 10
    
    # border margins
    border_margin 4
    
    # border width
    border_width 1
    
    # Default colors and also border colors
    default_color white
    default_shade_color white
    default_outline_color white
    color0 white           #frame
    color1 lightgrey        #descr
    color2 blue            #value
    color3 green            #good info
    color4 yellow            #imp info
    color5 lightblue        #minor info
    color6 aquamarine3      #221 170 00    #proc
    color7 red
    
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    #alignment none
    
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 8
    gap_y 30
    
    # Subtract file system buffers from used memory?
    no_buffers yes
    
    # set to yes if you want all text to be in uppercase
    uppercase no
    
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes
    
    
    # Add spaces to keep things from moving about?  This only affects certain objects.
    use_spacer none
    
    
    #   mldonkey_hostname     Hostname for mldonkey stuff, defaults to localhost
    #   mldonkey_port         Mldonkey port, 4001 default
    #   mldonkey_login        Mldonkey login, default none
    #   mldonkey_password     Mldonkey password, default none
    
    # boinc (seti) dir
    # seti_dir /dir
    
    # Allow for the creation of at least this number of port monitors (if 0 or not set, default is 16) 
    #min_port_monitors 16
    
    # Allow each port monitor to track at least this many connections (if 0 or not set, default is 256)
    #min_port_monitor_connections 256
    
    # none, xmms, bmp, audacious, infopipe (default is none)
    #xmms_player none
    
    
    
    # stuff after 'TEXT' will be formatted on screen
    TEXT
    ${font arial:bold:size=15}${time %A %d %B} ${alignr}${time %H:%M}
    ${font arial:bold:size=12}$sysname $kernel  ${font arial:bold:size=12}${alignr}$nodename
    ${font}Uptime: $uptime${font Monospace:bold:size=8}${alignr}${color2}${if_existing /var/lock/subsys/iptables }${color3}Firewall On${color0}$else${alignr}${color7}Firewall off${color0}$endif
    ${font arial:bold:size=9}CPU ${font arial:bold:size=8}${alignr}${acpitemp}C (${hwmon temp 1}C, ${hwmon temp 3}C)
    ${font}Core 0: ${freq_g cpu1} GHz ${alignr}${cpu cpu1}% ${cpubar cpu1 5,125}
    Core 1: ${freq_g cpu2} GHz ${alignr}${cpu cpu2}% ${cpubar cpu2 5,125}
    ${alignr}${cpugraph 20,125 ffffff FF05C9}
    ${font arial:bold:size=9}Memory
    ${font}RAM: $mem ${alignr}$memperc% ${membar 5,125}
    Swap: $swap ${alignr}$swapperc% ${swapbar 5,125}
    ${font arial:bold:size=9}Storage
    ${font}    /: ${fs_used /} ${alignr}${fs_used_perc /}% ${fs_bar 5,125 /}
    /Data: ${fs_used /mnt/Data} ${alignr}${fs_used_perc /mnt/Data}% ${fs_bar 5,125 /mnt/Data}
    ${font}Write: ${diskio_write }${alignr}Read: ${diskio_read}
    ${diskiograph_write 20,125 ffffff FF0000}${alignr}${diskiograph_read 20,125 ffffff FFF000}
    ${font arial:bold:size=9}Internet
    ${font}Download: ${totaldown eth0} ${alignr}Upload: ${totalup eth0}
    ${font}Speed: ${downspeedf eth0}k/s ${alignr}Speed: ${upspeedf eth0}k/s
    ${downspeedgraph eth0 20,125 ffffff 30FF00} ${alignr}${upspeedgraph eth0 20,125 ffffff 0000FF}
    ${font arial:bold:size=9}Processes  ${font arial:bold:size=8}${alignr}total: $processes running: $running_processes
    ${font}------------ Top CPU Consumers ${alignr}------------
    ${font}Name             ${alignr}PID    CPU%   MEM%
    ${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1}
    ${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2}
    ${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}
    ${font}------------ Top Mem Consumers ${alignr}------------
    ${font}${top_mem name 1} ${alignr}${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
    ${top_mem name 2} ${alignr}${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
    ${top_mem name 3} ${alignr}${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
    ${font arial:bold:size=9}Videocard ${font arial:bold:size=8}${alignr}${execi 30 nvidia-settings -q [gpu:0]/GPUCoreTemp | grep '):' | awk '{print $4}' | sed 's/\.//'}C
    ${font arial:bold:size=9}Harddisk ${font arial:bold:size=8}${alignr}${hddtemp /dev/sda}
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	system.png 
Views:	4355 
Size:	77.8 KB 
ID:	16897  
    Asus P8Z68-V, Intel Core i7, 8GB RAM, 120 GB SSD, 1TB + 2TB HDD, Fedora Workstation 25
    Thinkpad X240, 8GB RAM, 1TB SSD, Fedora Workstation 25

  13. #13
    Join Date
    Feb 2008
    Location
    Rio de Janeiro, Brazil
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And this is my conkyrc-rss for the RSS:

    Code:
    # set to yes if you want Conky to be forked in the background
    background no
    
    # X font when Xft is disabled, you can pick one with program xfontsel
    #font 5x7
    #font 6x10
    #font 7x13
    #font 8x13
    #font 9x15
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
    
    # Use Xft?
    use_xft yes
    
    # Xft font when Xft is enabled
    #xftfont Terminus:size=8
    xftfont Monospace:size=8
    #xftfont DejaVu Sans Mono:pixelsize=10
    
    # Text alpha when using Xft
    xftalpha 1
    
    # Print everything to stdout?
    out_to_console no
    
    # MPD host/port
    # mpd_host localhost
    # mpd_port 6600
    # mpd_password vista_killer
    
    # Print everything to console?
    out_to_console no
    
    # mail spool
    #mail_spool $MAIL
    
    # Update interval in seconds
    update_interval 3.0
    
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    
    # If own_window is yes, you may use type normal, desktop or override
    own_window_type override
    
    # Use pseudo transparency with own_window?
    own_window_transparent yes
    
    # If own_window_transparent is set to no, you can set the background colour here
    own_window_colour white
    
    # If own_window is yes, these window manager hints may be used
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # Minimum size of text area
    minimum_size 280 5
    #maximum_width 348
    maximum_width 260
    
    # Max buffers for conky!
    # Default - max_specials 512
    # Default - max_user_text 16384 #bytes
    # Default - text_buffer_size 1280 #bytes
    max_specials 1024
    max_user_text 65536
    text_buffer_size 10240
    
    # Draw shades?
    draw_shades no
    
    # Draw outlines?
    draw_outline no
    
    # Draw borders around text
    draw_borders no
    
    # Draw borders around graphs
    draw_graph_borders yes
    
    # Stippled borders?
    stippled_borders 10
    
    # border margins
    border_margin 4
    
    # border width
    border_width 1
    
    # Default colors and also border colors
    default_color white
    default_shade_color white
    default_outline_color white
    
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    #alignment none
    
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 280
    gap_y 30
    
    # Subtract file system buffers from used memory?
    no_buffers yes
    
    # set to yes if you want all text to be in uppercase
    uppercase no
    
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes
    
    
    # Add spaces to keep things from moving about?  This only affects certain objects.
    use_spacer none
    
    
    #   mldonkey_hostname     Hostname for mldonkey stuff, defaults to localhost
    #   mldonkey_port         Mldonkey port, 4001 default
    #   mldonkey_login        Mldonkey login, default none
    #   mldonkey_password     Mldonkey password, default none
    
    # boinc (seti) dir
    # seti_dir /dir
    
    # Allow for the creation of at least this number of port monitors (if 0 or not set, default is 16) 
    #min_port_monitors 16
    
    # Allow each port monitor to track at least this many connections (if 0 or not set, default is 256)
    #min_port_monitor_connections 256
    
    # none, xmms, bmp, audacious, infopipe (default is none)
    #xmms_player none
    
    
    # stuff after 'TEXT' will be formatted on screen  
    TEXT
    ${font arial:bold:size=15}RSS Feeds
    ${font arial:bold:size=9}Weather
    ${font arial:bold:size=7}${execi 600 /home/peter/.conky/rss-weather.sh}
    ${font arial:bold:size=9}BBC News
    ${font arial:bold:size=7}${execi 600 /home/peter/.conky/rss-bbc.sh}
    ${font arial:bold:size=9}G1 Rio de Janeiro News
    ${font arial:bold:size=7}${execi 600 /home/peter/.conky/rss-g1rio.sh}
    ${font arial:bold:size=9}Autosport F1
    ${font arial:bold:size=7}${execi 600 /home/peter/.conky/rss-autosport.sh}
    ${font arial:bold:size=9}Arch Packages
    ${font arial:bold:size=7}${execi 600 /home/peter/.conky/rss-archpacks.sh}
    The weather script that goes with it:
    Code:
    #!/bin/bash
    # Modified for Yahoo weather by Peter Thorstenson
    # Based on a script written by Peter Garceau
    # Originally based on the RDF Feed Display Script by Hellf[i]re v0.1
    # 
    # This script is designed for the Yahoo Weather XML RSS.
    # Just substitute "BRXX0201" with the code for your location
    # 
    # This script depends on curl.
    # pacman -Sy curl
    #
    # Usage:
    # .conkyrc:    ${execi [time] /path/to/script/rss-weather.sh}
    
    
    #RSS Setup
    #the URI to the xml page 
    URI=http://xml.weather.yahoo.com/forecastrss?p=BRXX0201\&u=c
    
    #number of lines to display
    LINES=5 
    
    #Path to curl
    EXEC="/usr/bin/curl -s"                
    
    #Work Start
    $EXEC $URI | sed -n -e '/<!\[CDATA\[/,/\]\]>/p' |  #print text between "<![CDATA[" and "]]>"
    sed -e 's/<!\[CDATA\[//g' |                        #remove "<![CDATA[" to leave only clean html tags
    sed -e 's/\]\]>//g' |                              #remove "]]>" for the same reason
    sed -e 's/<[^>]*>//g' |                            #remove all html tags
    head -n $(($LINES + 2)) |                          #trim off useless lines
    tail -n $LINES
    and the RSS script I use. It probably won't work with all type of RSS feeds there is out there, but it works fine for what I use it for. Maybe it works for you too.
    Code:
    #!/bin/bash
    # Modified by Peter Thorstenson
    # on a script written by Peter Garceau which was
    # based on the RDF Feed Display Script by Hellf[i]re v0.1
    #
    # This script is designed for xml rss feed used by BBC News.
    # Also works with several other xml rss providers.
    # 
    # This script depends on curl.
    # pacman -Sy curl
    #
    # Usage:
    # .conkyrc:    ${execi [time] /path/to/script/conky-rss.sh}
    #
    # Usage Example        
    #        ${execi 300 /home/youruser/scripts/rss.sh}
    
    
    ################## RSS Setup ####################
    #URI of RSS Feed
    URI=http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
    
    #Number of headlines
    LINES=7
    
    #Number of lines before headlines begins
    OFFSET=2     
                      
    #Path to curl
    EXEC="/usr/bin/curl -s"
    
    ########### This is where it's done ##############
    $EXEC $URI | sed -e 's/<!\[CDATA\[//g' |         #remove eventual "<![CDATA[" to leave only clean html tags
    sed -e 's/\]\]>//g' |                            #remove "}}>" to leave only clean html tags
    tr -d '\n' |                                     #remove all linefeeds that screws it up
    sed -e 's/<\/title>/<\/title>\n/g' |             #insert linefeed in the right places
    sed -n -e 's/.*<title>\(.*\)<\/title>.*/\1/p' |  #print only whats between title tags
    head -n $(($LINES + $OFFSET)) |                  #trim head
    tail -n $LINES                                   #trim tail
    Enjoy!!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	rss.png 
Views:	3056 
Size:	124.4 KB 
ID:	16898  
    Asus P8Z68-V, Intel Core i7, 8GB RAM, 120 GB SSD, 1TB + 2TB HDD, Fedora Workstation 25
    Thinkpad X240, 8GB RAM, 1TB SSD, Fedora Workstation 25

  14. #14
    Join Date
    Oct 2005
    Location
    Puerto Rico
    Posts
    602
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ozjd
    I found this which displays the temp of my nividia card. It may help you find other options, please share if you do.

    Code:
    ${color orange}GPU Tempature $color ${execi 30 nvidia-settings -q gpucoretemp | grep '):' | awk '{print $4}' | cut -c -2}degC
    sorry no logo
    It works really nice, thanks ozjd . Now I get my nVidia 8500 GT's current temperature. The logo can wait .

  15. #15
    Join Date
    Dec 2006
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi guys!

    I have a question for conky experts. I need to compare a variable return to a specific string. For example:
    If ${acpiacadapter)="on-line" then DO_this_thing. or if ${fs_type}=NTFS then say_it_is_a_crapy_fs, or if ${battery_percent}=30 then change_color_of_battery_bar_to_red etc, etc.

    Conky provides "if_empty" statement which can check if a variable returns NULL or "if_up ethX" to check if network interface X is up, but how do I compare variable return to an arbitrary string?


    Thank you!

Page 1 of 16 1 2 3 11 ... LastLast

Similar Threads

  1. How to install conky/setup conky in F10?
    By Von-Dyke in forum Using Fedora
    Replies: 14
    Last Post: 10th July 2009, 11:24 AM
  2. package for python examples?
    By daviddoria in forum Using Fedora
    Replies: 1
    Last Post: 21st April 2009, 03:31 AM
  3. Examples of Ruby using SqLite?
    By tashirosgt in forum Programming & Packaging
    Replies: 0
    Last Post: 29th March 2006, 10:10 PM
  4. VirtualHost Examples not working
    By dmode in forum Servers & Networking
    Replies: 4
    Last Post: 19th March 2005, 04:20 AM

Tags for this Thread

Posting Permissions

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