tstatus/tstatus.c

36 lines
755 B
C
Raw Normal View History

/* see LICENSE file for details on license */
2022-09-20 18:08:37 -05:00
#include <stdio.h>
2022-09-25 10:35:26 -05:00
#define LENGTH(x) (sizeof(x) / sizeof(*x))
2022-09-20 16:29:25 -05:00
#include "module.h"
2022-09-20 18:08:37 -05:00
#include "bspwm.c"
#include "battery.c"
2022-09-21 12:50:10 -05:00
#include "thermal.c"
2022-09-25 10:35:26 -05:00
#include "datetime.c"
#include "alsa.c"
2022-09-20 16:29:25 -05:00
struct module table[] = {
{0, 10, bspwm_update, {'\0'}},
2022-09-20 18:08:37 -05:00
{0, 10, battery_update, {'\0'}},
2022-09-21 12:50:10 -05:00
{0, 10, thermal_update, {'\0'}},
2022-09-25 10:35:26 -05:00
{0, 10, datetime_update, {'\0'}},
{0, 10, alsa_update, {'\0'}},
2022-09-20 16:29:25 -05:00
};
int main(void) {
table[0].updatecallback(&table[0]);
printf("%s\n", table[0].buffer);
2022-09-20 18:08:37 -05:00
table[1].updatecallback(&table[1]);
printf("%s\n", table[1].buffer);
2022-09-21 12:50:10 -05:00
table[2].updatecallback(&table[2]);
printf("%s\n", table[2].buffer);
2022-09-25 10:35:26 -05:00
table[3].updatecallback(&table[2]);
printf("%s\n", table[2].buffer);
2022-09-20 16:29:25 -05:00
return 0;
}