Saturday, March 10, 2007

Monkey-ing around with conky

After changing laptops, i have lost most of my configuration files for my preferred eye-candy desktop. Besides having to install all necessary stuff on my debian, i also have to create new configuration files to optimize my desktop just the way I like it, as well as making some friends like Syirman envy the sweet eye-candy on my laptop .

Most users have their own style and preferences. So do I, and finding one that really suits you takes time and sometimes meticulous googling. Recently, I just customize my own .conkyrc file to work best for me. I didn't like how most configuration for conky takes too much space as well as run too many monitoring tools--which can be a bit too heavy....i thought it would be beautiful if it was slim and show only necessary stuff.

I also liked to know if i have new email on gmail. And so a python script is added into the conky configuration to check my mails on gmail.

First of all, i had to install conky. And on debian that is easy:
#aptitude install conky


After that, i have to create .conkyrc in my configuration file. Here is my .conkyrc file.
#avoid flicker
double_buffer yes

#own window to run simultanious 2 or more conkys
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorate,sticky,skip_taskbar,skip_pager

#borders
draw_borders no
border_margin 1

#shades
draw_shades no

#position
gap_x 224
gap_y 0
alignment bottom_left

#behaviour

update_interval 1

#colour
default_color bfbfbf
#default_shade_color 000000
own_window_colour 484432

#font
use_xft yes
xftfont DejaVu Sans:pixelsize=9

#to prevent window from moving
use_spacer no
minimum_size 700 40

#mpd
#mpd_host localhost
#mpd_port 6600

TEXT
Copyright Joey aka Rizal ---------------------------------------------------------------------------------------------------------------------------------- $nodename - $
sysname $kernel on $machine
${color lightgrey}CPU Usage:${color #cc2222} $cpu% ${cpubar}
${voffset -1}Cpu: ${color 95956B}${font}${cpu}% ${color} Mem: ${color 95956B}${font}${mem} ${color} | ${color} Up: ${color 95956B}${font}${uptime_short}${color} | ${color
} Net: ${color 95956B}${font}${downspeed eth0} Kb/s ${color} ${totaldown eth0} down${color} | ${color} ${color 95956B}${upspeed eth0} Kb/s ${color} ${totalup eth0} up${co
lor} | ${color}Root: ${color 95956B}${font}${fs_free /} ${color} Home: ${color 95956B}${font}${fs_free /home} ${color} | Gmail: ${color 95956B}${execi 300 python ~/scri
pts/gmail.py} ${color}


Of course you will need to have the python script to get your mails from gmail. Attached is the python script, which i have put it into my home directory under the folder scripts. I didn't develop this code, i took it from someone, I would like to give credit to the person who wrote this python script, but his details was not attached....anyway, thank you to him.

import os
import string

#Enter your username and password below within double quotes
# eg. username="username" and password="password"


username="xxxxxxxx" put your username here
password="xxxxxxxx" put your password here

com="wget -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate"

temp=os.popen(com)
msg=temp.read()

index=string.find(msg,"<fullcount>")
index2=string.find(msg,"</fullcount>")
fc=int(msg[index+11:index2])

if fc==0:
print "0 new"
else:
print str(fc)+" new"


After all that, you can run conky, and have this slim monitoring tool. Results differs base on your resolution. There are some issues if you are using gnome though....I use enlightenment.

Sunday, March 04, 2007

Sad Penguin


Today I'm feeling a bit blue. Sad, and lifeless. With tons and loads of work bestowed upon me by the clients that I have, the responsibility of a lecturer to my students and the application forms that I have to fill up to continue my studies, I am overwhelmed.

Indeed, I am a sad penguin. I walk taking small steps, slouching as if I have something heavy on my shoulders, with my hands in my pocket, and kicking whatever that seems to be on the ground. A candy wrapper, a crushed tin can, anything that can give me a sense of pleasure and a feeling of control. The truth remains however, that I am far from having control, with all the work load, I'm losing grip of control.

I used to love spending hours hacking my linux box, but now, I tend to sit far away from using linux, why, cause i can focus on what to do and not get itch by adding another plugin on my emacs or trying to figure out the best way to set up virtual hosting so that it will make my web apps run easier for development. Or even trying to figure out how to make tomcat and eclipse integrates better in linux....

With all the stress, I neglect the things i care most. The nice evening naps seems to be more important than talking to dearest friend. To add to my miserable phase, is my itching throat that have been bugging me for the last 2 weeks. After my throat infection lurks further to my ear, fearing that I might go deft, forced me to see the doctor. And now I have to take antibiotics to get rid of the malignant infection in my throat and ear. The antibiotics have little effect on me though, its day 2 of my medication but I'm still feeling the same. I'm not sure if its psychological or the antibiotic given was somehow replaced with a placebo.

They say that everything we experience in life is how we choose to see it. Well, I'm not sure if all I see, is all that bad, but I am still feeling a bit sad and blue. Could it be someone I miss, or could it be that I am just feeling lonely. Or could it be that all this stress is making me crazy....

Well, I don't think I'm crazy, maybe I 'm just a little bit unwell.

Sad Penguin....needs to hibernate.....