"conditional appearance for titles" -- request for Code Review

Nitzan Shaked calius at netvision.net.il
Fri Oct 20 17:02:34 EDT 2006


Hello all

I've implemented a small feature: conditional appearance for the "focused
title", based on the current title text. I use it to change the bg color of
my xterm titles based on which machine I am logged on to, and which user I
am. I added

alias precmd 'echo -n "\033]0;${HOST} : `whoami`\007"'

To all users' .tcshrc, and thus the xterm title changes whenver I ssh to
another machine, and/or whenever I "su". The new feature then changes the
color of my xterm's title.

I am attaching 3 files: a diff file (svn diff from an SVN checkout done 3hrs
ago) and 2 new files to be placed under "openbox/".

I am requesting:
1) a code review from the maintainer / someone in charge, if this is
interesting to anyone.
2) your endless patience and understanding :) it's the first time I am ever
submitting code to a public project.

I tried following code convention, and writing something relatively modular.
I hope I did okay.

Comments anyone?

Cheers,
Nitzan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cond.h
URL: <http://icculus.org/pipermail/openbox/attachments/20061020/cbeece21/attachment.diff>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cond.c
URL: <http://icculus.org/pipermail/openbox/attachments/20061020/cbeece21/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cond.diff
Type: application/octet-stream
Size: 8679 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20061020/cbeece21/attachment.obj>


More information about the openbox mailing list