make statusbar program accept notifications

This commit is contained in:
stupidcomputer 2024-04-15 21:49:28 -05:00
parent 275fa01164
commit 011925061d
2 changed files with 3 additions and 2 deletions

View File

@ -24,7 +24,7 @@ struct module mods[] = {
{mod_battstatus, "battstatus", "BAT0", { '\0' }},
{mod_time, "time", "", { '\0' }},
{mod_bspwm, "bspwm", "", { '\0' }},
{mod_message, "message", "/home/usr/.cache/statusbar_notification", { '\0' }},
/* {mod_message, "message", "/home/usr/.cache/statusbar_notification", { '\0' }}, */
};
void create_module_proc(int index, char *pipename) {

View File

@ -17,7 +17,8 @@ int mod_message(char *config, char *name, char *pipename) {
for(;;) {
int watchdesc = inotify_add_watch(fd, config, IN_MODIFY);
read(fd, &buf, sizeof(struct inotify_event));
read:
int watchread = read(fd, &buf, sizeof(struct inotify_event));
/* the file's changed, so reread it */
int filefd = open(config, O_RDONLY, 0);