diff --git a/Makefile b/Makefile index 425495e..801b8cc 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ speedwm: ${OBJ} ifdef USESTATUS status: status.o - $(CC) status.o $(CFLAGS) $(LDFLAGS) -o status + $(CC) status.o $(CFLAGS) $(LDFLAGS) -o speedwm_status status.o: status.c status.h $(CC) -c status.c endif @@ -51,7 +51,7 @@ endif clean: rm -f speedwm *.o speedwm-${VERSION}.tar.gz rm -f speedwm-ipc - rm -f status + rm -f speedwm_status rm -f *.html *.php echo "Cleaned!" @@ -102,9 +102,9 @@ install: all mkdir -p ${DESTDIR}${PREFIX}/share/speedwm mkdir -p ${DESTDIR}${PREFIX}/share/xsessions/ mkdir -p ${DESTDIR}${PREFIX}/share/pixmaps/ - rm -f "${DESTDIR}${PREFIX}/bin/status" + rm -f "${DESTDIR}${PREFIX}/bin/speedwm_status" [ -f speedwm-ipc ] && cp -f speedwm-ipc ${DESTDIR}${PREFIX}/bin || : - [ -f status ] && cp -f status ${DESTDIR}${PREFIX}/bin || : + [ -f speedwm_status ] && cp -f speedwm_status ${DESTDIR}${PREFIX}/bin || : [ -f speedwm ] && cp -f speedwm ${DESTDIR}${PREFIX}/bin || : [ -f docs/entry.desktop ] && cp -f docs/entry.desktop ${DESTDIR}${PREFIX}/share/xsessions/speedwm.desktop || : [ -f speedwm-ipc ] && chmod 755 ${DESTDIR}${PREFIX}/bin/speedwm-ipc || : @@ -118,11 +118,11 @@ install: all cp -f scripts/speedwm* ${DESTDIR}${PREFIX}/bin ; chmod +x ${DESTDIR}${PREFIX}/bin/speedwm* cp -f docs/font-symbols.ttf ${DESTDIR}${PREFIX}/share/fonts/ chmod 755 ${DESTDIR}${PREFIX}/bin/speedwm - [ -f status ] && chmod 755 ${DESTDIR}${PREFIX}/bin/status || : + [ -f speedwm_status ] && chmod 755 ${DESTDIR}${PREFIX}/bin/speedwm_status || : make modules_install [ -f ${DESTDIR}${PREFIX}/bin/speedwm ] && rm -f drw.o speedwm.o util.o speedwm speedwm-ipc || : echo ${VERSION} > ${DESTDIR}${PREFIX}/share/speedwm/speedwm-version - rm -f status + rm -f speedwm_status rm -f *.o modules_install: diff --git a/autostart.h b/autostart.h index 031c354..8a7a54c 100644 --- a/autostart.h +++ b/autostart.h @@ -10,9 +10,6 @@ *************************************************************/ static const char *autostart[] = { - /* Run the built in status bar */ - shell, "-c", "pkill status; status &", NULL, - /* Autostart script, if it exists */ shell, "-c", "$HOME/.config/speedwm/autostart.sh", NULL, diff --git a/speedwm.c b/speedwm.c index 39aa341..b2daa4d 100644 --- a/speedwm.c +++ b/speedwm.c @@ -45,6 +45,7 @@ #include "main.h" /* macros */ +#define STATUS "speedwm_status" #define BARRULES 20 #define BUTTONMASK (ButtonPressMask|ButtonReleaseMask) #define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)) @@ -1032,6 +1033,8 @@ autostart_exec() { return; } + system(STATUS "&"); + /* count entries */ for (p = autostart; *p; autostart_len++, p++) while (*++p); @@ -4394,6 +4397,7 @@ quit(const Arg *arg) if (0 < autostart_pids[i]) { kill(autostart_pids[i], SIGTERM); waitpid(autostart_pids[i], NULL, 0); + system("pkill " STATUS); } }