Use sxmo_statusbarupdate.sh script instead of direct calls duplicated logic

This commit is contained in:
Miles Alan 2020-07-12 11:38:31 -05:00
parent 10705f08cd
commit d713b19199
7 changed files with 8 additions and 14 deletions

View file

@ -257,13 +257,7 @@ syncstate()
void
updatestatusbar()
{
pid_t statusbarpid = -1;
char buffer[999];
// TODO: there's probably a better way..
if (fgets(buffer, 999, popen("pgrep -f sxmo_statusbar.sh", "r")) != NULL)
statusbarpid = (pid_t) atoi(buffer);
if (statusbarpid != -1)
kill(statusbarpid, SIGUSR1);
system("sxmo_statusbarupdate.sh");
}
void