The code for each module is wrapped in a function so the module
can be parameterized, and so its variables can be scoped to the
function. However, the function names must be unique, otherwise when
the modules are sourced, functions will overwrite functions with the
same name in previously sourced modules.
The project name is changing from status-bar to xrsb (for X root
window status bar), so the scheduler is called xrsbs.
The scheduler sends the SIGUSR1 signal to a daemon that is
responsible for maintaining and updating the status (X root window
name property). The daemon will determine which actions to perform
based on the files present in the action directory and remove the files
once the actions are performed, so the scheduler creates action files
just before sending the signal. The scheduler can send one signal to
perform multiple actions by creating multiple action files, and can
create the action file(s) and send the signal immediately,
after some delay, or repeatedly at some interval.
Use free without -h to get raw numbers to report correct memory usage,
otherwise when the free memory is a lower order of magnitude than the
total memory, e.g., the free memory is in MiB and the total memory
is in GiB, then the human-readable free memory number will be too
large compared to the total memory number.
Each panel of the status bar can be turned on or off and configured
with an icon or no icon.
- Loops every 2 seconds
- Reports on:
- CPU usage
- Memory usage
- Backlight brightness
- Volume (requires amixer from alsa-utils)
- Icon changes when volume is below 50%, at or above 50%, or muted
- Battery percentage for each batter
- Icon changes from batter to plug when on AC power
- Date and time