PowerBar v1.2

Written by Steve Sprang

Released March 2, 1997


Introduction

PowerBar is a module-based system utility. By itself PowerBar is nothing more than a tiny window, but given a few add-on modules it is a powerful control center for the BeOS.

It was orignally based on an idea by Jon Ragnarsson and is similar in nature to BeBar by Thorsten Seitz


Usage

To change the direction in which PowerBar grows, select "Left" or "Right" from the "Grow" submenu in PowerBar's main menu. Having the window grow left is useful if you would like to place the window in the top right corner of the screen.

In version 1.2, PowerBar provides the capability to rearrange the order of your modules on the fly. When first launched, you will see a pale yellow rectangle below each module. This is the module's tab and allows you to pick the module up and drop it somewhere else.

When dragging a module, the tabs of other modules are sensitive to the cursor, and darken to show you where the module will go if dropped.

Tab visibility can be toggled with the "Show Tabs"/"Hide Tabs" item under the PowerBar main menu. Once you arrange the modules in your preferred order, you will probably want to hide the tabs.

PowerBar will remember both the order of your modules and the state of tab visibility on each launch.


Modules

In order for PowerBar to find modules, they must be placed in a folder named "modules" located in the same directory as the PowerBar executable. The current release of PowerBar includes four modules which provide basic functionality:

app_module

This module works almost exactly like BeBar. Currently running applications are shown as 16x16 icons which appear and disappear as apps come and go. If a file is dropped on the icon of a running app, it is opened (if possible) by that application.

clock_module

This is a very simple digital clock which I am sure many will hate because of the hideous font. Fortunately the source is included so you can write a nicer one. :) Click on it to see the date (sticks for 2 seconds).

perf_module

This is a mini-pulse. It shows the load for each CPU and also RAM utilization. If you click on this module it tries to launch PerfMonitor. PerfMonitor is a CPU load monitoring utility also from me. ;)

killer_module

This module lets you kill or request a quit from any running team. Click the skull and crossbones to get a pop-up menu.

Developing your own modules.


New Features

Version 1.0

* Remembers window position
* Offers a "grow left" option (you can now place it in the top right corner of the screen)
* Modules no longer need to support all module functions

Version 1.2

* Allows rearrangement of modules on the fly.


Bug Fixes

The only known bugs in the beta release of PowerBar can be attributed to the app_module. I believe that I have eliminated them (and hopefully have not made new ones!). Here's the list of problems which have been fixed:

* On every pulse (3 times a second) the app_module would allocate some memory and forget to delete it.
* Numerous offscreen bitmaps were left undeleted resulting in many (MANY!) orphaned threads.
* When PowerBar was the active app, selecting its icon from the app_module resulted in a "main menu attack". The standard main menu appeared and disappeared rapidly and indefinitely.

In general, the app_module is much more cleanly written now. It's much more efficient, and cleans up after itself.

Version 1.1 Fix

* The "Grow Left" option now propogates to all workspaces. I apologize for not considering this and not noticing the discrepancy before the release of V1.0. Thanks to Chris Blackbourn and Daniel Wineman for bringing this to my attention.


Source Code

I have included the source code for clock_module and perf_module so that you can see how to go about writing your own modules. The source is fairly well documented and there is a template and project for your convenience.

If I ever stop adding features to PowerBar, I swear that I'll take the time to clean up the source so that it can be released. ;)


Modules I would like to see

* Recent Apps
* Screen shortcut (allowing you to change resolutions and color depths)

Modules I wanted that now exist

* pbar_workspace0.9.zip
Written by Sean Allen of Infant Software, this is the first third party module that's been released. It offers a menu to switch between workspaces. Thanks Sean!


Thanks

I would like to extend my thanks to Jon Ragnarsson for the cool idea, and also to Thorsten Seitz who shared invaluable information which made the app_module possible.

I would also like to thank Osma Ahvenlampi, Tim Stack, and Benoit Triquet for pointing out the bugs in the app_module.

Also, thanks to Ed Silva who suggested the "grow left" option.


Contact Information

Please send all comments and bug reports to me:

Email: sprang@andrew.cmu.edu

Permanent Address:

Steve Sprang
141 State Route 603
Shiloh, OH 44878

WWW

Other Be Software