Bashets original info

Bashets is a distinct approach to Awesome widgets. This library allows you to use your existing shellscripts as a content providers for widgets. Starting from version 0.4 bashets is not necessarily used as a widget updater. With the help of callbacks, you are able to use bashets for tracking changes in script output.

Why Bashets
We have a great bunch of shellscripts on the Web or written by ourselves for system monitoring purposes. Many of them are written for tools such as Conky to be content providers. So,


 * Why it's not the same for Awesome widgets?
 * Why do we need to write more or less complicated Lua scripts to provide system data for widgets?

Yes, it's reasonable in the case of interactive widgets with complex behaviour. But for simple widgets 'tis not true.


 * That's why in Bashets you only need to provide a script filename and formatting options.

It's much more powerful than to rely on developer's aims and to wait until needed widget is implemented as a part of Vicious, Obvious, etc.

From version 0.3.2 non-text widgets are also supported. That means that you are able to draw CPU/memory/anything-else usage graphs, have live progressbar (for example of disk usage) or even organize a slideshow utilizing simple shellscript that outputs random image paths from some directory.

From version 0.4 user-defined callbacks are supported. That means that you are able to notify yourself about low battery, or to display some info on song change in mpd, or run your mail agent if you have new email, and it is implemented in a few lines of Bash/Perl/Python/etc. script and one trivial Lua callback.

From version 0.5 there is a limited support of external widget updates through dbus.

From version 0.6 there is an initial support for dbus signals as a data source.

How to use Bashets
Bashets homepage is now:


 * http://gitorious.org/bashets

For the first time you will need to read a brief introduction to see implemented functions.

Also you could be interested in existing configuration file using Bashets. It's here:
 * http://gitorious.org/bashets/awesome-config/trees/master/.

For a screenshot you can see this one:
 * http://awesome.naquadah.org/w/images/Zhuravlik_screen.png

Bottom widgets are all implemented with the help of Bashets. If you need example shellscripts, they are here:
 * http://gitorious.org/bashets/bashets/trees/master/userscripts

Postscriptum
As frequently said, tsar's one if for tsar and God's one is for God. Shellscript is a great tool for system information retrieval. Awesome's config is a great tool for managing Awesome. That's why Bashets passes all retrieval tasks for Bash/Perl/Python/etc., and widget appearance task - for Awesome.

Choose a simple way to concatenate the power of shell with the window manager you use.

Hint
If you are worried by a number of HDD hits when you use bashets, you are able to move the library and temporary files to /dev/shm filesystem. See http://gitorious.org/bashets/pages/Brief_Introduction#bashets+and+/dev/shm for details.

Another way
If you are not satisfied with shellscripts running repeatedly on scheduled intervals, you can try the approach to run a bunch of sleeping shellscripts that wake up to provide data at given time intervals.

Starting from version 0.5, bashets has a limited support for this feature by so-called external mode. Simply set external=true in your registration options, and copy runner.sh script to your scripts directory.

This approach was originally implemented in [pipelets http://www.mail-archive.com/awesome@naquadah.org/msg02578.html] library written by ierton.

You can grab pipelets.lua, pipeman and example shellscripts here: http://git.ierton.ru/?p=awesomerc.git;a=tree