54 lines
2.6 KiB
C
54 lines
2.6 KiB
C
|
/* text pre-pended to the bar */
|
||
|
#define PREFIX_TEXT ""
|
||
|
|
||
|
/* text appended to the bar */
|
||
|
#define SUFFIX_TEXT ""
|
||
|
|
||
|
/* the seperator between modules */
|
||
|
#define SEPERATOR_TEXT " "
|
||
|
|
||
|
/* if TRUE, default to setting the root window title,
|
||
|
otherwise, default to writing to stdout */
|
||
|
#define DEFAULT_SET_ROOT_TITLE FALSE
|
||
|
|
||
|
/* minimum time between polling modules for updates.
|
||
|
If commented out, this program will find a good value */
|
||
|
/* #define REFRESH_TIME MILISECONDS(10) */
|
||
|
|
||
|
/* include your custom modules here!
|
||
|
look at util.h to see which functions are available */
|
||
|
#include "modules/time.h"
|
||
|
#include "modules/pulse.h"
|
||
|
/* #include "modules/oss.h" */
|
||
|
#include "modules/linuxnm.h"
|
||
|
#include "modules/fcitx4.h"
|
||
|
#include "modules/battery.h"
|
||
|
#include "modules/bluetooth.h"
|
||
|
#include "modules/optimus.h"
|
||
|
|
||
|
/* once you have written a module in its own file, you need to
|
||
|
define it here. A description of each property follows
|
||
|
- name: the name to idenfity this module in error messages and -i output
|
||
|
- init function: function to be run at the start of this program.
|
||
|
It should return NULL if it suceeded and an error message
|
||
|
if it failed.
|
||
|
- poll function: function to run every poll. A char ** is passed as an argument
|
||
|
and should be set the the functions output. It should return null
|
||
|
if it suceeded and an error message if it failed.
|
||
|
- time: how long to wait between each poll of this module. Should be one of:
|
||
|
MILISECONDS(t), SECCONDS(t), MINUTES(t), HOURS(t), or NO_REFRESH
|
||
|
- signal: when this program receives SIGRTMIN+signal, it will poll modules
|
||
|
with a matching signal and then refresh the bar. NO_SIGNAL will disable
|
||
|
this feature for a given module. */
|
||
|
struct BarModule modules[] = {
|
||
|
/* name init function poll function time signal */
|
||
|
{ "battery", &battery_module_init, &battery_module_poll, SECONDS(1), 2 },
|
||
|
{ "optimus", &optimus_module_init, &optimus_module_poll, NO_REFRESH, NO_SIGNAL },
|
||
|
{ "fcitx4", &fcitx4_module_init, &fcitx4_module_poll, NO_REFRESH, 3 },
|
||
|
{ "pulse", &pulse_module_init, &pulse_module_poll, NO_REFRESH, 1 },
|
||
|
/* { "oss", &oss_module_init, &oss_module_poll, MILISECONDS(250), NO_SIGNAL }, */
|
||
|
{ "time", NULL, &time_module_poll, MILISECONDS(500), NO_SIGNAL },
|
||
|
{ "linuxnm", &linuxnm_module_init, &linuxnm_module_poll, NO_REFRESH, 2 },
|
||
|
{ "bluetooth", &bluetooth_module_init, &bluetooth_module_poll, NO_REFRESH, 4 }
|
||
|
};
|