regexorcist Posted January 17, 2010 Share Posted January 17, 2010 There have been a few conky posts w/ links etc...,so I figured to add a script to the end of my conky.You may recognize some of this script from a former post:http://forums.scotsnewsletter.com/index.ph...st&p=285944I've commented out some lines and added others to suit my purpose,which is to display the title and publish date of the last 3 post on Bruno's ATL forum.(the script updates every 30 seconds)Here is the script rss_parse.py: #!/usr/bin/pythonimport sysimport stringfrom urllib2 import urlopenimport xml.dom.minidom# var_feed_url = sys.argv[1]# var_xml = urlopen(var_feed_url)var_xml = urlopen("http://forums.scotsnewsletter.com/index.php?act=rssout&id=5")var_all = xml.dom.minidom.parse(var_xml)def extract_content(var_all, var_tag, var_loop_count): return var_all.firstChild.getElementsByTagName(var_tag)[var_loop_count].firstChild.datavar_loop_count = 0# var_item = " "# while len(var_item) > 0:for var_loop_count in range(0,4): var_title = extract_content(var_all, "title", var_loop_count)# var_link = extract_content(var_all, "link", var_loop_count) var_date = extract_content(var_all, "pubDate", var_loop_count) if var_loop_count > 0:# print "Title: ", var_title # print "URL Link: ", var_link# print "Published Date: ", var_date print var_title print var_date print " " var_loop_count += 1 try: var_item = var_all.firstChild.getElementsByTagName("item")[var_loop_count].firstChild.data except: var_item = "" Here is my .conkyrc file: # 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/>.#alignment top_leftbackground yesborder_width 3 cpu_avg_samples 2default_color whitedefault_outline_color blackdefault_shade_color blackdouble_buffer yesdraw_borders yesdraw_graph_borders yesdraw_outline nodraw_shades yes# font 10x13use_xft yes# xftfont DejaVu Sans Mono:size=10# xftfont HandelGotD Bold:size=8xftfont URW Chancery L:size=16xftalpha 50gap_x 20gap_y 10maximum_width 240minimum_size 5 5net_avg_samples 2no_buffers yesout_to_console noout_to_stderr noextra_newline noown_window yesown_window_class Conkyown_window_type desktopown_window_transparent yesstippled_borders 0update_interval 1.0uppercase nouse_spacer noneshow_graph_scale noshow_graph_range noTEXT${color lightgrey}Kernel:$alignr${color red}$kernel ${color blue}$machine$color${color lightgrey}Processor Freq:${color blue}$alignr$freq_g GHz${color lightgrey}Processor Load:$alignr${color blue}$cpu%${color}${cpugraph 10, 240 cc0000 cc0000 -l}${color lightgrey}RAM Usage:${color red}$alignr$mem${color}/${color blue}$memmax${color lightgrey}${memgraph 10, 240 cc0000 cc0000 -l}${color lightgrey}Swap Usage:$alignr${color red}$swap${color}/${color blue}$swapmax${color lightgrey}System Disk:$alignr${color red}${fs_used /}${color}/${color blue}${fs_size /}${color lightgrey}Users Disk:$alignr${color red}${fs_used /home}${color}/${color blue}${fs_size /home}${color}$hr${color lightgrey}Network Uploading:$alignr${color blue}${upspeed eth0}${color}${upspeedgraph eth0 10, 240 cc0000 cc0000 -l}${color lightgrey}Network Downloading:$alignr${color blue}${downspeed eth0}${color}${downspeedgraph eth0 10, 240 cc0000 cc0000 -l}${color}$hr${color grey}Name PID CPU% MEM%${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}${color}$hr${color}Bruno's ATL Forum (3 latest posts)${color red}${texeci 30 /home/regexorcist/rss_parse.py} And here is my desktop display (notice the bottom of conky in red):Just a simple little example of conky customization Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 17, 2010 Author Share Posted January 17, 2010 If you use this example, keep in mind that...even though the scripts executes on a 30 second interval,the forum's RSS feed update interval is more like every 5 ror 10 minutes. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 17, 2010 Share Posted January 17, 2010 Wow, that is really useful Rick. Excellent post!!!! Thats one thing I always loved about Conky,it is very customizable and scripts are easy to add to the config. I would use it but XMonad already has a text-based status bar. So I only use a minimal conky on my status bar called Conky-cli (command-line without X dependencies) Anyway, that is an extremely useful script that I know will be used by many users here. Get ready for some questions from others Great Job Rick Quote Link to comment Share on other sites More sharing options...
charlie Posted January 17, 2010 Share Posted January 17, 2010 Howdysecurity breach.."Get ready for some questions from others "I did a little looking around on the new to find more out about conkyrc and conkyThe question is where do the files go... Noticed there is a dir /etc/conkyBefore I make any goofs ,and information is appreciatedCharlie Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted January 17, 2010 Share Posted January 17, 2010 It's sad that I'm so lazy. Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 18, 2010 Author Share Posted January 18, 2010 (edited) Hi charlie,just copy the conky.conf file into your home directory as .conkyrc cp /etc/conky/conky.conf ~/.conkyrc Then start editing.I've found (on my current system) that when I update the .conkyrc filemy conky display updates automatically within a second.Conky is fun and popular, but I honestly think Eric's gtk+ based program looks a little better Edited January 18, 2010 by regexorcist Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted January 18, 2010 Share Posted January 18, 2010 Yup... lots of themes available, too... and easy to change. ;)Today's theme: Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 18, 2010 Share Posted January 18, 2010 Howdysecurity breach.."Get ready for some questions from others "I did a little looking around on the new to find more out about conkyrc and conkyThe question is where do the files go... Noticed there is a dir /etc/conkyBefore I make any goofs ,and information is appreciatedCharlieSorry was at work (off tomorrow though) but just follow what Rick (regexorcist) said. Also, here is 18 pages of conky configurations from the Arch forums that may help you find something that suits you: conky configs and screenshots! Quote Link to comment Share on other sites More sharing options...
charlie Posted January 18, 2010 Share Posted January 18, 2010 Then start editing..... I did and have the file in my home directory Getting down to do the testing Over all this is an interesting project... from what I have seen and read , could be possibel to add a number of output informationAppreciate the help you(all) have given Charlie aka HarryX Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 18, 2010 Share Posted January 18, 2010 No problem Charlie. Post a screenshot of your conky when you get it completed so we check it out. Quote Link to comment Share on other sites More sharing options...
charlie Posted January 18, 2010 Share Posted January 18, 2010 Looking good , noticed that your wallpaper needs to have dark colours ... Looking good thoughI noticed that about files , the rrs feed and conjy need to be made executable Here is the terminal out put when I start the program , For a screen shot .. need to get rid of some of the desktop and change the wallpaper CharlieConky: /home/harry/.conkyrc: 41: no such configuration: 'xtfalpha'Conky: forked to background, pid is 3391harry@desktop ~> Conky: desktop window (1e000a7) is subwindow of root window (1a7)Conky: window type - desktopConky: drawing to created window (0x4800001)Conky: drawing to double bufferConky: /home/harry/.conkyrc: 41: no such configuration: 'xtfalpha'Conky: forked to background, pid is 3391harry@desktop ~> Conky: desktop window (1e000a7) is subwindow of root window (1a7)Conky: window type - desktopConky: drawing to created window (0x4800001)Conky: drawing to double buffer Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 18, 2010 Author Share Posted January 18, 2010 Hi Charlie,I see your making progress.It looks like you have the F and T transposed.You have xtfalpha when your really want xftalpha(it's a font semi-transparent setting)In addition, whatever font you choose to use xftfont it must already be installed.Good Luck, keep at it!!!! Quote Link to comment Share on other sites More sharing options...
charlie Posted January 18, 2010 Share Posted January 18, 2010 RegexorcistTypo errors cause more problems ... I do my best , .. should have copied and pasted as it would save me from the hassle tracking the errorsI have a screen capture of my desktop... I have never used this feature on the BATL , consequently a problem ... Did check out the icons on the message bar , found the insert image ... it is looking for a url Looked into installing the fonts mentioned .. in my Ubuntu .. not found yet it works, It also seems a little unstable .. working on the desktop can cause a crash An impressive trial ... Charlie Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 18, 2010 Author Share Posted January 18, 2010 I have a screen capture of my desktop... I have never used this feature on the BATL , consequently a problem ... Did check out the icons on the message bar , found the insert image ... it is looking for a urlYes the image has to exist somewhere on the internet to display it.There are many free image hosting sites, but you probably already have a few gigs of internet space through your Internet Service Provider (ISP).It's just a matter of uploading the image to that space and then adding the URL address to the image message icon.Each ISP is a little different, so step by step details will be ISP specific.Looked into installing the fonts mentioned .. in my Ubuntu .. not found yet it works, It also seems a little unstable .. working on the desktop can cause a crash An impressive trial ... CharlieI picked a font to go with my desktop, but any font is OK and I'm sure Ubuntu will fall back to a default font if it can't find the selected.Conky should be ROCK SOLID and stable, but something may be intefering. (I initially had flickering until I enabled "double buffering")It can be a lot of fun and a learning experience setting something like this up.Rick (regexorcist)Here is a WILD thought...You could have a customized executable script in you conky configand have a cron job change the contents of your executable script every so often.(you could rotate through different scripts, doing different things and never touch your conky. )The possibilities are unlimited Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 18, 2010 Share Posted January 18, 2010 I have a screen capture of my desktop... I have never used this feature on the BATL , consequently a problem ... Did check out the icons on the message bar , found the insert image ... it is looking for a urlI personally use http://www.imagebam.com/ to upload pictures. The site provides thumbnails for forums, direct-links, etc. Also, it is ran off of linux servers: Powered by dedicated Linux servers. No frogs or beavers inside.Also, Rick is correct, conky is extremely stable. I have never had it crash and I have used for almost 3 years straight. That said something may be wrong in your configuration or it may be a "desktop effects" issue if you use those.Rick: your right conky is extremely customizable. That is the main reason I like conky so much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.