Saturday, February 16, 2008

Not dead yet...

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Despite a lack of interest in this project, I have not stopped working on it. I've just been busy with other facets of my life. I'm currently planning the main script (which will write/delete directly to/from .conkyrc).

For the sake of documentation, here are my thoughts on how the script will work out.

Variables will be defined, but not set within the script. Instead, they will be loaded from a separate file, which will be written to at the end of the script. Spiritus will support up to 10 modules at one time, therefore there will be 10 variables, numbered 1-10.

There will be a .spiriuts directory in your homefolder that will contain text files with all the conky call lines in them. For example, inside ~/.spiritus/modules, there will be a file called "hostsonline" that will contain the following lines:

${color #ffcb48}Hosts Online:
${color #FFFFFF}${execi 5 cat /home/jason/.hostsonline}

When Spiritus is run, it will be called on the command line like so:

jason@spiritus$ spiritus add hostsonline 2

After spiritus, either "add" or "remove" will be called, which will add or remove the next variable, which will be the module, in this case, hostsonline. The last spot on the command is the position, in this case two.

Assuming that "netinfo" is already saved to the variables file in position one, (variable 1,) we can assume that variable "1" is already defined as $(cat ~/.spiritus/modules/netinfo)

By adding hostsonline to variable two, we would simply define variable 2 as $(cat ~/.spiritus/modules/hostsonline)

If we were to then issue another command, such as "spiritus add sysinfo 2," then we would copy the contents of all variables 2 and up to the next variable. Variable 2 would become three, three would become 4, and so on. Variable 2 would then be made sysinfo.

Before the end of the script, all 10 variables would be outputted, although empty ones would have a null output.

After the output, all variables would be saved to a file ~/.spiritus/variables. This file would be called on to define all variables every time the script was run.

Of course, this is all conceptual, and probable makes no sense to anyone but me. But that's okay, because it's more then likely that I'm the only one that reads this blog.

Thats all for now. The script will come later.

- -Jason
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org

iD8DBQFHtp1ITiCACtcRvugRAno+AJ9vrtrTV7cDC5tpvQsmWxSGP0BuOACfV/T4
ZCNJab6BJr9YydAfE41T878=
=kXWB
-----END PGP SIGNATURE-----

No comments: