Extendable lightweight event-driven information aggregator and renderer for bar.
PHP-Panel uses composer for dependency management; install dependencies with
composer.phar install
Modules are used for the collection of various information. There are two ways to implement modules:
Modules implementing the PeriodiclyUpdatedModuleInterface will collect and return information in fixed intervals. For example, this is used to display the current time, battery usage, sound volume or memory usage.
For example implementations of this, see the Module\Battery.php, Module\Sound.php or Module\Time.php.
Modules implementing the EventedModuleInterface use Evenement to provide an event source and return new information when available. This allows for event-driven streaming updates, e.g. from websockets, the STDOUT of some process, ...
An implementation which makes use of this to subscribe to information of the BSPWM window manager is Modules\BSPWM.php.
Twig is used to render the information provided. For this, some twig extensions specific for creating format string compatible with bar are available.
See the files in the templates/ directory for examples of this.
php panel.php