PyPanel Patch

From a discussion in the forums on BSDnexus, came the idea from a friend to create a patch for pypanel. I spent a day or so looking over the code and decided to give it a go. Here are the results.

This patch add two new functionalities to pypanel.
  1. Setting the width of the panel as a percentage of the screen.
  2. Aligning the pypanel by using the keyword RIGHT, CENTER or LEFT.
To set the width as a percentage you need to edit your pypanelrc file by setting the P_WIDTH variable to a percentage. So if you wanted the panel to be 50% of the screen you would set the variable like this.
P_WIDTH = ‘50%’

To set the alignment to right:
P_START = ‘RIGHT’

To set the alignment to center:
P_START = ‘CENTER’

To set the alignment to left:
P_START = ‘LEFT’

These changes DO NOT override the orignal way of setting the width and starting position.

This patch was created on FreeBSD 7.0 and tested also on FreeBSD 8.0. This is the 20080411.patch

For those using FreeBSD you can just download pypanel and replace your existing pypanel with this one. Make sure that it is executable.

Special thanks to Scott Robbins (scottro) for the idea and the testing.
subscribe