Monday, January 15, 2007

What would programmers do when they are bored?

Well, nothing much to do these days since I spent all my vacation doing other things.
I actually started to code a C API for kpkg, which will be finished in an unknown future. :P
As I have also fixed some bugs in kpg I released a new version "2.3" which is a bug fix release.

See the release notes here: Releas notes
And get the package here: Download kpkg 2.3 at berlios.de

To come back to the original question... Well, this is very tricky, since we should do things normal people normally do. In this case "no computer related things". But, ok, people know, programmers are very weird, so when we are boring we do the opposite, which in this case would be "computer related things". :P

So... What have I done? I improved my "IDE", and it is quoted because it's actually vim only. So, how can someone improve vim? Simple! By just reading some of these books: http://iccf-holland.org/click5.html
Or if you don't want to spend your money on that, you can actually learn vim with :help inside of vim.
So, this is my new vimrc file, there's nothing very weird on it, only a set of templates, some options and options to compile simple projects and full autotools projects.

I hope you enjoy it and of course, take whatever you need from it:

I hope you enjoy it and of course, take whatever you need from it:
http://dcortarello.googlepages.com/vimrc

Saturday, January 06, 2007

Margins in Openbox

Last month I started using openbox to create an easy to use desktop for programmers. Everything was nice, but I wanted to use yabb with adesklets, and then ipager... Everything was nice when I launched those applications/applets, but when I maximize a window, it was over the applet.
There are some applets where that is ok, like the weather applet, but that wasn't right for a panel (like yabb) or a pager like ipager (this last one should set struts).
The solution was margins, Xfwm4 has it and other several wm (like metacity and sawfish) has it too. So I wrote a small patch to give to openbox margins.
I was very happy with it, and gave it to other users to try it (thanks gregf in irc://irc.oftc.net/slackware who tested it for a while, and who stills using it), so I made the submition in openbox's bugzilla. But guess what... The patch was rejected, and the bugzilla entry closed and deleted.
The answer of the developer was:
It's up to the pager/panel to set properties called struts. Openbox properly
respects those and doesn't maximize over them.

Which is great... I mean... Follow standards, that's good... But applets does not set struts, and sometimes the users just wants margins.
So anyways, the patch is here for everyone who wants to use it. Just has to apply it and set the margins in the configuration file like this:
<margin>
<top>px</top>
<bottom>px</bottom>
<left>px</left>
<right>px</right>
</margin>


So here's the patch: http://dcortarello.googlepages.com/openbox-3.3.1-margins.patch